Documentation
¶
Overview ¶
The op package contains operation and aggregation nodes that can be added to a Builder.
Index ¶
- func Abs(n ...interface{}) *OperationNode
- func Add(args ...interface{}) *OperationNode
- func All() *OperationNode
- func And(args ...interface{}) *OperationNode
- func Avg(n Node) *OperationNode
- func BitAnd(arg1, arg2 interface{}) *OperationNode
- func BitInvert(n interface{}) *OperationNode
- func BitOr(arg1, arg2 interface{}) *OperationNode
- func BitShiftLeft(arg1, arg2 interface{}) *OperationNode
- func BitShiftRight(arg1, arg2 interface{}) *OperationNode
- func BitXor(arg1, arg2 interface{}) *OperationNode
- func Ceil(n ...interface{}) *OperationNode
- func Contains(arg1, arg2 any) *OperationNode
- func Count(nodes ...Node) *OperationNode
- func DateAddSeconds(arg1 interface{}, arg2 interface{}) *OperationNode
- func Divide(args ...interface{}) *OperationNode
- func EndsWith(arg1 any, arg2 string) *OperationNode
- func Equal(arg1 interface{}, arg2 interface{}) *OperationNode
- func Exp(n ...interface{}) *OperationNode
- func Floor(n ...interface{}) *OperationNode
- func Function(funcName string, args ...interface{}) *OperationNode
- func GreaterOrEqual(arg1 interface{}, arg2 interface{}) *OperationNode
- func GreaterThan(arg1 interface{}, arg2 interface{}) *OperationNode
- func In[T any](n Node, what ...T) *OperationNode
- func IsNotNull(n interface{}) *OperationNode
- func IsNull(n interface{}) *OperationNode
- func LessOrEqual(arg1 interface{}, arg2 interface{}) *OperationNode
- func LessThan(arg1 interface{}, arg2 interface{}) *OperationNode
- func Like(n interface{}, pattern string) *OperationNode
- func Ln(n interface{}) *OperationNode
- func Max(n Node) *OperationNode
- func Min(n Node) *OperationNode
- func Mod(args ...interface{}) *OperationNode
- func Multiply(args ...interface{}) *OperationNode
- func Negative(n interface{}) *OperationNode
- func None() *OperationNode
- func Not(n interface{}) *OperationNode
- func NotEqual(arg1 interface{}, arg2 interface{}) *OperationNode
- func NotIn[T any](n Node, what ...T) *OperationNode
- func Or(args ...interface{}) *OperationNode
- func Power(n ...interface{}) *OperationNode
- func Round(n ...interface{}) *OperationNode
- func Sqrt(n interface{}) *OperationNode
- func StartsWith(arg1 any, arg2 string) *OperationNode
- func Subquery(b BuilderI) *SubqueryNode
- func Subtract(args ...interface{}) *OperationNode
- func Sum(n Node) *OperationNode
- func Xor(arg1, arg2 interface{}) *OperationNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
func All() *OperationNode
All is a placeholder for when you need to return something that represents selecting everything
func Avg ¶
func Avg(n Node) *OperationNode
Avg is an aggregate function that will find the average value of the combinations of nodes in the result set. The result set is all the various combinations of the joined results before they are combined into slices of objects. Since this is an aggregate operation, it will result in only one row and find the average value over all the rows in the result set, unless you also add a GroupBy statement.
func BitShiftLeft ¶
func BitShiftLeft(arg1, arg2 interface{}) *OperationNode
func BitShiftRight ¶
func BitShiftRight(arg1, arg2 interface{}) *OperationNode
func Contains ¶
func Contains(arg1, arg2 any) *OperationNode
Contains returns on operation node that will return true for the following situations:
- A text type field contains the given string value
- An enum array node contains the given value
func Count ¶
func Count(nodes ...Node) *OperationNode
Count is an aggregate function that will count the number of occurrences of the combinations of nodes in the result set. The result set is all the various combinations of the joined results before they are combined into slices of objects. Since this is an aggregate operation, it will result in only one row and count over all the rows in the result set, unless you also add a GroupBy statement.
func DateAddSeconds ¶
func DateAddSeconds(arg1 interface{}, arg2 interface{}) *OperationNode
func Function ¶
func Function(funcName string, args ...interface{}) *OperationNode
Function lets you use any custom function which your database driver supports. Simply tell it the name and give it the arguments, and the result of the function will be used in the query.
func GreaterOrEqual ¶
func GreaterOrEqual(arg1 interface{}, arg2 interface{}) *OperationNode
func GreaterThan ¶
func GreaterThan(arg1 interface{}, arg2 interface{}) *OperationNode
func In ¶
func In[T any](n Node, what ...T) *OperationNode
In tests to see if the given node is in the "what" list
func LessOrEqual ¶
func LessOrEqual(arg1 interface{}, arg2 interface{}) *OperationNode
func Max ¶
func Max(n Node) *OperationNode
Max is an aggregate function that will find the maximum value of the combinations of nodes in the result set. The result set is all the various combinations of the joined results before they are combined into slices of objects. Since this is an aggregate operation, it will result in only one row and find the maximum value over all the rows in the result set, unless you also add a GroupBy statement.
func Min ¶
func Min(n Node) *OperationNode
Min is an aggregate function that will find the minimum value of the combinations of nodes in the result set. The result set is all the various combinations of the joined results before they are combined into slices of objects. Since this is an aggregate operation, it will result in only one row and find the minimum value over all the rows in the result set, unless you also add a GroupBy statement.
func NotIn ¶
func NotIn[T any](n Node, what ...T) *OperationNode
NotIn tests to see if the given node is NOT in the "what" list
func StartsWith ¶
func Sum ¶
func Sum(n Node) *OperationNode
Sum is an aggregate function that will find the sum of the combinations of nodes in the result set. The result set is all the various combinations of the joined results before they are combined into slices of objects. Since this is an aggregate operation, it will result in only one row and find the average value over all the rows in the result set, unless you also add a GroupBy statement.
Types ¶
This section is empty.