aarondb/shared/ast
Types
pub type AggFunc {
Sum
Count
Min
Max
Avg
Median
}
Constructors
-
Sum -
Count -
Min -
Max -
Avg -
Median
pub type BodyClause {
Positive(#(Part, String, Part))
Negative(#(Part, String, Part))
Filter(Expression)
Bind(Part, Part)
Aggregate(
variable: String,
func: AggFunc,
target: Part,
filter: List(BodyClause),
)
GraphGroupBy(List(String))
GroupBy(String)
LimitClause(Int)
OffsetClause(Int)
OrderByClause(String, OrderDirection)
Union(List(List(BodyClause)))
Subquery(List(BodyClause))
Recursion(variable: String, clauses: List(BodyClause))
Temporal(
type_: TemporalType,
time: Int,
op: TemporalOp,
variable: String,
entity: Part,
clauses: List(BodyClause),
)
Neighbors(
from: Part,
edge: String,
depth: Int,
node_var: String,
)
CycleDetect(edge: String, cycle_var: String)
BetweennessCentrality(
edge: String,
entity_var: String,
score_var: String,
)
StronglyConnectedComponents(
edge: String,
entity_var: String,
component_var: String,
)
TopologicalSort(
edge: String,
entity_var: String,
order_var: String,
)
ConnectedComponents(
edge: String,
entity_var: String,
component_var: String,
)
Reachable(from: Part, edge: String, node_var: String)
Similarity(variable: String, target: Part, threshold: Float)
SimilarityEntity(
variable: String,
target: Part,
threshold: Float,
)
CustomIndex(
variable: String,
index_name: String,
query: IndexQuery,
threshold: Float,
)
ShortestPath(
from: Part,
to: Part,
edge: String,
path_var: String,
cost_var: option.Option(String),
max_depth: option.Option(Int),
)
PageRank(
entity_var: String,
edge: String,
rank_var: String,
damping: Float,
iterations: Int,
)
StartsWith(variable: String, prefix: String)
Virtual(
adapter_name: String,
args: List(Part),
outputs: List(String),
)
Pull(variable: String, entity: Part, pattern: List(PullItem))
Cognitive(
concept: Part,
context: Part,
threshold: Float,
engram_var: String,
)
}
Constructors
-
-
-
Filter(Expression) -
-
Aggregate( variable: String, func: AggFunc, target: Part, filter: List(BodyClause), ) -
GraphGroupBy(List(String)) -
GroupBy(String) -
LimitClause(Int) -
OffsetClause(Int) -
OrderByClause(String, OrderDirection) -
Union(List(List(BodyClause))) -
Subquery(List(BodyClause)) -
Recursion(variable: String, clauses: List(BodyClause)) -
Temporal( type_: TemporalType, time: Int, op: TemporalOp, variable: String, entity: Part, clauses: List(BodyClause), ) -
Neighbors(from: Part, edge: String, depth: Int, node_var: String) -
CycleDetect(edge: String, cycle_var: String) -
BetweennessCentrality( edge: String, entity_var: String, score_var: String, ) -
StronglyConnectedComponents( edge: String, entity_var: String, component_var: String, ) -
TopologicalSort( edge: String, entity_var: String, order_var: String, ) -
ConnectedComponents( edge: String, entity_var: String, component_var: String, ) -
Reachable(from: Part, edge: String, node_var: String) -
Similarity(variable: String, target: Part, threshold: Float) -
SimilarityEntity( variable: String, target: Part, threshold: Float, ) -
CustomIndex( variable: String, index_name: String, query: IndexQuery, threshold: Float, ) -
ShortestPath( from: Part, to: Part, edge: String, path_var: String, cost_var: option.Option(String), max_depth: option.Option(Int), ) -
PageRank( entity_var: String, edge: String, rank_var: String, damping: Float, iterations: Int, ) -
StartsWith(variable: String, prefix: String) -
Virtual( adapter_name: String, args: List(Part), outputs: List(String), ) -
-
pub type Expression {
Eq(Part, Part)
Neq(Part, Part)
Gt(Part, Part)
Lt(Part, Part)
And(Expression, Expression)
Or(Expression, Expression)
}
Constructors
-
-
-
-
-
And(Expression, Expression) -
Or(Expression, Expression)
pub type IndexQuery {
TextQuery(text: String)
NumericRange(min: Float, max: Float)
Custom(data: String)
}
Constructors
-
TextQuery(text: String) -
NumericRange(min: Float, max: Float) -
Custom(data: String)
pub type OrderBy {
OrderBy(variable: String, direction: OrderDirection)
}
Constructors
-
OrderBy(variable: String, direction: OrderDirection)
pub type OrderDirection {
Asc
Desc
}
Constructors
-
Asc -
Desc
pub type Part {
Var(String)
Uid(fact.EntityId)
Val(fact.Value)
AttrVal(String)
Lookup(#(String, fact.Value))
}
Constructors
-
Var(String) -
Uid(fact.EntityId) -
Val(fact.Value) -
AttrVal(String) -
Lookup(#(String, fact.Value))
pub type PullPattern =
List(PullItem)
pub type Query {
Query(
find: List(String),
where: List(BodyClause),
order_by: option.Option(OrderBy),
limit: option.Option(Int),
offset: option.Option(Int),
)
}
Constructors
-
Query( find: List(String), where: List(BodyClause), order_by: option.Option(OrderBy), limit: option.Option(Int), offset: option.Option(Int), )
pub type Rule {
Rule(head: #(Part, String, Part), body: List(BodyClause))
}
Constructors
-
Rule(head: #(Part, String, Part), body: List(BodyClause))
pub type Step {
In(String)
Out(String)
}
Constructors
-
In(String) -
Out(String)
pub type TemporalOp {
At
Since
Until
Before
After
Range
}
Constructors
-
At -
Since -
Until -
Before -
After -
Range
pub type TemporalType {
Tx
Valid
}
Constructors
-
Tx -
Valid