Documentation ¶
Index ¶
- Variables
- func InterpolateParams(query string, args []driver.NamedValue, loc *time.Location) (string, error)
- type ColumnSchema
- type IndexSchema
- type PostgreSQLConnector
- func (c *PostgreSQLConnector) AddColumn(col *builder.Column) builder.SqlExpr
- func (c *PostgreSQLConnector) AddIndex(key *builder.Key) builder.SqlExpr
- func (c *PostgreSQLConnector) Connect(ctx context.Context) (driver.Conn, error)
- func (c *PostgreSQLConnector) CreateDatabase(dbName string) builder.SqlExpr
- func (c *PostgreSQLConnector) CreateSchema(schema string) builder.SqlExpr
- func (c *PostgreSQLConnector) CreateTableIsNotExists(t *builder.Table) (exprs []builder.SqlExpr)
- func (c *PostgreSQLConnector) DataType(columnType *builder.ColumnType) builder.SqlExpr
- func (PostgreSQLConnector) Driver() driver.Driver
- func (PostgreSQLConnector) DriverName() string
- func (c *PostgreSQLConnector) DropColumn(col *builder.Column) builder.SqlExpr
- func (c *PostgreSQLConnector) DropDatabase(dbName string) builder.SqlExpr
- func (c *PostgreSQLConnector) DropIndex(key *builder.Key) builder.SqlExpr
- func (c *PostgreSQLConnector) DropTable(t *builder.Table) builder.SqlExpr
- func (PostgreSQLConnector) IsErrorConflict(err error) bool
- func (PostgreSQLConnector) IsErrorUnknownDatabase(err error) bool
- func (c *PostgreSQLConnector) Migrate(ctx context.Context, db sqlx.DBExecutor) error
- func (c *PostgreSQLConnector) ModifyColumn(col *builder.Column, prev *builder.Column) builder.SqlExpr
- func (PostgreSQLConnector) PrimaryKeyName() string
- func (c *PostgreSQLConnector) RenameColumn(col *builder.Column, target *builder.Column) builder.SqlExpr
- func (c *PostgreSQLConnector) TruncateTable(t *builder.Table) builder.SqlExpr
- func (c PostgreSQLConnector) WithDBName(dbName string) driver.Connector
- type PostgreSQLLoggingDriver
- type PostgreSQLOpts
- type SqlPrinter
Constants ¶
This section is empty.
Variables ¶
View Source
var SchemaDatabase = sqlx.NewDatabase("INFORMATION_SCHEMA")
Functions ¶
func InterpolateParams ¶
Types ¶
type ColumnSchema ¶
type ColumnSchema struct { TABLE_SCHEMA string `db:"table_schema"` TABLE_NAME string `db:"table_name"` COLUMN_NAME string `db:"column_name"` DATA_TYPE string `db:"data_type"` IS_NULLABLE string `db:"is_nullable"` COLUMN_DEFAULT string `db:"column_default"` CHARACTER_MAXIMUM_LENGTH uint64 `db:"character_maximum_length"` NUMERIC_PRECISION uint64 `db:"numeric_precision"` NUMERIC_SCALE uint64 `db:"numeric_scale"` }
func (ColumnSchema) TableName ¶
func (ColumnSchema) TableName() string
type IndexSchema ¶
type IndexSchema struct { TABLE_SCHEMA string `db:"schemaname"` TABLE_NAME string `db:"tablename"` INDEX_NAME string `db:"indexname"` INDEX_DEF string `db:"indexdef"` }
func (IndexSchema) TableName ¶
func (IndexSchema) TableName() string
type PostgreSQLConnector ¶
func (*PostgreSQLConnector) AddColumn ¶
func (c *PostgreSQLConnector) AddColumn(col *builder.Column) builder.SqlExpr
func (*PostgreSQLConnector) AddIndex ¶
func (c *PostgreSQLConnector) AddIndex(key *builder.Key) builder.SqlExpr
func (*PostgreSQLConnector) CreateDatabase ¶
func (c *PostgreSQLConnector) CreateDatabase(dbName string) builder.SqlExpr
func (*PostgreSQLConnector) CreateSchema ¶
func (c *PostgreSQLConnector) CreateSchema(schema string) builder.SqlExpr
func (*PostgreSQLConnector) CreateTableIsNotExists ¶
func (c *PostgreSQLConnector) CreateTableIsNotExists(t *builder.Table) (exprs []builder.SqlExpr)
func (*PostgreSQLConnector) DataType ¶
func (c *PostgreSQLConnector) DataType(columnType *builder.ColumnType) builder.SqlExpr
func (PostgreSQLConnector) Driver ¶
func (PostgreSQLConnector) Driver() driver.Driver
func (PostgreSQLConnector) DriverName ¶
func (PostgreSQLConnector) DriverName() string
func (*PostgreSQLConnector) DropColumn ¶
func (c *PostgreSQLConnector) DropColumn(col *builder.Column) builder.SqlExpr
func (*PostgreSQLConnector) DropDatabase ¶
func (c *PostgreSQLConnector) DropDatabase(dbName string) builder.SqlExpr
func (*PostgreSQLConnector) DropIndex ¶
func (c *PostgreSQLConnector) DropIndex(key *builder.Key) builder.SqlExpr
func (*PostgreSQLConnector) DropTable ¶
func (c *PostgreSQLConnector) DropTable(t *builder.Table) builder.SqlExpr
func (PostgreSQLConnector) IsErrorConflict ¶
func (PostgreSQLConnector) IsErrorConflict(err error) bool
func (PostgreSQLConnector) IsErrorUnknownDatabase ¶
func (PostgreSQLConnector) IsErrorUnknownDatabase(err error) bool
func (*PostgreSQLConnector) Migrate ¶
func (c *PostgreSQLConnector) Migrate(ctx context.Context, db sqlx.DBExecutor) error
func (*PostgreSQLConnector) ModifyColumn ¶
func (PostgreSQLConnector) PrimaryKeyName ¶
func (PostgreSQLConnector) PrimaryKeyName() string
func (*PostgreSQLConnector) RenameColumn ¶
func (*PostgreSQLConnector) TruncateTable ¶
func (c *PostgreSQLConnector) TruncateTable(t *builder.Table) builder.SqlExpr
func (PostgreSQLConnector) WithDBName ¶
func (c PostgreSQLConnector) WithDBName(dbName string) driver.Connector
type PostgreSQLLoggingDriver ¶
type PostgreSQLLoggingDriver struct {
// contains filtered or unexported fields
}
type PostgreSQLOpts ¶
func FromConfigString ¶
func FromConfigString(s string) PostgreSQLOpts
func (PostgreSQLOpts) String ¶
func (opts PostgreSQLOpts) String() string
type SqlPrinter ¶
type SqlPrinter struct {
// contains filtered or unexported fields
}
func (*SqlPrinter) String ¶
func (p *SqlPrinter) String() string
Click to show internal directories.
Click to hide internal directories.