Macro edgedb_codegen::edgedb_query
source ยท macro_rules! edgedb_query { ($module:ident, $query:literal) => { ... }; ($module: ident) => { ... }; }
Expand description
Generates a query module from a query string.
use edgedb_codegen::edgedb_query;
edgedb_query!(get_users, "select User {**}");This macro can be called with one argument if in the root of your crate you
host a folder named queries.
use edgedb_codegen::edgedb_query;
edgedb_query!(insert_user);The above code will find the file <CRATE_ROOT>/queries/insert_user.edgeql
and run the query from there.