Documentation ¶
Index ¶
- func SplitConjunction(expr sql.Expression) []sql.Expression
- func SplitConjunctions(exprs []sql.Expression) []sql.Expression
- func SplitDisjunction(expr sql.Expression) []sql.Expression
- func SplitDisjunctions(exprs []sql.Expression) []sql.Expression
- type DoltgresTable
- func (dt *DoltgresTable) IndexedAccess(lookup sql.IndexLookup) sql.IndexedTable
- func (dt *DoltgresTable) LookupForExpressions(ctx *sql.Context, exprs ...sql.Expression) (sql.IndexLookup, *sql.FuncDepSet, sql.Expression, bool, error)
- func (dt *DoltgresTable) PreciseMatch() bool
- func (dt *DoltgresTable) SkipIndexCosting() bool
- func (dt *DoltgresTable) WithProjections(colNames []string) sql.Table
- type IndexBuilder
- type IndexedDoltgresTable
- func (idt *IndexedDoltgresTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)
- func (idt *IndexedDoltgresTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
- func (idt *IndexedDoltgresTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
- func (idt *IndexedDoltgresTable) PreciseMatch() bool
- func (idt *IndexedDoltgresTable) WithProjections(colNames []string) sql.Table
- type IndexedWritableDoltgresTable
- func (idt *IndexedWritableDoltgresTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)
- func (idt *IndexedWritableDoltgresTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
- func (idt *IndexedWritableDoltgresTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
- func (idt *IndexedWritableDoltgresTable) PreciseMatch() bool
- func (idt *IndexedWritableDoltgresTable) WithProjections(colNames []string) sql.Table
- type OperatorStrategyNumber
- type WritableDoltgresTable
- func (dt *WritableDoltgresTable) IndexedAccess(lookup sql.IndexLookup) sql.IndexedTable
- func (dt *WritableDoltgresTable) LookupForExpressions(ctx *sql.Context, exprs ...sql.Expression) (sql.IndexLookup, *sql.FuncDepSet, sql.Expression, bool, error)
- func (dt *WritableDoltgresTable) PreciseMatch() bool
- func (dt *WritableDoltgresTable) SkipIndexCosting() bool
- func (dt *WritableDoltgresTable) WithProjections(colNames []string) sql.Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SplitConjunction ¶
func SplitConjunction(expr sql.Expression) []sql.Expression
SplitConjunction breaks AND expressions into their left and right parts, recursively.
func SplitConjunctions ¶
func SplitConjunctions(exprs []sql.Expression) []sql.Expression
SplitConjunctions performs the same operation as SplitConjunction, except that it applies to a slice.
func SplitDisjunction ¶
func SplitDisjunction(expr sql.Expression) []sql.Expression
SplitDisjunction breaks OR expressions into their left and right parts, recursively. Also handles expressions that can be approximated as OR expressions, such as IN for tuples.
func SplitDisjunctions ¶
func SplitDisjunctions(exprs []sql.Expression) []sql.Expression
SplitDisjunctions performs the same operation as SplitDisjunction, except that it applies to a slice.
Types ¶
type DoltgresTable ¶
DoltgresTable is a wrapper around a DoltTable that allows for indexing operations to use the correct indexing interface for Postgres compatibility.
func (*DoltgresTable) IndexedAccess ¶
func (dt *DoltgresTable) IndexedAccess(lookup sql.IndexLookup) sql.IndexedTable
IndexedAccess implements the sql.IndexSearchableTable interface.
func (*DoltgresTable) LookupForExpressions ¶
func (dt *DoltgresTable) LookupForExpressions(ctx *sql.Context, exprs ...sql.Expression) (sql.IndexLookup, *sql.FuncDepSet, sql.Expression, bool, error)
LookupForExpressions implements the sql.IndexSearchableTable interface.
func (*DoltgresTable) PreciseMatch ¶
func (dt *DoltgresTable) PreciseMatch() bool
PreciseMatch implements the sql.IndexSearchableTable interface.
func (*DoltgresTable) SkipIndexCosting ¶
func (dt *DoltgresTable) SkipIndexCosting() bool
SkipIndexCosting implements the sql.IndexSearchableTable interface.
func (*DoltgresTable) WithProjections ¶
func (dt *DoltgresTable) WithProjections(colNames []string) sql.Table
WithProjections implements the sql.ProjectedTable interface.
type IndexBuilder ¶
type IndexBuilder struct {
// contains filtered or unexported fields
}
IndexBuilder builds an index following the same rules as a B-Tree index in Postgres.
func NewIndexBuilder ¶
NewIndexBuilder creates a new IndexBuilder for the given indexes.
func (*IndexBuilder) AddExpression ¶
func (ib *IndexBuilder) AddExpression(ctx *sql.Context, expr sql.Expression)
AddExpression adds the given expression to the builder.
func (*IndexBuilder) GetLookup ¶
func (ib *IndexBuilder) GetLookup(ctx *sql.Context) sql.IndexLookup
GetLookup returns a fully-formed index lookup. If an index lookup could not be created, then it will contain a nil index.
type IndexedDoltgresTable ¶
type IndexedDoltgresTable struct { *sqle.IndexedDoltTable // contains filtered or unexported fields }
IndexedDoltgresTable is a DoltgresTable with an associated index.
func (*IndexedDoltgresTable) LookupPartitions ¶
func (idt *IndexedDoltgresTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)
LookupPartitions implements the sql.IndexedTable interface.
func (*IndexedDoltgresTable) PartitionRows ¶
func (idt *IndexedDoltgresTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
PartitionRows implements the sql.Table interface.
func (*IndexedDoltgresTable) Partitions ¶
func (idt *IndexedDoltgresTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
Partitions implements the sql.Table interface.
func (*IndexedDoltgresTable) PreciseMatch ¶
func (idt *IndexedDoltgresTable) PreciseMatch() bool
PreciseMatch implements the sql.IndexSearchableTable interface.
func (*IndexedDoltgresTable) WithProjections ¶
func (idt *IndexedDoltgresTable) WithProjections(colNames []string) sql.Table
WithProjections implements the sql.ProjectedTable interface.
type IndexedWritableDoltgresTable ¶
type IndexedWritableDoltgresTable struct { *sqle.WritableIndexedDoltTable // contains filtered or unexported fields }
IndexedWritableDoltgresTable is a WritableDoltgresTable with an associated index.
func (*IndexedWritableDoltgresTable) LookupPartitions ¶
func (idt *IndexedWritableDoltgresTable) LookupPartitions(ctx *sql.Context, lookup sql.IndexLookup) (sql.PartitionIter, error)
LookupPartitions implements the sql.IndexedTable interface.
func (*IndexedWritableDoltgresTable) PartitionRows ¶
func (idt *IndexedWritableDoltgresTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)
PartitionRows implements the sql.Table interface.
func (*IndexedWritableDoltgresTable) Partitions ¶
func (idt *IndexedWritableDoltgresTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)
Partitions implements the sql.Table interface.
func (*IndexedWritableDoltgresTable) PreciseMatch ¶
func (idt *IndexedWritableDoltgresTable) PreciseMatch() bool
PreciseMatch implements the sql.IndexSearchableTable interface.
func (*IndexedWritableDoltgresTable) WithProjections ¶
func (idt *IndexedWritableDoltgresTable) WithProjections(colNames []string) sql.Table
WithProjections implements the sql.ProjectedTable interface.
type OperatorStrategyNumber ¶
type OperatorStrategyNumber uint8
OperatorStrategyNumber corresponds to the strategy number used within an operator class. These are specifically for B-Tree indexes, as other index types use different numbers to represent their strategy types. https://www.postgresql.org/docs/current/sql-createopclass.html
const ( OperatorStrategyNumber_Less OperatorStrategyNumber = iota + 1 OperatorStrategyNumber_LessEquals OperatorStrategyNumber_Equals OperatorStrategyNumber_GreaterEquals OperatorStrategyNumber_Greater )
func (OperatorStrategyNumber) IsMoreRestrictive ¶
func (strategy OperatorStrategyNumber) IsMoreRestrictive(other OperatorStrategyNumber) bool
IsMoreRestrictive returns whether the calling strategy is more restrictive than the given strategy. The more restrictive strategy is assumed to match fewer rows, however this may not be true depending on the values involved.
type WritableDoltgresTable ¶
type WritableDoltgresTable struct {
*sqle.WritableDoltTable
}
WritableDoltgresTable is a wrapper around a WritableDoltTable that allows for indexing operations to use the correct indexing interface for Postgres compatibility.
func (*WritableDoltgresTable) IndexedAccess ¶
func (dt *WritableDoltgresTable) IndexedAccess(lookup sql.IndexLookup) sql.IndexedTable
IndexedAccess implements the sql.IndexSearchableTable interface.
func (*WritableDoltgresTable) LookupForExpressions ¶
func (dt *WritableDoltgresTable) LookupForExpressions(ctx *sql.Context, exprs ...sql.Expression) (sql.IndexLookup, *sql.FuncDepSet, sql.Expression, bool, error)
LookupForExpressions implements the sql.IndexSearchableTable interface.
func (*WritableDoltgresTable) PreciseMatch ¶
func (dt *WritableDoltgresTable) PreciseMatch() bool
PreciseMatch implements the sql.IndexSearchableTable interface.
func (*WritableDoltgresTable) SkipIndexCosting ¶
func (dt *WritableDoltgresTable) SkipIndexCosting() bool
SkipIndexCosting implements the sql.IndexSearchableTable interface.
func (*WritableDoltgresTable) WithProjections ¶
func (dt *WritableDoltgresTable) WithProjections(colNames []string) sql.Table
WithProjections implements the sql.ProjectedTable interface.