surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.06k stars 81 forks source link

Unable to get specific record using a variable with the records id #201

Closed JohnKinyanjui closed 4 months ago

JohnKinyanjui commented 4 months ago

Describe the bug Basically when you pass an id of record in the table and use it as variable it can no longer to be used to get the record you can see the way to reproduce it down below and a picture of a practical usage.

To Reproduce Steps to reproduce the behavior assuming you have such a table step 1: assuming this user already exists in the database.

  "select * from users where id = $id;

   select * from $id;

our varialbles will be:

  {
     "id": "users:test" 
  }

Expected behavior The result will be

--result 1
[]
--result 2 
[
    s'users:⟨018e8fb1-e0de-7aed-9d56-cbd9080a7c25⟩'
]

Environment:

Platform: Web
Navigator: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Version: 2.0.1
Flags: featureFlags: false, models_view: true, apidocs_view: true, themes: false, newsfeed: true

Screenshot 2024-04-23 205124

macjuul commented 4 months ago

This should be fixed in the next patch release

JohnKinyanjui commented 4 months ago

fixed thanks