suweal/node
Types
pub type Node {
DefineNormalTable(
name: String,
schemafull: Bool,
permissions: Node,
as_: option.Option(Node),
)
DefineRelationTable(
name: String,
schemafull: Bool,
permissions: Node,
in: String,
out: String,
)
DefineField(
name: Node,
table: String,
type_: surreal_type.SurrealType,
flexible: Bool,
default: option.Option(Node),
assert_: option.Option(Node),
permissions: option.Option(Node),
)
DefineIndex(
name: String,
table: String,
fields: List(String),
unique: Bool,
)
FunctionCall(
lhs: option.Option(String),
rhs: String,
arguments: List(Node),
)
Self
None
Full
All
Number(Float)
Parameter(String)
Identifier(String)
Value(surreal_ql.SurrealQL)
Object(List(#(String, Node)))
Array(List(Node))
Select(
fields: List(SelectField),
only: Bool,
table: String,
where: option.Option(Node),
order: option.Option(List(#(Node, OrderDirection))),
limit: option.Option(Node),
group_all: Bool,
)
If(condition: Node, then_: Node, else_: Node)
BinaryOperator(lhs: Node, operator: Operator, rhs: Node)
WrappedNode(node: Node)
Update(
target: String,
set: List(Node),
where: option.Option(Node),
)
Create(target: String, set: List(Node))
Relate(table: String, from: Node, to: Node, set: List(Node))
Lambda(parameters: List(String), body: Node)
Delete(target: Node, where: option.Option(Node))
}
Constructors
-
DefineNormalTable( name: String, schemafull: Bool, permissions: Node, as_: option.Option(Node), ) -
DefineRelationTable( name: String, schemafull: Bool, permissions: Node, in: String, out: String, ) -
DefineField( name: Node, table: String, type_: surreal_type.SurrealType, flexible: Bool, default: option.Option(Node), assert_: option.Option(Node), permissions: option.Option(Node), ) -
DefineIndex( name: String, table: String, fields: List(String), unique: Bool, ) -
FunctionCall( lhs: option.Option(String), rhs: String, arguments: List(Node), ) -
Self -
None -
Full -
All -
Number(Float) -
Parameter(String) -
Identifier(String) -
Value(surreal_ql.SurrealQL) -
Object(List(#(String, Node))) -
Array(List(Node)) -
Select( fields: List(SelectField), only: Bool, table: String, where: option.Option(Node), order: option.Option(List(#(Node, OrderDirection))), limit: option.Option(Node), group_all: Bool, ) -
-
-
WrappedNode(node: Node) -
Update( target: String, set: List(Node), where: option.Option(Node), ) -
Create(target: String, set: List(Node)) -
-
Lambda(parameters: List(String), body: Node) -
Delete(target: Node, where: option.Option(Node))
pub type Operator {
Equal
NotEqual
GreaterThan
LessThan
GreaterThanOrEqual
LessThanOrEqual
Access
Inside
RelationTo
RelationFrom
RelationToFrom
Indexing
And
Or
}
Constructors
-
Equal -
NotEqual -
GreaterThan -
LessThan -
GreaterThanOrEqual -
LessThanOrEqual -
Access -
Inside -
RelationTo -
RelationFrom -
RelationToFrom -
Indexing -
And -
Or
pub type OrderDirection {
Ascending
Descending
}
Constructors
-
Ascending -
Descending
pub type SelectField {
SelectField(
field: Node,
alias: option.Option(String),
value: Bool,
)
}
Constructors
-
SelectField( field: Node, alias: option.Option(String), value: Bool, )
Values
pub fn replace_variables(
node: Node,
values: List(#(String, surreal_ql.SurrealQL)),
) -> Node
pub fn to_module(node: Node) -> module.Module