Versions in this module Expand all Collapse all v1 v1.0.1 Nov 5, 2023 v1.0.0 Nov 5, 2023 Changes in this version + var ErrShardingKeyNotAllowNil = errors.New("sharding key does not allow nil") + type DeleteQuery struct + IsAllShardQuery bool + IsDeleteTable bool + Stmt *vtparser.Delete + func NewDeleteQuery(queryBase *QueryBase, stmt *vtparser.Delete) *DeleteQuery + type Identifier int64 + const UnknownID + type InsertQuery struct + ColumnValues []func() *vtparser.SQLVal + Stmt *vtparser.Insert + func NewInsertQuery(queryBase *QueryBase, stmt *vtparser.Insert) *InsertQuery + func (q *InsertQuery) NextSequenceID() Identifier + func (q *InsertQuery) SetNextSequenceID(id int64) + func (q *InsertQuery) String() string + type Parser struct + func New() (*Parser, error) + func (p *Parser) Parse(queryText string, args ...interface{}) (Query, error) + func (p *Parser) ValueIndexByValArg(arg *vtparser.SQLVal) int + type Query interface + QueryType func() QueryType + Table func() string + type QueryBase struct + Args []interface{} + ShardKeyID Identifier + ShardKeyIDPlaceholderIndex int + Stmt vtparser.Statement + TableName string + Text string + Type QueryType + func NewQueryBase(stmt vtparser.Statement, query string, args []interface{}) *QueryBase + func (q *QueryBase) IsNotFoundShardKeyID() bool + func (q *QueryBase) QueryType() QueryType + func (q *QueryBase) Table() string + type QueryType int + const CreateTable + const Delete + const Drop + const Insert + const Select + const Show + const TruncateTable + const Unknown + const Update + func (t QueryType) IsWriteQuery() bool + func (t QueryType) String() string