Documentation ¶
Overview ¶
nolint:gocognit
Index ¶
- Variables
- func NewAlterCollectionWith(schema *query.Schema) (document.Schema, error)
- func NewCollectionWith(schema *query.Schema) (document.Schema, error)
- func NewElementWith(col *query.ColumnDefinition) (document.Element, error)
- func NewIndexWith(s document.Schema, def *query.IndexDefinition) (document.Index, error)
- func NewKeyFromCond(dbName string, schema document.Schema, cond *query.Condition) (store.Key, document.IndexType, error)
- func NewLimitWith(limit *query.Limit) []store.Option
- func NewObjectFromInsert(dbName string, schema document.Schema, stmt *query.Insert) (document.Key, document.MapObject, error)
- func NewOrderWith(orderBy query.OrderBy) []store.Option
- func NewPrimaryIndexWith(elem document.Element) (document.Index, error)
- func NewResultFrom(dbName string, schema document.Schema, objs []document.Object) (*mysql.Result, error)
- func NewService() query.Service
- func NewValueFrom(elem document.Element, val any) (mysql.Value, error)
- type Service
- func (service *Service) AlterDatabase(conn *mysql.Conn, stmt *query.Database) (*mysql.Result, error)
- func (service *Service) AlterTable(conn *mysql.Conn, stmt *query.Schema) (*mysql.Result, error)
- func (service *Service) Begin(conn *mysql.Conn, stmt *query.Begin) (*mysql.Result, error)
- func (service *Service) Commit(conn *mysql.Conn, stmt *query.Commit) (*mysql.Result, error)
- func (service *Service) CreateDatabase(conn *mysql.Conn, stmt *query.Database) (*mysql.Result, error)
- func (service *Service) CreateTable(conn *mysql.Conn, stmt *query.Schema) (*mysql.Result, error)
- func (service *Service) Delete(conn *mysql.Conn, stmt *query.Delete) (*mysql.Result, error)
- func (service *Service) DropDatabase(conn *mysql.Conn, stmt *query.Database) (*mysql.Result, error)
- func (service *Service) DropTable(conn *mysql.Conn, stmt *query.Schema) (*mysql.Result, error)
- func (service *Service) Insert(conn *mysql.Conn, stmt *query.Insert) (*mysql.Result, error)
- func (service *Service) RenameTable(conn *mysql.Conn, stmt *query.Schema) (*mysql.Result, error)
- func (service *Service) Rollback(conn *mysql.Conn, stmt *query.Rollback) (*mysql.Result, error)
- func (service *Service) Select(conn *mysql.Conn, stmt *query.Select) (*mysql.Result, error)
- func (service *Service) ServiceName() string
- func (service *Service) ShowDatabases(conn *mysql.Conn) (*mysql.Result, error)
- func (service *Service) ShowTables(conn *mysql.Conn, database string) (*mysql.Result, error)
- func (service *Service) Start() error
- func (service *Service) Stop() error
- func (service *Service) TruncateTable(conn *mysql.Conn, stmt *query.Schema) (*mysql.Result, error)
- func (service *Service) Update(conn *mysql.Conn, stmt *query.Update) (*mysql.Result, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NewAlterCollectionWith ¶ added in v1.0.0
NewAlterCollectionWith creates an alter schema from the specified schema object.
func NewCollectionWith ¶ added in v0.9.0
NewCollectionWith creates a new schema from the specified schema object.
func NewElementWith ¶
func NewElementWith(col *query.ColumnDefinition) (document.Element, error)
NewIndexWith creates an index from the specified index object.
func NewIndexWith ¶
NewIndexWith creates an index from the specified coulumn definition.
func NewKeyFromCond ¶
func NewKeyFromCond(dbName string, schema document.Schema, cond *query.Condition) (store.Key, document.IndexType, error)
NewKeyFromCond returns a key for the specified condition.
func NewLimitWith ¶ added in v1.0.0
NewLimitWith returns a new store option with the specified limit option.
func NewObjectFromInsert ¶
func NewObjectFromInsert(dbName string, schema document.Schema, stmt *query.Insert) (document.Key, document.MapObject, error)
NewObjectFromInsert returns a new object from the specified schema and columns.
func NewOrderWith ¶ added in v1.0.0
NewOrderWith returns a new store option with the specified orderby option.
func NewPrimaryIndexWith ¶
NewPrimaryIndexWith creates an index from the specified element.
Types ¶
type Service ¶
Service represents a new MySQL service instance.
func (*Service) AlterDatabase ¶
func (service *Service) AlterDatabase(conn *mysql.Conn, stmt *query.Database) (*mysql.Result, error)
AlterDatabase should handle a ALTER database statement.
func (*Service) AlterTable ¶
AlterTable should handle a ALTER table statement.
func (*Service) CreateDatabase ¶
func (service *Service) CreateDatabase(conn *mysql.Conn, stmt *query.Database) (*mysql.Result, error)
CreateDatabase should handle a CREATE database statement.
func (*Service) CreateTable ¶
CreateTable should handle a CREATE table statement.
func (*Service) DropDatabase ¶
DropDatabase should handle a DROP database statement.
func (*Service) RenameTable ¶
RenameTable should handle a RENAME table statement.
func (*Service) ServiceName ¶
ServiceName returns the plug-in service name.
func (*Service) ShowDatabases ¶
ShowDatabases should handle a SHOW DATABASES statement.
func (*Service) ShowTables ¶
ShowTables should handle a SHOW TABLES statement.
func (*Service) TruncateTable ¶
TruncateTable should handle a TRUNCATE table statement.