Documentation ¶
Index ¶
- Constants
- func AsValue(t Token) (object interface{})
- func Errorf(s string, v ...interface{}) (err error)
- type Assert
- type Error
- type Field
- type FieldSelector
- type Filter
- func (f *Filter) Delete(name string) (found bool)
- func (f *Filter) Empty() bool
- func (f *Filter) Field(name string) (field Field, found bool)
- func (f *Filter) Fields(name string) (fields []Field)
- func (f *Filter) Resource(r string) (filter Filter)
- func (f *Filter) Validate(assertions []Assert) (err error)
- func (f *Filter) Where(in *gorm.DB, selector ...string) (out *gorm.DB)
- func (f *Filter) With(selector ...string) (out Filter)
- type Lexer
- type List
- type Operator
- type Parser
- type Predicate
- type Quoted
- type Reader
- type Token
- type Value
Constants ¶
View Source
const ( EOF = 0 COLON = ':' COMMA = ',' AND = COMMA OR = '|' EQ = '=' LIKE = '~' NOT = '!' LT = '<' GT = '>' QUOTE = '"' SQUOTE = '\'' ESCAPE = '\\' SPACE = ' ' LPAREN = '(' RPAREN = ')' )
View Source
const ( LITERAL = 0x01 STRING = 0x02 OPERATOR = 0x03 )
View Source
const (
QueryParam = "filter"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Field ¶
type Field struct {
Predicate
}
Field predicate.
type FieldSelector ¶
type FieldSelector []string
FieldSelector fields. fields with '+' prefix are included. fields with '-' prefix are excluded. Fields scoped to a resource are excluded. An empty selector includes ALL.
func (FieldSelector) Match ¶
func (r FieldSelector) Match(f *Field) (m bool)
Match fields by qualified name.
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter is a collection of predicates.
Click to show internal directories.
Click to hide internal directories.