Documentation ¶
Index ¶
- Constants
- type Constraint
- type Constraints
- type Join
- type Query
- func (q *Query) AlsoFrom(name, conjunction string) *Table
- func (q *Query) Build() (string, []any)
- func (q *Query) Distinct() *Query
- func (q *Query) From(name string) *Table
- func (q Query) HasConstraints() bool
- func (q *Query) Ignore() *Query
- func (q Query) IsJoin(tableName string) bool
- func (q *Query) Join(leftTable, rightTable string) *Join
- func (q *Query) Limit(limit, offset int) *Query
- func (q *Query) OrderAscending(field string) *Query
- func (q *Query) OrderDescending(field string) *Query
- func (q *Query) Table(name string) *Table
- func (q *Query) To(name string) *Table
- type SQLDB
- type SQLite
- type Table
- func (t *Table) AndWhere(field, condition string, value any) *Constraints
- func (t *Table) Fields(fields ...string) *Table
- func (t Table) HasField(name string) bool
- func (t *Table) OrWhere(field, condition string, value any) *Constraints
- func (t *Table) Set(field string, value any) *Table
- func (t *Table) Values(values ...any) *Table
- func (t *Table) Where(field, condition string, value any) *Constraints
Constants ¶
View Source
const ( ConditionEquals = "=" ConditionNotEquals = "<>" ConditionLessThan = "<" ConditionGreaterThan = ">" ConditionLessThanOrEquals = "<=" ConditionGreaterThanOrEquals = ">=" ConditionLike = "LIKE" ConditionNotLike = "NOT LIKE" ConditionIn = "IN" ConditionNotIn = "NOT IN" ConditionBetween = "BETWEEN" ConditionNotBetween = "NOT BETWEEN" ConditionIsNull = "IS NULL" ConditionIsNotNull = "IS NOT NULL" ConjunctionAnd = "AND" ConjunctionOr = "OR" )
View Source
const ( ActionSelect = "SELECT" ActionInsert = "INSERT" ActionUpdate = "UPDATE" ActionDelete = "DELETE" OrderDirectionAscending = "ASC" OrderDirectionDescending = "DESC" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraint ¶
type Constraint struct {
// contains filtered or unexported fields
}
type Constraints ¶
type Constraints struct {
// contains filtered or unexported fields
}
func (*Constraints) And ¶
func (c *Constraints) And(field, condition string, value any) *Constraints
func (*Constraints) Or ¶
func (c *Constraints) Or(field, condition string, value any) *Constraints
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (Query) HasConstraints ¶
func (*Query) OrderAscending ¶ added in v0.0.5
func (*Query) OrderDescending ¶ added in v0.0.5
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) AndWhere ¶ added in v0.0.9
func (t *Table) AndWhere(field, condition string, value any) *Constraints
Click to show internal directories.
Click to hide internal directories.