Macro edgedb_codegen::edgedb_query_file

source ยท
macro_rules! edgedb_query_file {
    ($module:ident, $path:literal) => { ... };
}
Expand description

Generates a query module from a query string relative to the root of the crate this is defined in. This is useful for queries that are not placed in the queries folder at the root of the crate.

use edgedb_codegen::edgedb_query_file;

edgedb_query_file!(insert_user, "queries/insert_user.edgeql");

The above code can actually be replaced with the edgedb_query!(insert_user) macro since the file is placed in the queries folder.