-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derive QueryArgs
for structs to provide named query arguments
#261
Comments
The problem with using The plan in, however, to make a derive:
But this is still on our todo list. For now, tuples are what is the easiest to use as query arguments. |
Before
To construct You can take a look at my examples: |
#304 should solve this |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
For anyone finding this thread in the future, named_args! is currently recommended way to pass named params into let query = "SELECT (<str>$my_str, <int64>$my_int)";
let args = edgedb_protocol::named_args! {
"my_str" => "Hello world!".to_string(),
"my_int" => Value::Int64(42),
};
let res = client.query(query, &args).await.unwrap(); This issue will remain open to track derive macro for |
QueryArgs
for structs to provide named query arguments
Hello!
Would it be possible to execute queries like this :
The text was updated successfully, but these errors were encountered: