Versions in this module Expand all Collapse all v1 v1.4.0 Jul 14, 2023 Changes in this version + const IncrAutoincrMode + const SequenceAutoincrMode + var DefaultPostgresSchema = "public" + func ColumnString(dialect Dialect, col *schemas.Column, includePrimaryKey bool) (string, error) + func FormatColumnTime(dialect Dialect, dbLocation *time.Location, col *schemas.Column, t time.Time) (interface{}, error) + func FullTableName(dialect Dialect, mapper names.Mapper, bean interface{}, includeSchema ...bool) string + func QueryDefaultPostgresSchema(ctx context.Context, queryer core.Queryer) (string, error) + func RegisterDialect(dbName schemas.DBType, dialectFunc func() Dialect) + func RegisterDriver(driverName string, driver Driver) + func RegisteredDriverSize() int + func TableNameNoSchema(dialect Dialect, mapper names.Mapper, tableName interface{}) string + func TableNameWithSchema(dialect Dialect, tableName string) string + type Base struct + func (db *Base) AddColumnSQL(tableName string, col *schemas.Column) string + func (db *Base) Alias(col string) string + func (db *Base) CreateIndexSQL(tableName string, index *schemas.Index) string + func (db *Base) CreateSequenceSQL(ctx context.Context, queryer core.Queryer, seqName string) (string, error) + func (db *Base) CreateTableSQL(ctx context.Context, queryer core.Queryer, table *schemas.Table, ...) (string, bool, error) + func (db *Base) DropIndexSQL(tableName string, index *schemas.Index) string + func (db *Base) DropSequenceSQL(seqName string) (string, error) + func (db *Base) DropTableSQL(tableName string) (string, bool) + func (db *Base) ForUpdateSQL(query string) string + func (db *Base) HasRecords(queryer core.Queryer, ctx context.Context, query string, args ...interface{}) (bool, error) + func (db *Base) Init(dialect Dialect, uri *URI) error + func (db *Base) IsColumnExist(queryer core.Queryer, ctx context.Context, tableName, colName string) (bool, error) + func (db *Base) IsSequenceExist(ctx context.Context, queryer core.Queryer, seqName string) (bool, error) + func (db *Base) ModifyColumnSQL(tableName string, col *schemas.Column) string + func (db *Base) Quoter() schemas.Quoter + func (db *Base) SetParams(params map[string]string) + func (db *Base) URI() *URI + type Dialect interface + AddColumnSQL func(tableName string, col *schemas.Column) string + Alias func(string) string + AutoIncrStr func() string + ColumnTypeKind func(string) int + CreateIndexSQL func(tableName string, index *schemas.Index) string + CreateSequenceSQL func(ctx context.Context, queryer core.Queryer, seqName string) (string, error) + CreateTableSQL func(ctx context.Context, queryer core.Queryer, table *schemas.Table, ...) (string, bool, error) + DropIndexSQL func(tableName string, index *schemas.Index) string + DropSequenceSQL func(seqName string) (string, error) + DropTableSQL func(tableName string) (string, bool) + Features func() *DialectFeatures + Filters func() []Filter + ForUpdateSQL func(query string) string + GetColumns func(queryer core.Queryer, ctx context.Context, tableName string) ([]string, map[string]*schemas.Column, error) + GetIndexes func(queryer core.Queryer, ctx context.Context, tableName string) (map[string]*schemas.Index, error) + GetTables func(queryer core.Queryer, ctx context.Context) ([]*schemas.Table, error) + IndexCheckSQL func(tableName, idxName string) (string, []interface{}) + Init func(*URI) error + IsColumnExist func(queryer core.Queryer, ctx context.Context, tableName string, colName string) (bool, error) + IsReserved func(string) bool + IsSequenceExist func(ctx context.Context, queryer core.Queryer, seqName string) (bool, error) + IsTableExist func(queryer core.Queryer, ctx context.Context, tableName string) (bool, error) + ModifyColumnSQL func(tableName string, col *schemas.Column) string + Quoter func() schemas.Quoter + SQLType func(*schemas.Column) string + SetParams func(params map[string]string) + SetQuotePolicy func(quotePolicy QuotePolicy) + URI func() *URI + Version func(ctx context.Context, queryer core.Queryer) (*schemas.Version, error) + func OpenDialect(driverName, connstr string) (Dialect, error) + func QueryDialect(dbName schemas.DBType) Dialect + type DialectFeatures struct + AutoincrMode int + type Driver interface + Features func() *DriverFeatures + GenScanResult func(string) (interface{}, error) + Parse func(string, string) (*URI, error) + Scan func(*ScanContext, *core.Rows, []*sql.ColumnType, ...interface{}) error + func QueryDriver(driverName string) Driver + type DriverFeatures struct + SupportReturnInsertedID bool + type Filter interface + Do func(sql string) string + type QuotePolicy int + const QuotePolicyAlways + const QuotePolicyNone + const QuotePolicyReserved + type ScanContext struct + DBLocation *time.Location + UserLocation *time.Location + type SeqFilter struct + Prefix string + Start int + func (s *SeqFilter) Do(sql string) string + type URI struct + Charset string + DBName string + DBType schemas.DBType + Host string + Laddr string + Passwd string + Port string + Proto string + Raddr string + Schema string + Timeout time.Duration + User string + func (uri *URI) SetSchema(schema string)