Documentation ¶
Index ¶
- func DoltKeyAndMappingFromSqlRow(ctx context.Context, vrw types.ValueReadWriter, r sql.Row, ...) (types.Tuple, map[uint64]types.Value, error)
- func DoltKeyValueAndMappingFromSqlRow(ctx context.Context, vrw types.ValueReadWriter, r sql.Row, ...) (types.Tuple, types.Tuple, map[uint64]types.Value, error)
- func DoltRowToSqlRow(doltRow row.Row, sch schema.Schema) (sql.Row, error)
- func FromDoltSchema(tableName string, sch schema.Schema) (sql.PrimaryKeySchema, error)
- func GetColNamesFromSqlSchema(sqlSch sql.Schema) []string
- func MapToSqlIter(ctx context.Context, sch schema.Schema, data types.Map) (sql.RowIter, error)
- func NewStaticErrorRowIter(err error) sql.RowIter
- func NewStaticErrorTable(orig sql.Table, err error) sql.Table
- func ParseCreateTableStatement(ctx context.Context, root *doltdb.RootValue, query string) (string, schema.Schema, error)
- func SqlColToStr(ctx context.Context, col interface{}) string
- func SqlRowToDoltRow(ctx context.Context, vrw types.ValueReadWriter, r sql.Row, ...) (row.Row, error)
- func ToDoltCol(tag uint64, col *sql.Column) (schema.Column, error)
- func ToDoltSchema(ctx context.Context, root *doltdb.RootValue, tableName string, ...) (schema.Schema, error)
- func WriteEWKBHeader(v interface{}, buf []byte)
- func WriteEWKBLineData(l sql.Linestring, buf []byte)
- func WriteEWKBPointData(p sql.Point, buf []byte)
- func WriteEWKBPolyData(p sql.Polygon, buf []byte)
- type StaticErrorEditor
- func (e *StaticErrorEditor) Close(*sql.Context) error
- func (e *StaticErrorEditor) Delete(*sql.Context, sql.Row) error
- func (e *StaticErrorEditor) DiscardChanges(ctx *sql.Context, errorEncountered error) error
- func (e *StaticErrorEditor) Insert(*sql.Context, sql.Row) error
- func (e *StaticErrorEditor) SetAutoIncrementValue(*sql.Context, uint64) error
- func (e *StaticErrorEditor) StatementBegin(ctx *sql.Context)
- func (e *StaticErrorEditor) StatementComplete(ctx *sql.Context) error
- func (e *StaticErrorEditor) Update(*sql.Context, sql.Row, sql.Row) error
- func (e *StaticErrorEditor) WithIndexLookup(lookup sql.IndexLookup) sql.Table
- type StaticErrorRowIter
- type StaticErrorTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoltKeyAndMappingFromSqlRow ¶
func DoltKeyAndMappingFromSqlRow(ctx context.Context, vrw types.ValueReadWriter, r sql.Row, doltSchema schema.Schema) (types.Tuple, map[uint64]types.Value, error)
DoltKeyAndMappingFromSqlRow converts a sql.Row to key tuple and keeps a mapping from tag to value that can be used to speed up index key generation for foreign key checks.
func DoltKeyValueAndMappingFromSqlRow ¶
func DoltKeyValueAndMappingFromSqlRow(ctx context.Context, vrw types.ValueReadWriter, r sql.Row, doltSchema schema.Schema) (types.Tuple, types.Tuple, map[uint64]types.Value, error)
DoltKeyValueAndMappingFromSqlRow converts a sql.Row to key and value tuples and keeps a mapping from tag to value that can be used to speed up index key generation for foreign key checks.
func DoltRowToSqlRow ¶
DoltRowToSqlRow constructs a go-mysql-server sql.Row from a Dolt row.Row.
func FromDoltSchema ¶
func MapToSqlIter ¶
MapToSqlIter returns a map reader that converts all rows to sql rows, creating a sql row iterator.
func NewStaticErrorRowIter ¶
func ParseCreateTableStatement ¶
func ParseCreateTableStatement(ctx context.Context, root *doltdb.RootValue, query string) (string, schema.Schema, error)
ParseCreateTableStatement will parse a CREATE TABLE ddl statement and use it to create a Dolt Schema. A RootValue is used to generate unique tags for the Schema
func SqlColToStr ¶
SqlColToStr is a utility function for converting a sql column of type interface{} to a string
func SqlRowToDoltRow ¶
func SqlRowToDoltRow(ctx context.Context, vrw types.ValueReadWriter, r sql.Row, doltSchema schema.Schema) (row.Row, error)
SqlRowToDoltRow constructs a Dolt row.Row from a go-mysql-server sql.Row.
func ToDoltSchema ¶
func ToDoltSchema( ctx context.Context, root *doltdb.RootValue, tableName string, sqlSchema sql.PrimaryKeySchema, headRoot *doltdb.RootValue, ) (schema.Schema, error)
ToDoltSchema returns a dolt Schema from the sql schema given, suitable for use in creating a table. For result set schemas, see ToDoltResultSchema.
func WriteEWKBHeader ¶
func WriteEWKBHeader(v interface{}, buf []byte)
WriteEWKBHeader writes the SRID, endianness, and type to the byte buffer This function assumes v is a valid spatial type
func WriteEWKBLineData ¶
func WriteEWKBLineData(l sql.Linestring, buf []byte)
WriteEWKBLineData converts a Line into a byte array in EWKB format
func WriteEWKBPointData ¶
WriteEWKBPointData converts a Point into a byte array in EWKB format Very similar to function in GMS
func WriteEWKBPolyData ¶
WriteEWKBPolyData converts a Polygon into a byte array in EWKB format
Types ¶
type StaticErrorEditor ¶
type StaticErrorEditor struct {
// contains filtered or unexported fields
}
func NewStaticErrorEditor ¶
func NewStaticErrorEditor(err error) *StaticErrorEditor
func (*StaticErrorEditor) DiscardChanges ¶
func (e *StaticErrorEditor) DiscardChanges(ctx *sql.Context, errorEncountered error) error
func (*StaticErrorEditor) SetAutoIncrementValue ¶
func (e *StaticErrorEditor) SetAutoIncrementValue(*sql.Context, uint64) error
func (*StaticErrorEditor) StatementBegin ¶
func (e *StaticErrorEditor) StatementBegin(ctx *sql.Context)
func (*StaticErrorEditor) StatementComplete ¶
func (e *StaticErrorEditor) StatementComplete(ctx *sql.Context) error
func (*StaticErrorEditor) WithIndexLookup ¶
func (e *StaticErrorEditor) WithIndexLookup(lookup sql.IndexLookup) sql.Table
type StaticErrorRowIter ¶
type StaticErrorRowIter struct {
// contains filtered or unexported fields
}
type StaticErrorTable ¶
func (*StaticErrorTable) PartitionRows ¶
func (*StaticErrorTable) Partitions ¶
func (t *StaticErrorTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)