Documentation ¶
Index ¶
Constants ¶
View Source
const ( OptionColumn = `column` OptionTable = `table` )
Variables ¶
View Source
var ( ErrBadQueryValue = errors.New("structquery: query must be struct or a pointer to struct") ErrBadQueryType = errors.New("structquery: query type not registered") )
Functions ¶
This section is empty.
Types ¶
type Field ¶
func ParseStruct ¶
type QueryType ¶
type QueryType string
const ( Empty QueryType = "" Eq QueryType = "eq" Neq QueryType = "neq" Like QueryType = "like" LLike QueryType = "llike" RLike QueryType = "rlike" In QueryType = "in" NotIn QueryType = "not_in" Gt QueryType = "gt" Gte QueryType = "gte" Lt QueryType = "lt" Lte QueryType = "lte" JSONExtractEq QueryType = "json_extract_eq" JSONExtractLike QueryType = "json_extract_like" MySQLJSONContains QueryType = "my_json_contains" UnsafeRawSQL QueryType = "unsaferaw" // dangerous )
type Queryer ¶
func NewQueryer ¶
func NewQueryer() *Queryer
func (*Queryer) Register ¶
func (q *Queryer) Register(t QueryType, fn QueryerFunc)
type QueryerFunc ¶
type QueryerFunc func(f Field) clause.Expression
Click to show internal directories.
Click to hide internal directories.