# Functions
No description provided by the author
AsDict checks whether a Value is a valid dictionary.
AssertEqualValues asserts that the two values are Equal.
AssertExprErrorEquals asserts that the expr returns an error with the given message when evaluated.
AssertExprErrors asserts that the expr returns an error when evaluated.
AssertExprEvalsToType asserts that the exprs evaluate to the same value.
AssertExprPanics asserts that the expr panics when evaluated.
AssertExprsEvalToSameValue asserts that the exprs evaluate to the same value.
AsString returns String and the empty set as String or false otherwise.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AttrEnumeratorToMap transcribes its Attrs in a map.
AttrEnumeratorToSlice transcribes its Attrs in a slice.
No description provided by the author
No description provided by the author
Combine returns a map of names to pairs of corresponding Values from a and b.
CombineNames returns names from a and b according to the given mask.
Concatenate is equivalent to a <&> (b => .
No description provided by the author
Difference returns every Value from the first Set that is not in the second.
No description provided by the author
ExprAsFunction returns a function for an expr.
GenericJoin joins two sets using a key and a joiner.
Intersect returns every Value from a that is also in b.
Joiner returns a function that computes the relational join of a and b.
No description provided by the author
MakeBinValExpr returns a function that creates a binExpr for the given logical operator.
MarshalToJSON marshals the given value to JSON with sets escaped as s -> {"{||}": s}.
Merge returns the merger of a and b, if possible or nil otherwise.
MergeLeftToRight returns the merger of a and b.
MergeTuples takes two tuples and performs a deep merge.
MustNewDict constructs a dict as a relation {|@, @value|...}, or panics if construction fails.
MustNewSet constructs a genericSet from a set of Values, or panics if construction fails.
NConcatenate applies concatenate to one or more sets.
Nest groups the given attributes into nested relations.
NewAddArrowExpr returns a new BinExpr which supports operator `+>`.
NewAddExpr evaluates a + b, given two Numbers.
No description provided by the author
NewArray constructs an array as a relation.
NewArrayExpr returns a new Expr that constructs an Array.
NewArrayItemTuple constructs a CharTuple.
NewArrayItemTupleExpr returns a new ArrayItemTupleExpr.
No description provided by the author
NewArrowExpr returns a new ArrowExpr.
NewAttr returns an Attr with the given name and value.
NewAttrExpr constructs a new AttrExpr from the given arguments.
NewBool constructs a bool as a relation.
NewBoolAttr return an attr with a bool value.
NewBytes constructs a byte array as a relation.
NewBytesByteTuple constructs a BytesByteTuple.
No description provided by the author
NewCallExpr evaluates a without b, given a set lhs.
No description provided by the author
NewFunction returns a new function.
No description provided by the author
NewComposeExpr evaluates a <-> b.
NewConcatExpr evaluates a ++ b.
NewCondExpr returns a new CondExpr.
NewCondPatternControlVarExpr returns a new CondPatternControlVarExpr.
NewContextErr creates a ContextErr.
NewCountExpr evaluates to the number of elements in a.
NewDArrowExpr returns a new DArrowExpr.
NewDict constructs a dict as a relation {|@, @value|...}.
NewDictEntryTuple constructs a CharTuple.
NewDictEntryTupleExpr returns a new dictEntryTupleExpr.
NewDictExpr returns a new DictExpr from pairs.
No description provided by the author
No description provided by the author
NewDiffExpr evaluates a &~ b.
NewDivExpr evaluates a / b, given two Numbers.
NewDotExpr returns a new DotExpr that fetches the given attr from the lhs, which is expected to be a tuple.
No description provided by the author
NewDynLetExpr returns a new DynLetExpr.
NewEvalExpr evaluates to *a, given a set lhs.
NewExprClosure returns a new ExprClosure.
NewExprExpr returns a new ExprExpr from pairs.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewFloatAttr return an attr with a float value.
NewFunction returns a new function.
NewIdentExpr returns a new identifier.
No description provided by the author
NewIdivExpr evaluates ⎣a / b⎦, given two Numbers.
NewIfElseExpr returns a new IfElseExpr.
NewIntAttr return an attr with an int value.
NewIntersectExpr evaluates a <&> b.
NewJoinCommonExpr evaluates a -&- b.
NewJoinExistsExpr evaluates a --- b.
NewJoinExpr evaluates a <&> b.
NewLeftMatchExpr evaluates a <&- b.
NewLeftResidueExpr evaluates a <-- b.
NewLiteralExpr returns a new LiteralExpr from pairs.
NewMaxExpr evaluates to the max of expr over all elements in a.
NewMeanExpr evaluates to the mean of expr over all elements in a.
NewMedianExpr evaluates to the median of expr over all elements in a.
NewMinExpr evaluates to the min of expr over all elements in a.
NewModExpr evaluates a % b, given two Numbers.
NewMulExpr evaluates a * b, given two Numbers.
NewNames returns a new set of names with the given names.
NewNativeFunction returns a new function.
NewNativeFunctionAttr returns a new Attr with a named key and NativeFunction value.
NewNativeLambda returns a nameless function.
NewNegExpr evaluates to -a.
NewNestExpr returns a new NestExpr.
NewNotExpr evaluates to !a.
NewNumber returns a Number for the given number.
NewOffsetArray constructs an offset array as a relation.
NewOffsetBytes constructs an offset byte array as a relation.
NewOffsetExpr returns a new OffsetExpr.
NewOffsetString constructs an offset string as a relation.
NewOrderByExpr evaluates a orderby key, given a set lhs, returning an array.
NewOrderExpr evaluates a order less, given a set lhs, returning an array.
No description provided by the author
NewPatternExprPair returns a new PatternExprPair.
NewPosExpr evaluates to a.
NewPowerSetExpr evaluates to ^a.
NewPowExpr evaluates a to the power of b, given two Numbers.
NewRankExpr evaluates a rank tuplef, given a relation lhs, returning a new relation with each lhs tuple augmented by the tuplef attrs containing the corresponding rank.
No description provided by the author
NewReduceExpr evaluates a reduce f, given a set lhs.
NewRelationExpr returns a new relation for the given data.
NewRightMatchExpr evaluates a -&> b.
NewRightResidueExpr evaluates a --> b.
No description provided by the author
NewSequenceMapExpr returns a new SequenceMapExpr.
NewSet constructs a genericSet from a set of Values.
No description provided by the author
NewSetExpr returns a new TupleExpr.
NewSetFrom constructs a genericSet from interfaces.
No description provided by the author
NewSingleExpr evaluates to the single element in a or fails if a count != 1.
NewSingleNestExpr returns a new SingleNestExpr.
NewString constructs a string as a relation.
NewStringAttr return an attr with a string value.
NewStringCharTuple constructs a CharTuple.
NewStringCharTupleExpr returns a new dictEntryTupleExpr.
NewSubExpr evaluates a - b, given two Numbers.
NewSubModExpr evaluates a % b, given two Numbers.
NewSumExpr evaluates to the sum of expr over all elements in a.
NewSymmDiffExpr evaluates a ~~ b.
NewTuple constructs a Tuple from attrs.
NewTupleAttr return an attr with a new tuple value.
NewTupleExpr returns a new TupleExpr.
NewTupleExprFromMap returns a new TupleExpr from a map[string]Expr.
NewTupleFromMap constructs a Tuple from a map of strings to Go values.
NewAngleArrowExpr returns a new AtArrowExpr.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewIuntAttr return an attr for a uint64 value.
NewUnionExpr evaluates a | b.
NewUnnestExpr returns a new UnnestExpr.
NewValue constructs a new value from a Go value.
NewWhereExpr evaluates a where pred, given a set lhs.
NewWildcardExpr constructs a new wildcard AttrExpr.
NewWithExpr evaluates a with b, given a set lhs.
NewWithoutExpr evaluates a without b, given a set lhs.
NewXML constructs an XML Tuple from the given data.
NIntersect returns every Value from a that is also in all bs.
No description provided by the author
OrderBy returns a slice with the sets Values sorted by the given key.
No description provided by the author
PowerSet computes the power set of a set.
Rank ...
Reduce reduces a set using the given key and reducer functions.
RelationAttrs returns the set of names for a relation type, or an error if the set isn't a regular relation.
RequireEqualValues requires that the two values are Equal.
RequireExprsEvalToSameValue requires that the exprs evaluate to the same value.
SetCall is a convenience wrapper to call a set and return the result or an error if there isn't exactly one result.
SingleAttrNest nests a single attribute as a set.
SymmetricDifference returns Values in either Set, but not in both.
No description provided by the author
TupleOrderedNames returns the names of this tuple in sorted order.
TupleProjectAllBut returns the projection of t over all of its attributes except those specified in names.
Union returns every value that is in either input Set (or both).
UnmarshalFromJSON unmarshals the given value from JSON interpreting escaped sets ({"{||}": s}) accordingly.
Unnest unpacks the attributes of a nested relation into the outer relation.
ValueEnumeratorToSlice transcribes its Values in a slice.
No description provided by the author
ValueTypeAsString returns a string that describes the type of the value in a human-readable form.
WrapContextErr wraps an error in a ContextErr.
# Constants
The following masks control which elements to include in Combine().
No description provided by the author
BytesByteAttr is the standard name for the value-attr of a character tuple.
No description provided by the author
Include elements found on both sides.
Include elements only found on lhs.
Include elements only found on rhs.
StringCharAttr is the standard name for the value-attr of a character tuple.
# Variables
EmptyNames is the empty set of names.
EmptyScope is the scope with no variables.
EmptyTuple is the tuple with no attributes.
genericSet equivalents for Boolean true and false.
LexerNamePat defines valid unquoted identifiers.
genericSet equivalents for Boolean true and false.
genericSet equivalents for Boolean true and false.
# Structs
No description provided by the author
Array is an ordered collection of Values.
ArrayExpr represents an expr that evaluates to an Array.
ArrayItemTuple represents a tuple of the form (@: at, @item: item).
ArrayItemTupleExpr represents an expr that evaluates to an ArrayItemTuple.
No description provided by the author
ArrowExpr returns the tuple applied to a function.
Attr is a name/Value pair used to construct a Tuple.
AttrExpr represents a single name:expr in a TupleExpr.
BinExpr represents a range of operators.
Bytes is a set of Values.
BytesByteTuple represents a tuple of the form (@: at, @byte: byteval).
BytesEnumerator represents an enumerator over a Bytes.
BytesExpr is an expression that evaluates to a Byte Array.
Closure represents the closure of a function over a scope.
CompareExpr represents a range of operators.
CondExpr returns the tuple applied to a function, the expression looks like: cond (1 > 0: 2 + 1, 3 > 4: 5, _: 10).
CondPatternControlVarExpr which is used for `cond` pattern matching.
ContextErr represents the whole stack frame of an error from arrai script.
DArrowExpr returns the set applied elementwise to a function.
Dict is a map from keys to values.
DictEntryTuple represents a tuple of the form (@: at, @value: item).
DictEntryTupleExpr represents an expr that evaluates to a DictEntryTuple.
No description provided by the author
DictExpr represents an expression that yields a dict.
No description provided by the author
No description provided by the author
DotExpr returns the tuple or set with a single field replaced by an expression.
No description provided by the author
DynLetExpr implements "let bindings; expr", where bindings must evaluates to a tuple whose attributes are all dynamic names.
No description provided by the author
ExprClosure represents the closure of an expression over a scope.
ExprExpr represents an expression that yields a Literal.
No description provided by the author
ExprScanner represents the source location of an Expr.
No description provided by the author
No description provided by the author
No description provided by the author
Function represents a binary relation uniquely mapping inputs to outputs.
GenericSet is a set of Values.
GenericTuple is the default implementation of Tuple.
GenericTupleEnumerator represents an enumerator over a GenericTuple.
IdentExpr returns the variable referenced by ident.
IfElseExpr returns the tuple applied to a function.
LiteralExpr represents an expression that yields a Literal.
No description provided by the author
No description provided by the author
NamesEnumerator represents an enumerator over a set of names.
NativeFunction represents a binary relation uniquely mapping inputs to outputs.
NestExpr returns the relation with names grouped into a nested relation.
NoReturnError is an error signififying that there was no return value.
OffsetExpr is an expression which offsets the provided array by the provided offset.
No description provided by the author
Pair represents a pair of values.
PatternExprPair a Pattern/Expr pair.
No description provided by the author
ReduceExpr represents a range of operators.
Relation is a Set that only contains Tuples, all of which map the same keys.
RelationValuesEnumerator enumerates the values as Values.
No description provided by the author
Scope represents an expression scope.
ScopeEnumerator represents an enumerator over a Scope.
SeqArrowExpr returns the tuple applied to a function.
No description provided by the author
SetExpr returns the tuple or set with a single field replaced by an expression.
No description provided by the author
SingleNestExpr returns the relation with names grouped into a nested relation.
String is a set of Values.
StringCharTuple represents a tuple of the form (@: at, @char: char).
StringCharTupleExpr represents an expr that evaluates to a StringCharTuple.
TrueSet is a special set that represents True/{()}.
TupleExpr returns a set from a slice of Exprs.
TupleMapExpr returns the tuple applied to a function.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UnaryExpr represents a range of operators.
No description provided by the author
UnnestExpr returns the relation with names grouped into a nested relation.
# Interfaces
AttrEnumerator enumerates Values.
Expr represents an arr.ai expression.
No description provided by the author
OrderableSet is a type used to repr GenericSet and UnionSet to avoid duplications.
Pattern can be inside an Expr, Expr can be a Pattern.
Set represents a Set of Values.
Tuple is a mapping from names to Values.
Value represents any arr.ai value.
ValueEnumerator enumerates Values.
# Type aliases
CombineOp specifies which pairings to include in Combine().
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Less defines a comparator that returns true iff a < b.
No description provided by the author
No description provided by the author
Names represents a set of names.
No description provided by the author
No description provided by the author
Number is a number.
No description provided by the author
No description provided by the author
ValueList represents a []Value for use in sort.Sort().
Values is used as a high performance tuple in the Relation struct.