Documentation ¶
Index ¶
- Constants
- Variables
- type BaseVisitor
- func (BaseVisitor) VisitBoolLiteral(v bool) error
- func (BaseVisitor) VisitBytesLiteral(v []byte) error
- func (BaseVisitor) VisitColumn(x ColumnExpr) error
- func (BaseVisitor) VisitFloatLiteral(v float64) error
- func (BaseVisitor) VisitIntLiteral(v int64) error
- func (BaseVisitor) VisitNullLiteral() error
- func (BaseVisitor) VisitOp(x OpExpr) error
- func (BaseVisitor) VisitQuery(q *Query) error
- func (BaseVisitor) VisitSplat(x SplatExpr) error
- func (BaseVisitor) VisitStringLiteral(v string) error
- func (BaseVisitor) VisitTable(x TableExpr) error
- func (BaseVisitor) VisitTimeLiteral(v time.Time) error
- func (BaseVisitor) VisitUintLiteral(v uint64) error
- type BoolLiteral
- func (lit BoolLiteral) Append(out []byte) []byte
- func (lit BoolLiteral) GoAppend(out []byte) []byte
- func (lit BoolLiteral) GoString() string
- func (lit BoolLiteral) IsValid() bool
- func (lit BoolLiteral) Kind() Kind
- func (lit BoolLiteral) Raw() bool
- func (lit BoolLiteral) String() string
- func (lit BoolLiteral) Type() Type
- func (lit BoolLiteral) Visit(v Visitor) error
- type BytesLiteral
- func (lit BytesLiteral) Append(out []byte) []byte
- func (lit BytesLiteral) GoAppend(out []byte) []byte
- func (lit BytesLiteral) GoString() string
- func (lit BytesLiteral) IsValid() bool
- func (lit BytesLiteral) Kind() Kind
- func (lit BytesLiteral) Raw() []byte
- func (lit BytesLiteral) String() string
- func (lit BytesLiteral) Type() Type
- func (lit BytesLiteral) Visit(v Visitor) error
- type Column
- func (c *Column) Append(out []byte) []byte
- func (c *Column) Expr() ColumnExpr
- func (c *Column) ExprUsing(tx TableExpr) ColumnExpr
- func (c *Column) GoAppend(out []byte) []byte
- func (c *Column) GoString() string
- func (c *Column) IsValid() bool
- func (c *Column) Name() string
- func (c *Column) Schema() *Schema
- func (c *Column) String() string
- func (c *Column) Table() *Table
- func (c *Column) Type() Type
- type ColumnExpr
- func (cx ColumnExpr) Append(out []byte) []byte
- func (cx ColumnExpr) Column() *Column
- func (cx ColumnExpr) GoAppend(out []byte) []byte
- func (cx ColumnExpr) GoString() string
- func (cx ColumnExpr) IsValid() bool
- func (cx ColumnExpr) Kind() Kind
- func (cx ColumnExpr) Name() string
- func (cx ColumnExpr) String() string
- func (cx ColumnExpr) Table() *Table
- func (cx ColumnExpr) TableExpr() TableExpr
- func (cx ColumnExpr) TableName() string
- func (cx ColumnExpr) Type() Type
- func (cx ColumnExpr) Visit(v Visitor) error
- type ColumnOption
- type ColumnOptions
- type Comparison
- func (enum Comparison) Append(out []byte) []byte
- func (enum Comparison) Eval(cmp int) bool
- func (enum Comparison) GoAppend(out []byte) []byte
- func (enum Comparison) GoString() string
- func (enum Comparison) IsValid() bool
- func (enum Comparison) MarshalText() ([]byte, error)
- func (enum *Comparison) Parse(input string) error
- func (enum Comparison) String() string
- func (enum *Comparison) UnmarshalText(input []byte) error
- type Desc
- type Expr
- type FloatLiteral
- func (lit FloatLiteral) Append(out []byte) []byte
- func (lit FloatLiteral) GoAppend(out []byte) []byte
- func (lit FloatLiteral) GoString() string
- func (lit FloatLiteral) IsValid() bool
- func (lit FloatLiteral) Kind() Kind
- func (lit FloatLiteral) Raw() float64
- func (lit FloatLiteral) String() string
- func (lit FloatLiteral) Type() Type
- func (lit FloatLiteral) Visit(v Visitor) error
- type Index
- func (i *Index) Append(out []byte) []byte
- func (i *Index) Column(index uint) *IndexedColumn
- func (i *Index) GoAppend(out []byte) []byte
- func (i *Index) GoString() string
- func (i *Index) IsValid() bool
- func (i *Index) Name() string
- func (i *Index) NumColumns() uint
- func (i *Index) Schema() *Schema
- func (i *Index) String() string
- func (i *Index) Table() *Table
- func (i *Index) Type() IndexType
- type IndexBuilder
- type IndexOption
- type IndexOptions
- type IndexType
- func (enum IndexType) Append(out []byte) []byte
- func (enum IndexType) GoAppend(out []byte) []byte
- func (enum IndexType) GoString() string
- func (enum IndexType) IsUnique() bool
- func (enum IndexType) IsValid() bool
- func (enum IndexType) MarshalText() ([]byte, error)
- func (enum *IndexType) Parse(input string) error
- func (enum IndexType) String() string
- func (enum *IndexType) UnmarshalText(input []byte) error
- type IndexedColumn
- func (ic *IndexedColumn) Append(out []byte) []byte
- func (ic *IndexedColumn) Column() *Column
- func (ic *IndexedColumn) GoAppend(out []byte) []byte
- func (ic *IndexedColumn) GoString() string
- func (ic *IndexedColumn) Index() *Index
- func (ic *IndexedColumn) IsDesc() bool
- func (ic *IndexedColumn) IsValid() bool
- func (ic *IndexedColumn) Schema() *Schema
- func (ic *IndexedColumn) String() string
- func (ic *IndexedColumn) Table() *Table
- type IndexedColumnOption
- type IndexedColumnOptions
- type IntLiteral
- func (lit IntLiteral) Append(out []byte) []byte
- func (lit IntLiteral) GoAppend(out []byte) []byte
- func (lit IntLiteral) GoString() string
- func (lit IntLiteral) IsValid() bool
- func (lit IntLiteral) Kind() Kind
- func (lit IntLiteral) Raw() int64
- func (lit IntLiteral) String() string
- func (lit IntLiteral) Type() Type
- func (lit IntLiteral) Visit(v Visitor) error
- type Join
- func (enum Join) Append(out []byte) []byte
- func (enum Join) GoAppend(out []byte) []byte
- func (enum Join) GoString() string
- func (enum Join) IsValid() bool
- func (enum Join) MarshalText() ([]byte, error)
- func (enum *Join) Parse(input string) error
- func (enum Join) String() string
- func (enum *Join) UnmarshalText(input []byte) error
- type Kind
- func (enum Kind) Append(out []byte) []byte
- func (enum Kind) GoAppend(out []byte) []byte
- func (enum Kind) GoString() string
- func (enum Kind) IsValid() bool
- func (enum Kind) MarshalText() ([]byte, error)
- func (enum *Kind) Parse(input string) error
- func (enum Kind) String() string
- func (enum *Kind) UnmarshalText(input []byte) error
- type NullLiteral
- func (lit NullLiteral) Append(out []byte) []byte
- func (lit NullLiteral) GoAppend(out []byte) []byte
- func (lit NullLiteral) GoString() string
- func (lit NullLiteral) IsValid() bool
- func (lit NullLiteral) Kind() Kind
- func (lit NullLiteral) String() string
- func (lit NullLiteral) Type() Type
- func (lit NullLiteral) Visit(v Visitor) error
- type OpExpr
- func (ox OpExpr) Append(out []byte) []byte
- func (ox OpExpr) GoAppend(out []byte) []byte
- func (ox OpExpr) GoString() string
- func (ox OpExpr) IsValid() bool
- func (ox OpExpr) Kind() Kind
- func (ox OpExpr) NumOperands() uint
- func (ox OpExpr) Operand(index uint) Expr
- func (ox OpExpr) Operator() Operator
- func (ox OpExpr) String() string
- func (ox OpExpr) Type() Type
- func (ox OpExpr) Visit(v Visitor) error
- type Operator
- func (enum Operator) Append(out []byte) []byte
- func (enum Operator) GoAppend(out []byte) []byte
- func (enum Operator) GoString() string
- func (enum Operator) IsValid() bool
- func (enum Operator) MarshalText() ([]byte, error)
- func (enum *Operator) Parse(input string) error
- func (enum Operator) String() string
- func (enum *Operator) UnmarshalText(input []byte) error
- type Option
- type OrderCriterion
- type Query
- func (q *Query) Append(out []byte) []byte
- func (q *Query) From() QueryFrom
- func (q *Query) GoAppend(out []byte) []byte
- func (q *Query) GoString() string
- func (q *Query) IsValid() bool
- func (q *Query) Kind() Kind
- func (q *Query) OrderBy() QueryOrderBy
- func (q *Query) Select() QuerySelect
- func (q *Query) String() string
- func (q *Query) Visit(v Visitor) error
- func (q *Query) Where() ValueExpr
- type QueryBuilder
- func (qb QueryBuilder) Build() *Query
- func (qb QueryBuilder) InnerJoin(table TableExpr, cond ValueExpr) QueryBuilder
- func (qb QueryBuilder) Join(join Join, table TableExpr, cond ValueExpr) QueryBuilder
- func (qb QueryBuilder) OuterJoin(table TableExpr, cond ValueExpr) QueryBuilder
- func (qb QueryBuilder) Select(selections ...ValueExpr) QueryBuilder
- func (qb QueryBuilder) Where(where ValueExpr) QueryBuilder
- type QueryColumn
- type QueryFrom
- type QueryJoin
- type QueryOrderBy
- type QuerySelect
- type Schema
- func (s *Schema) Append(out []byte) []byte
- func (s *Schema) ByName(name string) *Table
- func (s *Schema) GoAppend(out []byte) []byte
- func (s *Schema) GoString() string
- func (s *Schema) IsValid() bool
- func (s *Schema) NumTables() uint
- func (s *Schema) String() string
- func (s *Schema) Table(index uint) *Table
- type SchemaBuilder
- type SchemaOption
- type SchemaOptions
- type SplatExpr
- func (sx SplatExpr) Append(out []byte) []byte
- func (sx SplatExpr) GoAppend(out []byte) []byte
- func (sx SplatExpr) GoString() string
- func (sx SplatExpr) IsValid() bool
- func (sx SplatExpr) Kind() Kind
- func (sx SplatExpr) Name() string
- func (sx SplatExpr) String() string
- func (sx SplatExpr) Table() *Table
- func (sx SplatExpr) TableExpr() TableExpr
- func (sx SplatExpr) Visit(v Visitor) error
- type StringLiteral
- func (lit StringLiteral) Append(out []byte) []byte
- func (lit StringLiteral) GoAppend(out []byte) []byte
- func (lit StringLiteral) GoString() string
- func (lit StringLiteral) IsValid() bool
- func (lit StringLiteral) Kind() Kind
- func (lit StringLiteral) Raw() string
- func (lit StringLiteral) String() string
- func (lit StringLiteral) Type() Type
- func (lit StringLiteral) Visit(v Visitor) error
- type Stringer
- type Table
- func (t *Table) Append(out []byte) []byte
- func (t *Table) As(alias string) TableExpr
- func (t *Table) ByName(name string) *Column
- func (t *Table) Column(index uint) *Column
- func (t *Table) Expr() TableExpr
- func (t *Table) GoAppend(out []byte) []byte
- func (t *Table) GoString() string
- func (t *Table) Index(index uint) *Index
- func (t *Table) IndexByName(name string) *Index
- func (t *Table) IsValid() bool
- func (t *Table) Name() string
- func (t *Table) NumColumns() uint
- func (t *Table) NumIndices() uint
- func (t *Table) PrimaryKey() *Index
- func (t *Table) Schema() *Schema
- func (t *Table) String() string
- type TableBuilder
- func (tb TableBuilder) BuildTable() SchemaBuilder
- func (tb TableBuilder) Column(name string, t Type, opts ...ColumnOption) TableBuilder
- func (tb TableBuilder) Index(name string, opts ...IndexOption) IndexBuilder
- func (tb TableBuilder) PrimaryKey(opts ...IndexOption) IndexBuilder
- func (tb TableBuilder) Unique(name string, opts ...IndexOption) IndexBuilder
- type TableExpr
- func (tx TableExpr) Append(out []byte) []byte
- func (tx TableExpr) As(alias string) TableExpr
- func (tx TableExpr) GoAppend(out []byte) []byte
- func (tx TableExpr) GoString() string
- func (tx TableExpr) IsValid() bool
- func (tx TableExpr) Kind() Kind
- func (tx TableExpr) Name() string
- func (tx TableExpr) Splat() SplatExpr
- func (tx TableExpr) String() string
- func (tx TableExpr) Table() *Table
- func (tx TableExpr) Visit(v Visitor) error
- type TableOption
- type TableOptions
- type TimeLiteral
- func (lit TimeLiteral) Append(out []byte) []byte
- func (lit TimeLiteral) GoAppend(out []byte) []byte
- func (lit TimeLiteral) GoString() string
- func (lit TimeLiteral) IsValid() bool
- func (lit TimeLiteral) Kind() Kind
- func (lit TimeLiteral) Raw() time.Time
- func (lit TimeLiteral) String() string
- func (lit TimeLiteral) Type() Type
- func (lit TimeLiteral) Visit(v Visitor) error
- type Type
- func (enum Type) Append(out []byte) []byte
- func (enum Type) GoAppend(out []byte) []byte
- func (enum Type) GoString() string
- func (enum Type) IsValid() bool
- func (enum Type) MarshalText() ([]byte, error)
- func (enum Type) NarrowsTo(other Type) bool
- func (enum *Type) Parse(input string) error
- func (enum Type) String() string
- func (enum *Type) UnmarshalText(input []byte) error
- func (enum Type) WidensTo(other Type) bool
- type UintLiteral
- func (lit UintLiteral) Append(out []byte) []byte
- func (lit UintLiteral) GoAppend(out []byte) []byte
- func (lit UintLiteral) GoString() string
- func (lit UintLiteral) IsValid() bool
- func (lit UintLiteral) Kind() Kind
- func (lit UintLiteral) Raw() uint64
- func (lit UintLiteral) String() string
- func (lit UintLiteral) Type() Type
- func (lit UintLiteral) Visit(v Visitor) error
- type ValueExpr
- type Visitor
Constants ¶
View Source
const InvalidComparison = ^Comparison(0)
View Source
const InvalidIndexType = ^IndexType(0)
View Source
const InvalidJoin = ^Join(0)
View Source
const InvalidKind = ^Kind(0)
View Source
const InvalidOperator = ^Operator(0)
View Source
const InvalidType = ^Type(0)
Variables ¶
View Source
var ( Skip = errors.New("skip") NotImplemented = errors.New("not implemented") )
Functions ¶
This section is empty.
Types ¶
type BaseVisitor ¶
type BaseVisitor struct{}
func (BaseVisitor) VisitBoolLiteral ¶
func (BaseVisitor) VisitBoolLiteral(v bool) error
func (BaseVisitor) VisitBytesLiteral ¶
func (BaseVisitor) VisitBytesLiteral(v []byte) error
func (BaseVisitor) VisitColumn ¶
func (BaseVisitor) VisitColumn(x ColumnExpr) error
func (BaseVisitor) VisitFloatLiteral ¶
func (BaseVisitor) VisitFloatLiteral(v float64) error
func (BaseVisitor) VisitIntLiteral ¶
func (BaseVisitor) VisitIntLiteral(v int64) error
func (BaseVisitor) VisitNullLiteral ¶
func (BaseVisitor) VisitNullLiteral() error
func (BaseVisitor) VisitOp ¶
func (BaseVisitor) VisitOp(x OpExpr) error
func (BaseVisitor) VisitQuery ¶
func (BaseVisitor) VisitQuery(q *Query) error
func (BaseVisitor) VisitSplat ¶
func (BaseVisitor) VisitSplat(x SplatExpr) error
func (BaseVisitor) VisitStringLiteral ¶
func (BaseVisitor) VisitStringLiteral(v string) error
func (BaseVisitor) VisitTable ¶
func (BaseVisitor) VisitTable(x TableExpr) error
func (BaseVisitor) VisitTimeLiteral ¶
func (BaseVisitor) VisitTimeLiteral(v time.Time) error
func (BaseVisitor) VisitUintLiteral ¶
func (BaseVisitor) VisitUintLiteral(v uint64) error
type BoolLiteral ¶
type BoolLiteral bool
func (BoolLiteral) Append ¶
func (lit BoolLiteral) Append(out []byte) []byte
func (BoolLiteral) GoAppend ¶
func (lit BoolLiteral) GoAppend(out []byte) []byte
func (BoolLiteral) GoString ¶
func (lit BoolLiteral) GoString() string
func (BoolLiteral) IsValid ¶
func (lit BoolLiteral) IsValid() bool
func (BoolLiteral) Kind ¶
func (lit BoolLiteral) Kind() Kind
func (BoolLiteral) Raw ¶
func (lit BoolLiteral) Raw() bool
func (BoolLiteral) String ¶
func (lit BoolLiteral) String() string
func (BoolLiteral) Type ¶
func (lit BoolLiteral) Type() Type
func (BoolLiteral) Visit ¶
func (lit BoolLiteral) Visit(v Visitor) error
type BytesLiteral ¶
type BytesLiteral []byte
func (BytesLiteral) Append ¶
func (lit BytesLiteral) Append(out []byte) []byte
func (BytesLiteral) GoAppend ¶
func (lit BytesLiteral) GoAppend(out []byte) []byte
func (BytesLiteral) GoString ¶
func (lit BytesLiteral) GoString() string
func (BytesLiteral) IsValid ¶
func (lit BytesLiteral) IsValid() bool
func (BytesLiteral) Kind ¶
func (lit BytesLiteral) Kind() Kind
func (BytesLiteral) Raw ¶
func (lit BytesLiteral) Raw() []byte
func (BytesLiteral) String ¶
func (lit BytesLiteral) String() string
func (BytesLiteral) Type ¶
func (lit BytesLiteral) Type() Type
func (BytesLiteral) Visit ¶
func (lit BytesLiteral) Visit(v Visitor) error
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
func (*Column) Expr ¶
func (c *Column) Expr() ColumnExpr
func (*Column) ExprUsing ¶
func (c *Column) ExprUsing(tx TableExpr) ColumnExpr
type ColumnExpr ¶
type ColumnExpr struct {
// contains filtered or unexported fields
}
func (ColumnExpr) Append ¶
func (cx ColumnExpr) Append(out []byte) []byte
func (ColumnExpr) Column ¶
func (cx ColumnExpr) Column() *Column
func (ColumnExpr) GoAppend ¶
func (cx ColumnExpr) GoAppend(out []byte) []byte
func (ColumnExpr) GoString ¶
func (cx ColumnExpr) GoString() string
func (ColumnExpr) IsValid ¶
func (cx ColumnExpr) IsValid() bool
func (ColumnExpr) Kind ¶
func (cx ColumnExpr) Kind() Kind
func (ColumnExpr) Name ¶
func (cx ColumnExpr) Name() string
func (ColumnExpr) String ¶
func (cx ColumnExpr) String() string
func (ColumnExpr) Table ¶
func (cx ColumnExpr) Table() *Table
func (ColumnExpr) TableExpr ¶
func (cx ColumnExpr) TableExpr() TableExpr
func (ColumnExpr) TableName ¶
func (cx ColumnExpr) TableName() string
func (ColumnExpr) Type ¶
func (cx ColumnExpr) Type() Type
func (ColumnExpr) Visit ¶
func (cx ColumnExpr) Visit(v Visitor) error
type ColumnOption ¶
type ColumnOption = Option[ColumnOptions]
type ColumnOptions ¶
type ColumnOptions struct {
// contains filtered or unexported fields
}
type Comparison ¶
type Comparison byte
const ( Cmp_EQ Comparison = iota Cmp_NE Cmp_LT Cmp_LE Cmp_GE Cmp_GT Cmp_LTE = Cmp_LE Cmp_GTE = Cmp_GE )
const NumComparisons Comparison = 6
func (Comparison) Append ¶
func (enum Comparison) Append(out []byte) []byte
func (Comparison) Eval ¶
func (enum Comparison) Eval(cmp int) bool
func (Comparison) GoAppend ¶
func (enum Comparison) GoAppend(out []byte) []byte
func (Comparison) GoString ¶
func (enum Comparison) GoString() string
func (Comparison) IsValid ¶
func (enum Comparison) IsValid() bool
func (Comparison) MarshalText ¶
func (enum Comparison) MarshalText() ([]byte, error)
func (*Comparison) Parse ¶
func (enum *Comparison) Parse(input string) error
func (Comparison) String ¶
func (enum Comparison) String() string
func (*Comparison) UnmarshalText ¶
func (enum *Comparison) UnmarshalText(input []byte) error
type FloatLiteral ¶
type FloatLiteral float64
func (FloatLiteral) Append ¶
func (lit FloatLiteral) Append(out []byte) []byte
func (FloatLiteral) GoAppend ¶
func (lit FloatLiteral) GoAppend(out []byte) []byte
func (FloatLiteral) GoString ¶
func (lit FloatLiteral) GoString() string
func (FloatLiteral) IsValid ¶
func (lit FloatLiteral) IsValid() bool
func (FloatLiteral) Kind ¶
func (lit FloatLiteral) Kind() Kind
func (FloatLiteral) Raw ¶
func (lit FloatLiteral) Raw() float64
func (FloatLiteral) String ¶
func (lit FloatLiteral) String() string
func (FloatLiteral) Type ¶
func (lit FloatLiteral) Type() Type
func (FloatLiteral) Visit ¶
func (lit FloatLiteral) Visit(v Visitor) error
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (*Index) Column ¶
func (i *Index) Column(index uint) *IndexedColumn
func (*Index) NumColumns ¶
type IndexBuilder ¶
type IndexBuilder struct {
// contains filtered or unexported fields
}
func (IndexBuilder) Add ¶
func (ib IndexBuilder) Add(name string, opts ...IndexedColumnOption) IndexBuilder
func (IndexBuilder) BuildIndex ¶
func (ib IndexBuilder) BuildIndex() TableBuilder
func (IndexBuilder) Type ¶
func (ib IndexBuilder) Type(it IndexType) IndexBuilder
type IndexOption ¶
type IndexOption = Option[IndexOptions]
type IndexOptions ¶
type IndexOptions struct {
// contains filtered or unexported fields
}
type IndexType ¶
type IndexType byte
const NumIndexTypes IndexType = 3
func (IndexType) MarshalText ¶
func (*IndexType) UnmarshalText ¶
type IndexedColumn ¶
type IndexedColumn struct {
// contains filtered or unexported fields
}
func (*IndexedColumn) Append ¶
func (ic *IndexedColumn) Append(out []byte) []byte
func (*IndexedColumn) Column ¶
func (ic *IndexedColumn) Column() *Column
func (*IndexedColumn) GoAppend ¶
func (ic *IndexedColumn) GoAppend(out []byte) []byte
func (*IndexedColumn) GoString ¶
func (ic *IndexedColumn) GoString() string
func (*IndexedColumn) Index ¶
func (ic *IndexedColumn) Index() *Index
func (*IndexedColumn) IsDesc ¶
func (ic *IndexedColumn) IsDesc() bool
func (*IndexedColumn) IsValid ¶
func (ic *IndexedColumn) IsValid() bool
func (*IndexedColumn) Schema ¶
func (ic *IndexedColumn) Schema() *Schema
func (*IndexedColumn) String ¶
func (ic *IndexedColumn) String() string
func (*IndexedColumn) Table ¶
func (ic *IndexedColumn) Table() *Table
type IndexedColumnOption ¶
type IndexedColumnOption = Option[IndexedColumnOptions]
type IndexedColumnOptions ¶
type IndexedColumnOptions struct {
// contains filtered or unexported fields
}
type IntLiteral ¶
type IntLiteral int64
func (IntLiteral) Append ¶
func (lit IntLiteral) Append(out []byte) []byte
func (IntLiteral) GoAppend ¶
func (lit IntLiteral) GoAppend(out []byte) []byte
func (IntLiteral) GoString ¶
func (lit IntLiteral) GoString() string
func (IntLiteral) IsValid ¶
func (lit IntLiteral) IsValid() bool
func (IntLiteral) Kind ¶
func (lit IntLiteral) Kind() Kind
func (IntLiteral) Raw ¶
func (lit IntLiteral) Raw() int64
func (IntLiteral) String ¶
func (lit IntLiteral) String() string
func (IntLiteral) Type ¶
func (lit IntLiteral) Type() Type
func (IntLiteral) Visit ¶
func (lit IntLiteral) Visit(v Visitor) error
type Join ¶
type Join byte
const NumJoins Join = 2
func (Join) MarshalText ¶
func (*Join) UnmarshalText ¶
type Kind ¶
type Kind byte
const NumKinds Kind = 7
func (Kind) MarshalText ¶
func (*Kind) UnmarshalText ¶
type NullLiteral ¶
type NullLiteral struct{}
func (NullLiteral) Append ¶
func (lit NullLiteral) Append(out []byte) []byte
func (NullLiteral) GoAppend ¶
func (lit NullLiteral) GoAppend(out []byte) []byte
func (NullLiteral) GoString ¶
func (lit NullLiteral) GoString() string
func (NullLiteral) IsValid ¶
func (lit NullLiteral) IsValid() bool
func (NullLiteral) Kind ¶
func (lit NullLiteral) Kind() Kind
func (NullLiteral) String ¶
func (lit NullLiteral) String() string
func (NullLiteral) Type ¶
func (lit NullLiteral) Type() Type
func (NullLiteral) Visit ¶
func (lit NullLiteral) Visit(v Visitor) error
type OpExpr ¶
type OpExpr struct {
// contains filtered or unexported fields
}
func (OpExpr) NumOperands ¶
type Operator ¶
type Operator byte
const NumOperators Operator = 22
func (Operator) MarshalText ¶
func (*Operator) UnmarshalText ¶
type OrderCriterion ¶
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (*Query) OrderBy ¶
func (q *Query) OrderBy() QueryOrderBy
func (*Query) Select ¶
func (q *Query) Select() QuerySelect
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
func From ¶
func From(table TableExpr) QueryBuilder
func NoFrom ¶
func NoFrom() QueryBuilder
func (QueryBuilder) Build ¶
func (qb QueryBuilder) Build() *Query
func (QueryBuilder) InnerJoin ¶
func (qb QueryBuilder) InnerJoin(table TableExpr, cond ValueExpr) QueryBuilder
func (QueryBuilder) Join ¶
func (qb QueryBuilder) Join(join Join, table TableExpr, cond ValueExpr) QueryBuilder
func (QueryBuilder) OuterJoin ¶
func (qb QueryBuilder) OuterJoin(table TableExpr, cond ValueExpr) QueryBuilder
func (QueryBuilder) Select ¶
func (qb QueryBuilder) Select(selections ...ValueExpr) QueryBuilder
func (QueryBuilder) Where ¶
func (qb QueryBuilder) Where(where ValueExpr) QueryBuilder
type QueryColumn ¶
type QueryOrderBy ¶
type QueryOrderBy interface { IsEmpty() bool NumCriteria() uint Criterion(index uint) OrderCriterion }
type QuerySelect ¶
type QuerySelect interface { IsEmpty() bool NumColumns() uint Column(index uint) QueryColumn }
type SchemaBuilder ¶
type SchemaBuilder struct {
// contains filtered or unexported fields
}
func BuildSchema ¶
func BuildSchema(opts ...SchemaOption) SchemaBuilder
func (SchemaBuilder) Build ¶
func (sb SchemaBuilder) Build() *Schema
func (SchemaBuilder) Table ¶
func (sb SchemaBuilder) Table(name string, opts ...TableOption) TableBuilder
type SchemaOption ¶
type SchemaOption = Option[SchemaOptions]
type SchemaOptions ¶
type SchemaOptions struct {
// contains filtered or unexported fields
}
type StringLiteral ¶
type StringLiteral string
func (StringLiteral) Append ¶
func (lit StringLiteral) Append(out []byte) []byte
func (StringLiteral) GoAppend ¶
func (lit StringLiteral) GoAppend(out []byte) []byte
func (StringLiteral) GoString ¶
func (lit StringLiteral) GoString() string
func (StringLiteral) IsValid ¶
func (lit StringLiteral) IsValid() bool
func (StringLiteral) Kind ¶
func (lit StringLiteral) Kind() Kind
func (StringLiteral) Raw ¶
func (lit StringLiteral) Raw() string
func (StringLiteral) String ¶
func (lit StringLiteral) String() string
func (StringLiteral) Type ¶
func (lit StringLiteral) Type() Type
func (StringLiteral) Visit ¶
func (lit StringLiteral) Visit(v Visitor) error
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) IndexByName ¶
func (*Table) NumColumns ¶
func (*Table) NumIndices ¶
func (*Table) PrimaryKey ¶
type TableBuilder ¶
type TableBuilder struct {
// contains filtered or unexported fields
}
func (TableBuilder) BuildTable ¶
func (tb TableBuilder) BuildTable() SchemaBuilder
func (TableBuilder) Column ¶
func (tb TableBuilder) Column(name string, t Type, opts ...ColumnOption) TableBuilder
func (TableBuilder) Index ¶
func (tb TableBuilder) Index(name string, opts ...IndexOption) IndexBuilder
func (TableBuilder) PrimaryKey ¶
func (tb TableBuilder) PrimaryKey(opts ...IndexOption) IndexBuilder
func (TableBuilder) Unique ¶
func (tb TableBuilder) Unique(name string, opts ...IndexOption) IndexBuilder
type TableOption ¶
type TableOption = Option[TableOptions]
type TableOptions ¶
type TableOptions struct {
// contains filtered or unexported fields
}
type TimeLiteral ¶
func (TimeLiteral) Append ¶
func (lit TimeLiteral) Append(out []byte) []byte
func (TimeLiteral) GoAppend ¶
func (lit TimeLiteral) GoAppend(out []byte) []byte
func (TimeLiteral) GoString ¶
func (lit TimeLiteral) GoString() string
func (TimeLiteral) IsValid ¶
func (lit TimeLiteral) IsValid() bool
func (TimeLiteral) Kind ¶
func (lit TimeLiteral) Kind() Kind
func (TimeLiteral) Raw ¶
func (lit TimeLiteral) Raw() time.Time
func (TimeLiteral) String ¶
func (lit TimeLiteral) String() string
func (TimeLiteral) Type ¶
func (lit TimeLiteral) Type() Type
func (TimeLiteral) Visit ¶
func (lit TimeLiteral) Visit(v Visitor) error
type Type ¶
type Type byte
const NumTypes Type = 18
func (Type) MarshalText ¶
func (*Type) UnmarshalText ¶
type UintLiteral ¶
type UintLiteral uint64
func (UintLiteral) Append ¶
func (lit UintLiteral) Append(out []byte) []byte
func (UintLiteral) GoAppend ¶
func (lit UintLiteral) GoAppend(out []byte) []byte
func (UintLiteral) GoString ¶
func (lit UintLiteral) GoString() string
func (UintLiteral) IsValid ¶
func (lit UintLiteral) IsValid() bool
func (UintLiteral) Kind ¶
func (lit UintLiteral) Kind() Kind
func (UintLiteral) Raw ¶
func (lit UintLiteral) Raw() uint64
func (UintLiteral) String ¶
func (lit UintLiteral) String() string
func (UintLiteral) Type ¶
func (lit UintLiteral) Type() Type
func (UintLiteral) Visit ¶
func (lit UintLiteral) Visit(v Visitor) error
type Visitor ¶
type Visitor interface { VisitQuery(*Query) error VisitTable(TableExpr) error VisitSplat(SplatExpr) error VisitColumn(ColumnExpr) error VisitOp(OpExpr) error VisitNullLiteral() error VisitBoolLiteral(bool) error VisitIntLiteral(int64) error VisitUintLiteral(uint64) error VisitFloatLiteral(float64) error VisitStringLiteral(string) error VisitBytesLiteral([]byte) error VisitTimeLiteral(time.Time) error }
Source Files ¶
- column.go
- cond.go
- doc.go
- enum_comparison.go
- enum_indextype.go
- enum_join.go
- enum_kind.go
- enum_operator.go
- enum_qbs.go
- enum_sbs.go
- enum_type.go
- expr.go
- expr_column.go
- expr_literal.go
- expr_op.go
- expr_splat.go
- expr_table.go
- index.go
- index_column.go
- options.go
- query.go
- query_builder.go
- query_from.go
- query_orderby.go
- query_select.go
- schema.go
- schema_builder.go
- table.go
- util.go
- visitor.go
Click to show internal directories.
Click to hide internal directories.