surrealdb_expr/expr/paths.rs
1use surrealdb_strand::Strand;
2
3use crate::expr::Part;
4
5/// Single-field path for `"id"`: record primary key when picking from a value, and the
6/// authenticated session user id (UUID) on the frozen-context `session` object.
7pub static ID: [Part; 1] = [Part::Field(Strand::new_static("id"))];
8
9/// Client IP address stored on the frozen-context `session` object (`session()` / batch metadata).
10/// Accessible via the `session::ip()` function or the `$session.ip` parameter.
11pub static IP: [Part; 1] = [Part::Field(Strand::new_static("ip"))];
12
13/// Active namespace name on the frozen-context `session` object.
14/// Accessible via the `session::ns()` function or the `$session.ns` parameter.
15pub static NS: [Part; 1] = [Part::Field(Strand::new_static("ns"))];
16
17/// Active database name on the frozen-context `session` object.
18/// Accessible via the `session::db()` function or the `$session.db` parameter.
19pub static DB: [Part; 1] = [Part::Field(Strand::new_static("db"))];
20
21/// Access level string on the frozen-context `session` object.
22/// Accessible via the `session::ac()` function or the `$session.ac` parameter.
23pub static AC: [Part; 1] = [Part::Field(Strand::new_static("ac"))];
24
25/// Auth-related payload on the frozen-context `session` object.
26/// Accessible via the `session::rd()` function or the `$session.rd` parameter.
27pub static RD: [Part; 1] = [Part::Field(Strand::new_static("rd"))];
28
29/// Request origin string on the frozen-context `session` object.
30/// Accessible via the `session::origin()` function or the `$session.or` parameter.
31pub static OR: [Part; 1] = [Part::Field(Strand::new_static("or"))];
32
33/// Auth token material on the frozen-context `session` object.
34/// Accessible via the `session::token()` function or the `$session.tk` parameter.
35pub static TK: [Part; 1] = [Part::Field(Strand::new_static("tk"))];
36
37/// Incoming endpoint `in` field on graph edges (`->` / `RELATE` semantics).
38pub static IN: [Part; 1] = [Part::Field(Strand::new_static("in"))];
39
40/// Outgoing endpoint `out` field on graph edges (`->` / `RELATE` semantics).
41pub static OUT: [Part; 1] = [Part::Field(Strand::new_static("out"))];