-
Pardon me if below queries are wrong (I use surrealist and it doesn't complain). So, I am trying different queries to see how surrealdb works before I decide to choose it for my project which expects to have high reads. So I am quite interested in Record Id links and Graph relate options. This is what I did; add some test data with RELATE
check data working queries (returns the record having user-5 in id)
non of the below queries are working which I feel should work
basically, if you have a datetime in a complex record id, you cannot search using it in any of the above methods. Now, let's recreate above with a small change as below;
In above, user table has no datetime part to the complex id. it's just a [string,string]. Now if I run below query
This behaviour is there regardless of the complex record id type (array or object). Another thing I noticed is when you do a RELATE query for a non existent record it doesn't complain it just inserts it (related to #3921 ). In the mentioned issue, the original comment was to throw an error if you try to RELATE non-existent data. But then it has changed to a feature to auto create the missing data, which I think is dangerous in certain use cases. In my scenario when doing a RELATE i must make sure that both exists in the db. Of course I can do that by code, however by default the db should enforce it may be unless you introduce something like;
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
ok.. so I checked this with a friend of mine and the first part of the issues was sorted. Difference was that he tried it using VS Code Thunder Client and I was using surrealist over websockets. To test these queries what I did was after inserting them using for...loop I did a select * from user and in the results, surrealist rounds the datetime to a shorter version; 2024-05-15T10:24:28.903167600Z becomes 2024-05-15T10:24:28.903Z in surrealist query result output So, in above queries, i use the shortened version to search and of course no results. So, surreallist should not meddle with the datetime and it should not round it. I am going to post this to surrealist. |
Beta Was this translation helpful? Give feedback.
ok.. so I checked this with a friend of mine and the first part of the issues was sorted. Difference was that he tried it using VS Code Thunder Client and I was using surrealist over websockets.
To test these queries what I did was after inserting them using for...loop I did a
select * from user and in the results, surrealist rounds the datetime to a shorter version;
2024-05-15T10:24:28.903167600Z becomes 2024-05-15T10:24:28.903Z in surrealist query result output
So, in above queries, i use the shortened version to search and of course no results.
So, surreallist should not meddle with the datetime and it should not round it. I am going to post this to surrealist.