Documentation
¶
Index ¶
- Constants
- func DriverName(name string) dao.Option
- func JSONQuery(column string) *jsonQueryExpression
- func NewDialect(opts ...dao.Option) dao.Dialect
- func PreferSimpleProtocolKey(b bool) dao.Option
- func WithOutReturning(b bool) dao.Option
- type Column
- type Dialect
- func (d *Dialect) BindVarTo(writer clause.Writer, stmt *dao.Statement, v interface{})
- func (d *Dialect) DataTypeOf(field *schema.Field) string
- func (d *Dialect) DefaultValueOf(field *schema.Field) clause.Expression
- func (d *Dialect) Explain(sql string, vars ...interface{}) string
- func (d *Dialect) Init(opts ...dao.Option) (err error)
- func (d *Dialect) JSONBuild(column string) dao.JSONQuery
- func (d *Dialect) JSONDataType() string
- func (d *Dialect) Migrator() dao.Migrator
- func (d *Dialect) NewTx() *dao.DB
- func (d *Dialect) Options() dao.Options
- func (d *Dialect) QuoteTo(writer clause.Writer, str string)
- func (d *Dialect) RollbackTo(tx *dao.DB, name string) error
- func (d *Dialect) SavePoint(tx *dao.DB, name string) error
- func (d *Dialect) String() string
- type Migrator
- func (m Migrator) AddColumn(value interface{}, field string) error
- func (m Migrator) BuildIndexOptions(opts []schema.IndexOption, stmt *dao.Statement) (results []interface{})
- func (m Migrator) ColumnTypes(value interface{}) (columnTypes []dao.ColumnType, err error)
- func (m Migrator) CreateIndex(value interface{}, name string) error
- func (m Migrator) CreateTable(values ...interface{}) (err error)
- func (m Migrator) CurrentDatabase() (name string)
- func (m Migrator) CurrentSchema(stmt *dao.Statement) interface{}
- func (m Migrator) DropIndex(value interface{}, name string) error
- func (m Migrator) DropTable(values ...interface{}) error
- func (m Migrator) HasColumn(value interface{}, field string) bool
- func (m Migrator) HasConstraint(value interface{}, name string) bool
- func (m Migrator) HasIndex(value interface{}, name string) bool
- func (m Migrator) HasTable(value interface{}) bool
- func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnType dao.ColumnType) error
- func (m Migrator) RenameIndex(value interface{}, oldName, newName string) error
Constants ¶
View Source
const (
// DefaultDriverName is the default driver name for SQLite.
DefaultDriverName = "postgres"
)
Variables ¶
This section is empty.
Functions ¶
func DriverName ¶
func PreferSimpleProtocolKey ¶
func WithOutReturning ¶
Types ¶
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
func (Column) DatabaseTypeName ¶
type Dialect ¶
type Dialect struct { DB *dao.DB Opts dao.Options DriverName string Conn dao.ConnPool PreferSimpleProtocol bool WithOutReturning bool // contains filtered or unexported fields }
func (*Dialect) DefaultValueOf ¶
func (d *Dialect) DefaultValueOf(field *schema.Field) clause.Expression
func (*Dialect) JSONDataType ¶
type Migrator ¶
func (Migrator) BuildIndexOptions ¶
func (m Migrator) BuildIndexOptions(opts []schema.IndexOption, stmt *dao.Statement) (results []interface{})
func (Migrator) ColumnTypes ¶
func (m Migrator) ColumnTypes(value interface{}) (columnTypes []dao.ColumnType, err error)
func (Migrator) CreateIndex ¶
func (Migrator) CreateTable ¶
func (Migrator) CurrentDatabase ¶ added in v0.17.1
func (Migrator) CurrentSchema ¶
func (Migrator) HasConstraint ¶
func (Migrator) MigrateColumn ¶
func (Migrator) RenameIndex ¶
Click to show internal directories.
Click to hide internal directories.