Documentation ¶
Index ¶
- Variables
- func BuildQuerySQL(db *gorm.DB)
- func BuildReservedWord(v string) string
- func ConvertMysqlSql(sql string) string
- func ConvertNameToFormat(x string) string
- func Create(db *gorm.DB)
- func Delete(config *callbacks.Config) func(db *gorm.DB)
- func ExplainSQL(sql string, numericPlaceholder *regexp.Regexp, escaper string, ...) string
- func IsReservedWord(v string) bool
- func New(config Config) gorm.Dialector
- func Open(dsn string) gorm.Dialector
- func Query(db *gorm.DB)
- func RefClone(inter interface{}) interface{}
- func RefInclude(inter interface{}, inc []string) interface{}
- func RemoveReservedWordSymbol(v string) string
- func ReplacementQuote(value string)
- func RowQuery(db *gorm.DB)
- func TB(db *gorm.DB)
- func Update(config *callbacks.Config) func(db *gorm.DB)
- type BuildIndexOptionsInterface
- type ColumnType
- func (c ColumnType) AutoIncrement() (isAutoIncrement bool, ok bool)
- func (c ColumnType) ColumnType() (columnType string, ok bool)
- func (c ColumnType) Comment() (value string, ok bool)
- func (c ColumnType) DatabaseTypeName() string
- func (c ColumnType) DecimalSize() (precision int64, scale int64, ok bool)
- func (c ColumnType) DefaultValue() (value string, ok bool)
- func (c ColumnType) Length() (length int64, ok bool)
- func (c ColumnType) Name() string
- func (c ColumnType) Nullable() (nullable bool, ok bool)
- func (c ColumnType) PrimaryKey() (isPrimaryKey bool, ok bool)
- func (c ColumnType) ScanType() reflect.Type
- func (c ColumnType) Unique() (unique bool, ok bool)
- 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 (d Dialector) DataTypeOf(field *schema.Field) string
- func (d Dialector) DefaultValueOf(*schema.Field) clause.Expression
- func (d Dialector) DummyTableName() string
- func (d Dialector) Explain(sql 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 (d Dialector) RewriteLimit(c clause.Clause, builder clause.Builder)
- func (d Dialector) RewriteWhere(c clause.Clause, builder clause.Builder)
- func (d Dialector) RollbackTo(tx *gorm.DB, name string) error
- func (d Dialector) SavePoint(tx *gorm.DB, name string) error
- type Migrator
- func (m Migrator) AddColumn(value interface{}, field string) error
- func (m Migrator) AlterColumn(value interface{}, field string) error
- func (m Migrator) AutoMigrate(values ...interface{}) error
- func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
- func (m Migrator) CreateConstraint(value interface{}, name string) error
- func (m Migrator) CreateIndex(value interface{}, name string) error
- func (m Migrator) CreateTable(values ...interface{}) error
- func (m Migrator) CurrentDatabase() (name string)
- func (m Migrator) DropColumn(value interface{}, name string) error
- 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) 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) TryQuotifyReservedWords(values ...interface{}) error
- func (m Migrator) TryRemoveOnUpdate(values ...interface{}) error
- type Namer
- func (n Namer) CheckerName(table, column string) (name string)
- func (n Namer) ColumnName(table, column string) (name string)
- func (n Namer) IndexName(table, column string) (name string)
- func (n Namer) JoinTableName(table string) (name string)
- func (n Namer) RelationshipFKName(relationship schema.Relationship) (name string)
- func (n Namer) TableName(table string) (name string)
- type STable
- func (stb *STable) AutoMigrate(dst ...interface{}) error
- func (stb *STable) ClausesAssignmentColumns(name string, doUpdates []string) error
- func (stb *STable) Create() error
- func (stb *STable) DB() (*sql.DB, error)
- func (stb *STable) Delete() error
- func (stb *STable) DropTable(dest ...interface{}) error
- func (stb *STable) Get(dest interface{}, conds ...interface{}) error
- func (stb *STable) GetAll(dest interface{}) error
- func (stb *STable) GetWhere(dest interface{}) error
- func (stb *STable) HasTable(dest interface{}) bool
- func (stb *STable) Model() *gorm.DB
- func (stb *STable) Update(dest interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ReservedWords = hashset.New(funk.Map(ReservedWordsList, func(s string) interface{} { return s }).([]interface{})...)
View Source
var ReservedWordsList = []string{}/* 156 elements not displayed */
Functions ¶
func BuildQuerySQL ¶
func BuildReservedWord ¶
func ConvertNameToFormat ¶
func ExplainSQL ¶
func ExplainSQL(sql string, numericPlaceholder *regexp.Regexp, escaper string, avars ...interface{}) string
ExplainSQL generate SQL string with given parameters, the generated SQL is expected to be used in logger, execute it might introduce a SQL injection vulnerability
func IsReservedWord ¶
func RefInclude ¶
func RefInclude(inter interface{}, inc []string) interface{}
func ReplacementQuote ¶
func ReplacementQuote(value string)
Types ¶
type BuildIndexOptionsInterface ¶
type BuildIndexOptionsInterface interface {
BuildIndexOptions([]schema.IndexOption, *gorm.Statement) []interface{}
}
type ColumnType ¶
type ColumnType struct {
// contains filtered or unexported fields
}
func (ColumnType) AutoIncrement ¶
func (c ColumnType) AutoIncrement() (isAutoIncrement bool, ok bool)
func (ColumnType) ColumnType ¶
func (c ColumnType) ColumnType() (columnType string, ok bool)
func (ColumnType) Comment ¶
func (c ColumnType) Comment() (value string, ok bool)
func (ColumnType) DatabaseTypeName ¶
func (c ColumnType) DatabaseTypeName() string
func (ColumnType) DecimalSize ¶
func (c ColumnType) DecimalSize() (precision int64, scale int64, ok bool)
func (ColumnType) DefaultValue ¶
func (c ColumnType) DefaultValue() (value string, ok bool)
func (ColumnType) Length ¶
func (c ColumnType) Length() (length int64, ok bool)
func (ColumnType) Name ¶
func (c ColumnType) Name() string
func (ColumnType) Nullable ¶
func (c ColumnType) Nullable() (nullable bool, ok bool)
func (ColumnType) PrimaryKey ¶
func (c ColumnType) PrimaryKey() (isPrimaryKey bool, ok bool)
func (ColumnType) ScanType ¶
func (c ColumnType) ScanType() reflect.Type
func (ColumnType) Unique ¶
func (c ColumnType) Unique() (unique bool, ok bool)
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 ¶
func (Dialector) RewriteLimit ¶
func (Dialector) RewriteWhere ¶
type Migrator ¶
func (Migrator) AlterColumn ¶
func (Migrator) AutoMigrate ¶
func (Migrator) ColumnTypes ¶
func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error)
func (Migrator) CreateConstraint ¶
func (Migrator) CreateIndex ¶
func (Migrator) CreateTable ¶
func (Migrator) CurrentDatabase ¶
func (Migrator) DropColumn ¶
func (Migrator) DropConstraint ¶
func (Migrator) HasConstraint ¶
func (Migrator) RenameTable ¶
func (Migrator) TryQuotifyReservedWords ¶
func (Migrator) TryRemoveOnUpdate ¶
type Namer ¶
type Namer struct {
schema.NamingStrategy
}
func (Namer) CheckerName ¶
func (Namer) ColumnName ¶
func (Namer) JoinTableName ¶
func (Namer) RelationshipFKName ¶
func (n Namer) RelationshipFKName(relationship schema.Relationship) (name string)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
* Copyright (c) 2000-2018, 达梦数据库有限公司.
|
* Copyright (c) 2000-2018, 达梦数据库有限公司. |
parser
* Copyright (c) 2000-2018, 达梦数据库有限公司.
|
* Copyright (c) 2000-2018, 达梦数据库有限公司. |
security
This is a mirror of golang.org/x/crypto/internal/subtle.
|
This is a mirror of golang.org/x/crypto/internal/subtle. |
util
* Copyright (c) 2000-2018, 达梦数据库有限公司.
|
* Copyright (c) 2000-2018, 达梦数据库有限公司. |
Click to show internal directories.
Click to hide internal directories.