Documentation ¶
Index ¶
- Constants
- Variables
- func BuildJDBC(user, password, connStr string, options map[string]string) string
- func BuildUrl(server string, port int, service, user, password string, ...) string
- func Create(db *gorm.DB)
- func New(config Config) gorm.Dialector
- func Open(dsn string) gorm.Dialector
- type Arg
- type Config
- type Dialector
- func (d Dialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{})
- func (d Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
- func (dialector Dialector) DataTypeOf(field *schema.Field) string
- func (d Dialector) DefaultValueOf(*schema.Field) clause.Expression
- func (d Dialector) DummyTableName() string
- func (d Dialector) Explain(rawSQL string, vars ...interface{}) string
- func (d Dialector) Initialize(db *gorm.DB) (err error)
- func (d Dialector) Migrator(db *gorm.DB) gorm.Migrator
- func (d Dialector) Name() string
- func (d Dialector) QuoteTo(writer clause.Writer, str string)
- func (dialector Dialector) RollbackTo(tx *gorm.DB, name string) error
- func (dialector Dialector) SavePoint(tx *gorm.DB, name string) error
- type Migrator
- func (m Migrator) AlterColumn(value interface{}, field string) error
- func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
- func (m Migrator) CreateConstraint(value interface{}, name string) error
- func (m Migrator) CreateTable(values ...interface{}) (err error)
- func (m Migrator) CurrentDatabase() (name string)
- func (m Migrator) CurrentSchema(table string) (string, string)
- func (m Migrator) DropConstraint(value interface{}, name string) error
- func (m Migrator) DropIndex(value interface{}, name string) error
- func (m Migrator) DropTable(values ...interface{}) error
- func (m Migrator) FullDataTypeOf(field *schema.Field) (expr clause.Expr)
- func (m Migrator) GetTypeAliases(databaseTypeName string) []string
- 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) RenameIndex(value interface{}, oldName, newName string) error
- func (m Migrator) RenameTable(oldName, newName interface{}) (err error)
- func (m Migrator) TryRemoveOnUpdate(values ...interface{}) error
- type Returning
Constants ¶
View Source
const (
// ClauseLimit for clause.ClauseBuilder LIMIT key
ClauseLimit = "LIMIT"
)
Variables ¶
View Source
var ( // CreateClauses create clauses CreateClauses = []string{"INSERT", "VALUES", "ON CONFLICT", "RETURNING INTO"} // QueryClauses query clauses QueryClauses = []string{} // UpdateClauses update clauses UpdateClauses = []string{"UPDATE", "SET", "WHERE", "ORDER BY", "LIMIT"} // DeleteClauses delete clauses DeleteClauses = []string{"DELETE", "FROM", "WHERE", "ORDER BY", "LIMIT"} )
Functions ¶
Types ¶
type Dialector ¶
type Dialector struct {
*Config
}
func (Dialector) ClauseBuilders ¶
func (d Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
func (Dialector) DefaultValueOf ¶
func (d Dialector) DefaultValueOf(*schema.Field) clause.Expression
func (Dialector) DummyTableName ¶
type Migrator ¶
func (Migrator) AlterColumn ¶
func (Migrator) ColumnTypes ¶
func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
ColumnTypes column types return columnTypes,error
func (Migrator) CreateConstraint ¶
func (Migrator) CreateTable ¶
func (Migrator) CurrentDatabase ¶
func (Migrator) DropConstraint ¶
func (Migrator) FullDataTypeOf ¶
func (Migrator) GetTypeAliases ¶
func (Migrator) HasConstraint ¶
func (Migrator) RenameIndex ¶
func (Migrator) RenameTable ¶
func (Migrator) TryRemoveOnUpdate ¶
Click to show internal directories.
Click to hide internal directories.