Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvancedSearch ¶
type AdvancedSearch struct {
// contains filtered or unexported fields
}
AdvancedSearch represents the advanced search query
func NewAdvancedSearch ¶
func NewAdvancedSearch(query string) *AdvancedSearch
NewAdvancedSearch creates a new instance of AdvancedSearch
func (*AdvancedSearch) Parse ¶
func (as *AdvancedSearch) Parse() ([]Clause, []SortClause, error)
Parse parses the query string and returns a slice of Clause objects
type AdvancedSqlSearch ¶
type AdvancedSqlSearch struct {
// contains filtered or unexported fields
}
AdvancedSqlSearch extends the AdvancedSearch with column definitions
func NewAdvancedSqlSearch ¶
func NewAdvancedSqlSearch(query string, columns ...Column) (*AdvancedSqlSearch, error)
NewAdvancedSqlSearch creates a new instance of AdvancedSqlSearch
func (*AdvancedSqlSearch) SortStatement ¶ added in v1.46.0
func (as *AdvancedSqlSearch) SortStatement() (string, error)
SortStatement generates the SQL ORDER BY clause
func (*AdvancedSqlSearch) Sql ¶
func (as *AdvancedSqlSearch) Sql() (string, string, error)
Sql generates both the WHERE and ORDER BY clauses
func (*AdvancedSqlSearch) WhereStatement ¶ added in v1.46.0
func (as *AdvancedSqlSearch) WhereStatement() (string, error)
WhereStatement generates the SQL WHERE clause
type Column ¶ added in v1.46.0
type Column struct { Name string Type ColumnType Aliases []string }
Column represents a column in the database with a name, type, and possible aliases
type ColumnType ¶ added in v1.46.0
type ColumnType int
ColumnType represents the type of a column in the database
const ( StringType ColumnType = iota IntType FloatType BoolType DateType DateTimeType )
type ParseError ¶
ParseError represents a parsing error with context
func (*ParseError) Error ¶
func (e *ParseError) Error() string