Versions in this module Expand all Collapse all v1 v1.0.1 Jul 31, 2024 Changes in this version + type Database struct + func (d Database) AllViews(ctx *sql.Context) ([]sql.ViewDefinition, error) + func (d Database) CreateTable(ctx *sql.Context, name string, schema sql.PrimaryKeySchema, ...) error + func (d Database) CreateTrigger(ctx *sql.Context, definition sql.TriggerDefinition) error + func (d Database) CreateView(ctx *sql.Context, name string, selectStatement, createViewStmt string) error + func (d Database) DropEvent(ctx *sql.Context, name string) error + func (d Database) DropStoredProcedure(ctx *sql.Context, name string) error + func (d Database) DropTable(ctx *sql.Context, name string) error + func (d Database) DropTrigger(ctx *sql.Context, name string) error + func (d Database) DropView(ctx *sql.Context, name string) error + func (d Database) GetEvent(ctx *sql.Context, name string) (sql.EventDefinition, bool, error) + func (d Database) GetEvents(_ *sql.Context) ([]sql.EventDefinition, interface{}, error) + func (d Database) GetStoredProcedure(ctx *sql.Context, name string) (sql.StoredProcedureDetails, bool, error) + func (d Database) GetStoredProcedures(ctx *sql.Context) ([]sql.StoredProcedureDetails, error) + func (d Database) GetTableInsensitive(ctx *sql.Context, tblName string) (sql.Table, bool, error) + func (d Database) GetTableNames(ctx *sql.Context) ([]string, error) + func (d Database) GetTriggers(ctx *sql.Context) ([]sql.TriggerDefinition, error) + func (d Database) GetViewDefinition(ctx *sql.Context, viewName string) (sql.ViewDefinition, bool, error) + func (d Database) Name() string + func (d Database) NeedsToReloadEvents(_ *sql.Context, _ interface{}) (bool, error) + func (d Database) RenameTable(ctx *sql.Context, oldName, newName string) error + func (d Database) SaveEvent(ctx *sql.Context, event sql.EventDefinition) (bool, error) + func (d Database) SaveStoredProcedure(ctx *sql.Context, spd sql.StoredProcedureDetails) error + func (d Database) UpdateEvent(_ *sql.Context, originalName string, event sql.EventDefinition) (bool, error) + func (d Database) UpdateLastExecuted(ctx *sql.Context, eventName string, lastExecuted time.Time) error + type MySQLDatabase struct + type MySQLHarness struct + func NewMySQLHarness(user string, password string, host string, port int) (*MySQLHarness, error) + func (m *MySQLHarness) Cleanup() error + func (m *MySQLHarness) Close() + func (m *MySQLHarness) NewContext() *sql.Context + func (m *MySQLHarness) NewContextWithClient(client sql.Client) *sql.Context + func (m *MySQLHarness) NewDatabase(name string) sql.Database + func (m *MySQLHarness) NewDatabaseProvider() sql.MutableDatabaseProvider + func (m *MySQLHarness) NewDatabases(names ...string) []sql.Database + func (m *MySQLHarness) NewEngine(t *testing.T) (enginetest.QueryEngine, error) + func (m *MySQLHarness) NewTable(db sql.Database, name string, schema sql.PrimaryKeySchema) (sql.Table, error) + func (m *MySQLHarness) Parallelism() int + func (m *MySQLHarness) Provider() sql.MutableDatabaseProvider + func (m *MySQLHarness) QueriesToSkip(queries ...string) + func (m *MySQLHarness) Setup(setupData ...[]setup.SetupScript) + func (m *MySQLHarness) SkipQueryTest(query string) bool + func (m *MySQLHarness) SupportsForeignKeys() bool + func (m *MySQLHarness) SupportsKeylessTables() bool + func (m *MySQLHarness) SupportsNativeIndexCreation() bool + type MySQLShim struct + func NewMySQLShim(user string, password string, host string, port int) (*MySQLShim, error) + func (m *MySQLShim) AllDatabases(*sql.Context) []sql.Database + func (m *MySQLShim) Close() + func (m *MySQLShim) CreateDatabase(ctx *sql.Context, name string) error + func (m *MySQLShim) Database(ctx *sql.Context, name string) (sql.Database, error) + func (m *MySQLShim) DropDatabase(ctx *sql.Context, name string) error + func (m *MySQLShim) Exec(db string, query string) error + func (m *MySQLShim) HasDatabase(ctx *sql.Context, name string) bool + func (m *MySQLShim) Query(db string, query string) (sql.RowIter, error) + func (m *MySQLShim) QueryRows(db string, query string) ([]sql.Row, error) + type MySQLTable struct + type Table struct + func (t Table) AddColumn(ctx *sql.Context, column *sql.Column, order *sql.ColumnOrder) error + func (t Table) AddForeignKey(ctx *sql.Context, fk sql.ForeignKeyConstraint) error + func (t Table) Close(ctx *sql.Context) error + func (t Table) Collation() sql.CollationID + func (t Table) CreateCheck(ctx *sql.Context, check *sql.CheckDefinition) error + func (t Table) CreateIndex(ctx *sql.Context, idx sql.IndexDef) error + func (t Table) CreateIndexForForeignKey(ctx *sql.Context, idx sql.IndexDef) error + func (t Table) CreatePrimaryKey(ctx *sql.Context, columns []sql.IndexColumn) error + func (t Table) DataLength(ctx *sql.Context) (uint64, error) + func (t Table) Deleter(ctx *sql.Context) sql.RowDeleter + func (t Table) DropCheck(ctx *sql.Context, chName string) error + func (t Table) DropColumn(ctx *sql.Context, columnName string) error + func (t Table) DropForeignKey(ctx *sql.Context, fkName string) error + func (t Table) DropIndex(ctx *sql.Context, indexName string) error + func (t Table) DropPrimaryKey(ctx *sql.Context) error + func (t Table) GetChecks(ctx *sql.Context) ([]sql.CheckDefinition, error) + func (t Table) GetDeclaredForeignKeys(ctx *sql.Context) ([]sql.ForeignKeyConstraint, error) + func (t Table) GetForeignKeyEditor(ctx *sql.Context) sql.ForeignKeyEditor + func (t Table) GetIndexes(ctx *sql.Context) ([]sql.Index, error) + func (t Table) GetReferencedForeignKeys(ctx *sql.Context) ([]sql.ForeignKeyConstraint, error) + func (t Table) IndexedAccess(sql.IndexLookup) sql.IndexedTable + func (t Table) IndexedPartitions(ctx *sql.Context, _ sql.IndexLookup) (sql.PartitionIter, error) + func (t Table) Inserter(ctx *sql.Context) sql.RowInserter + func (t Table) ModifyColumn(ctx *sql.Context, columnName string, column *sql.Column, ...) error + func (t Table) Name() string + func (t Table) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error) + func (t Table) Partitions(ctx *sql.Context) (sql.PartitionIter, error) + func (t Table) Pks() []sql.IndexColumn + func (t Table) PreciseMatch() bool + func (t Table) PrimaryKeySchema() sql.PrimaryKeySchema + func (t Table) RenameIndex(ctx *sql.Context, fromIndexName string, toIndexName string) error + func (t Table) Replacer(ctx *sql.Context) sql.RowReplacer + func (t Table) RowCount(ctx *sql.Context) (uint64, bool, error) + func (t Table) Schema() sql.Schema + func (t Table) SetForeignKeyResolved(ctx *sql.Context, fkName string) error + func (t Table) String() string + func (t Table) Truncate(ctx *sql.Context) (int, error) + func (t Table) UpdateForeignKey(ctx *sql.Context, fkName string, fkDef sql.ForeignKeyConstraint) error + func (t Table) Updater(ctx *sql.Context) sql.RowUpdater