Documentation
¶
Index ¶
Constants ¶
View Source
const ( Gt = ">" Gte = ">=" Eq = "=" Neq = "!=" Lt = "<" Lte = "<=" In = "in" Nin = "not in" IsNull = "isnull" IsNotNull = "isnotnull" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
// Comparator may be a string referring to a built in or a function taking an argument matching the
// column type and returning a bool bool.
//
// IMPORTANT: For pointer and reference types you must not assume that the data passed argument
// to this function is valid after the function returns. If you plan to keep it around you need
// to take a copy of the data.
Comparator interface{}
// Column is the name to filter by
Column string
// Arg is passed as argument to built in functions.
Arg interface{}
// Inverse can be set to true to negate the filter.
Inverse bool
}
Filter represents a filter to apply to a QFrame.
Example using a built in comparator on a float column:
Filter{Comparator: ">", Column: "COL1", Arg: 1.2}
Same example as above but with a custom function:
Filter{Comparator: func(f float64) bool { return f > 1.2 }, Column: "COL1"}
Click to show internal directories.
Click to hide internal directories.