Versions in this module Expand all Collapse all v1 v1.1.1 Nov 5, 2022 Changes in this version + func Errorf(s string, v ...interface{}) + func Logf(s string, v ...interface{}) + func MysqlSchema(ctx context.Context, db DB) (string, error) + func MysqlViewCreate(ctx context.Context, db DB, schema, id string, query []string) (sql.Result, error) + func MysqlViewDrop(ctx context.Context, db DB, schema, id string) (sql.Result, error) + func OracleSchema(ctx context.Context, db DB) (string, error) + func OracleViewCreate(ctx context.Context, db DB, schema, id string, query []string) (sql.Result, error) + func OracleViewDrop(ctx context.Context, db DB, schema, id string) (sql.Result, error) + func OracleViewTruncate(ctx context.Context, db DB, schema, id string) (sql.Result, error) + func PostgresSchema(ctx context.Context, db DB) (string, error) + func PostgresViewCreate(ctx context.Context, db DB, schema, id string, query []string) (sql.Result, error) + func PostgresViewDrop(ctx context.Context, db DB, schema, id string) (sql.Result, error) + func PostgresViewSchema(ctx context.Context, db DB, id string) (string, error) + func SetErrorLogger(logger interface{}) + func SetLogger(logger interface{}) + func Sqlite3Schema(ctx context.Context, db DB) (string, error) + func Sqlite3ViewCreate(ctx context.Context, db DB, schema, id string, query []string) (sql.Result, error) + func Sqlite3ViewDrop(ctx context.Context, db DB, schema, id string) (sql.Result, error) + func SqlserverSchema(ctx context.Context, db DB) (string, error) + func SqlserverViewCreate(ctx context.Context, db DB, schema, id string, query []string) (sql.Result, error) + func SqlserverViewDrop(ctx context.Context, db DB, schema, id string) (sql.Result, error) + type Column struct + ColumnName string + Comment sql.NullString + DataType string + DefaultValue sql.NullString + FieldOrdinal int + IsPrimaryKey bool + NotNull bool + func MysqlTableColumns(ctx context.Context, db DB, schema, table string) ([]*Column, error) + func OracleTableColumns(ctx context.Context, db DB, schema, table string) ([]*Column, error) + func PostgresTableColumns(ctx context.Context, db DB, schema, table string, sys bool) ([]*Column, error) + func Sqlite3TableColumns(ctx context.Context, db DB, schema, table string) ([]*Column, error) + func SqlserverTableColumns(ctx context.Context, db DB, schema, table string) ([]*Column, error) + type DB interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type Enum struct + EnumName string + func MysqlEnums(ctx context.Context, db DB, schema string) ([]*Enum, error) + func PostgresEnums(ctx context.Context, db DB, schema string) ([]*Enum, error) + type EnumValue struct + ConstValue int + EnumValue string + func PostgresEnumValues(ctx context.Context, db DB, schema, enum string) ([]*EnumValue, error) + type ErrDecodeFailed struct + Err error + func (err *ErrDecodeFailed) Error() string + func (err *ErrDecodeFailed) Unwrap() error + type ErrInsertFailed struct + Err error + func (err *ErrInsertFailed) Error() string + func (err *ErrInsertFailed) Unwrap() error + type ErrUpdateFailed struct + Err error + func (err *ErrUpdateFailed) Error() string + func (err *ErrUpdateFailed) Unwrap() error + type ErrUpsertFailed struct + Err error + func (err *ErrUpsertFailed) Error() string + func (err *ErrUpsertFailed) Unwrap() error + type Error string + const ErrAlreadyExists + const ErrDoesNotExist + const ErrInvalidStringSlice + const ErrMarkedForDeletion + func (err Error) Error() string + type ForeignKey struct + ColumnName string + ForeignKeyName string + KeyID int + RefColumnName string + RefTableName string + func MysqlTableForeignKeys(ctx context.Context, db DB, schema, table string) ([]*ForeignKey, error) + func OracleTableForeignKeys(ctx context.Context, db DB, schema, table string) ([]*ForeignKey, error) + func PostgresTableForeignKeys(ctx context.Context, db DB, schema, table string) ([]*ForeignKey, error) + func Sqlite3TableForeignKeys(ctx context.Context, db DB, schema, table string) ([]*ForeignKey, error) + func SqlserverTableForeignKeys(ctx context.Context, db DB, schema, table string) ([]*ForeignKey, error) + type Index struct + IndexName string + IsPrimary bool + IsUnique bool + func MysqlTableIndexes(ctx context.Context, db DB, schema, table string) ([]*Index, error) + func OracleTableIndexes(ctx context.Context, db DB, schema, table string) ([]*Index, error) + func PostgresTableIndexes(ctx context.Context, db DB, schema, table string) ([]*Index, error) + func Sqlite3TableIndexes(ctx context.Context, db DB, schema, table string) ([]*Index, error) + func SqlserverTableIndexes(ctx context.Context, db DB, schema, table string) ([]*Index, error) + type IndexColumn struct + Cid int + ColumnName string + SeqNo int + func MysqlIndexColumns(ctx context.Context, db DB, schema, table, index string) ([]*IndexColumn, error) + func OracleIndexColumns(ctx context.Context, db DB, schema, table, index string) ([]*IndexColumn, error) + func PostgresIndexColumns(ctx context.Context, db DB, schema, index string) ([]*IndexColumn, error) + func Sqlite3IndexColumns(ctx context.Context, db DB, schema, table, index string) ([]*IndexColumn, error) + func SqlserverIndexColumns(ctx context.Context, db DB, schema, table, index string) ([]*IndexColumn, error) + type MysqlEnumValue struct + EnumValues string + func MysqlEnumValues(ctx context.Context, db DB, schema, enum string) (*MysqlEnumValue, error) + type PostgresColOrder struct + Ord string + func PostgresGetColOrder(ctx context.Context, db DB, schema, index string) (*PostgresColOrder, error) + type Proc struct + ProcDef string + ProcID string + ProcName string + ProcType string + ReturnName string + ReturnType string + func MysqlProcs(ctx context.Context, db DB, schema string) ([]*Proc, error) + func OracleProcs(ctx context.Context, db DB, schema string) ([]*Proc, error) + func PostgresProcs(ctx context.Context, db DB, schema string) ([]*Proc, error) + func SqlserverProcs(ctx context.Context, db DB, schema string) ([]*Proc, error) + type ProcParam struct + ParamName string + ParamType string + func MysqlProcParams(ctx context.Context, db DB, schema, id string) ([]*ProcParam, error) + func OracleProcParams(ctx context.Context, db DB, schema, id string) ([]*ProcParam, error) + func PostgresProcParams(ctx context.Context, db DB, schema, id string) ([]*ProcParam, error) + func SqlserverProcParams(ctx context.Context, db DB, schema, id string) ([]*ProcParam, error) + type Sequence struct + ColumnName string + func MysqlTableSequences(ctx context.Context, db DB, schema, table string) ([]*Sequence, error) + func OracleTableSequences(ctx context.Context, db DB, schema, table string) ([]*Sequence, error) + func PostgresTableSequences(ctx context.Context, db DB, schema, table string) ([]*Sequence, error) + func Sqlite3TableSequences(ctx context.Context, db DB, schema, table string) ([]*Sequence, error) + func SqlserverTableSequences(ctx context.Context, db DB, schema, table string) ([]*Sequence, error) + type StringSlice []string + func (ss *StringSlice) Scan(v interface{}) error + func (ss StringSlice) Value() (driver.Value, error) + type Table struct + ManualPk bool + TableName string + Type string + ViewDef string + func MysqlTables(ctx context.Context, db DB, schema, typ string) ([]*Table, error) + func OracleTables(ctx context.Context, db DB, schema, typ string) ([]*Table, error) + func PostgresTables(ctx context.Context, db DB, schema, typ string) ([]*Table, error) + func Sqlite3Tables(ctx context.Context, db DB, schema, typ string) ([]*Table, error) + func SqlserverTables(ctx context.Context, db DB, schema, typ string) ([]*Table, error)