ColumnType column type implements ColumnType interfaceAutoIncrementValuesql.NullBoolColumnTypeValuesql.NullStringCommentValuesql.NullStringDataTypeValuesql.NullStringDecimalSizeValuesql.NullInt64DefaultValueValuesql.NullStringLengthValuesql.NullInt64NameValuesql.NullStringNullableValuesql.NullBoolPrimaryKeyValuesql.NullBoolSQLColumnType*sql.ColumnTypeScaleValuesql.NullInt64ScanTypeValuereflect.TypeUniqueValuesql.NullBool AutoIncrement returns the column is auto increment or not. ColumnType returns the database type of the column. like `varchar(16)` Comment returns the comment of current column. DatabaseTypeName returns the database system name of the column type. If an empty
string is returned, then the driver type name is not supported.
Consult your driver documentation for a list of driver data types. Length specifiers
are not included.
Common type names include "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL",
"INT", and "BIGINT". DecimalSize returns the scale and precision of a decimal type. DefaultValue returns the default value of current column. Length returns the column type length for variable length column types Name returns the name or alias of the column. Nullable reports whether the column may be null. PrimaryKey returns the column is primary key or not. ScanType returns a Go type suitable for scanning into using Rows.Scan. Unique reports whether the column may be unique.
ColumnType : gorm.io/gorm.ColumnType
ColumnType : github.com/polarsignals/frostdb/query/logicalplan.Named
Index implements gorm.Index interfaceColumnList[]stringNameValuestringOptionValuestringPrimaryKeyValuesql.NullBoolTableNamestringUniqueValuesql.NullBool Columns return the columns of the index Name return the name of the index. Option return the optional attribute of the index PrimaryKey returns the index is primary key or not. Table return the table name of the index. Unique returns whether the index is unique or not.
Index : gorm.io/gorm.Index
Index : github.com/polarsignals/frostdb/query/logicalplan.Named
Migrator m structConfigConfigConfig.CreateIndexAfterCreateTableboolConfig.DB*gorm.DBConfig.Dialectorgorm.Dialector AddColumn create `name` column for value AlterColumn alter value's `field` column' type based on schema definition AutoMigrate auto migrate values( Migrator) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{}) BuildIndexOptions build index options ColumnTypes return columnTypes []gorm.ColumnType and execErr error CreateConstraint create constraint CreateIndex create index `name` CreateTable create table in database for values CreateView create view from Query in gorm.ViewOption.
Query in gorm.ViewOption is a [subquery]
// CREATE VIEW `user_view` AS SELECT * FROM `users` WHERE age > 20
q := DB.Model(&User{}).Where("age > ?", 20)
DB.Debug().Migrator().CreateView("user_view", gorm.ViewOption{Query: q})
// CREATE OR REPLACE VIEW `users_view` AS SELECT * FROM `users` WITH CHECK OPTION
q := DB.Model(&User{})
DB.Debug().Migrator().CreateView("user_view", gorm.ViewOption{Query: q, Replace: true, CheckOption: "WITH CHECK OPTION"}) CurrentDatabase returns current database name
CurrentTable returns current statement's table expression
DataTypeOf return field's db data type
( Migrator) DefaultValueOf(*schema.Field) clause.Expression DropColumn drop value's `name` column
DropConstraint drop constraint
DropIndex drop index `name`
DropTable drop table for values
DropView drop view
( Migrator) Explain(sql string, vars ...interface{}) string FullDataTypeOf returns field's db full data type
GetIndexes return Indexes []gorm.Index and execErr error
( Migrator) GetQueryAndExecTx() (queryTx, execTx *gorm.DB) GetTables returns tables
GetTypeAliases return database type aliases
GuessConstraintAndTable guess statement's constraint and it's table based on name
Deprecated: use GuessConstraintInterfaceAndTable instead. GuessConstraintInterfaceAndTable guess statement's constraint and it's table based on name
nolint:cyclop HasColumn check has column `field` for value or not HasConstraint check has constraint or not HasIndex check has index `name` or not HasTable returns table exists or not for value, value could be a struct or string( Migrator) Initialize(*gorm.DB) error MigrateColumn migrate column( Migrator) MigrateColumnUnique(value interface{}, field *schema.Field, columnType gorm.ColumnType) error( Migrator) Migrator(db *gorm.DB) gorm.Migrator( Migrator) Name() string( Migrator) QuoteTo(clause.Writer, string) RenameColumn rename value's field name from oldName to newName RenameIndex rename index from oldName to newName RenameTable rename table from oldName to newName ReorderModels reorder models according to constraint dependencies RunWithValue run migration with statement value TableType return tableType gorm.TableType and execErr error
Migrator : BuildIndexOptionsInterface
Migrator : gorm.io/gorm.Dialector
Migrator : gorm.io/gorm.Migrator
Migrator : gorm.io/gorm.Plugin
Migrator : github.com/polarsignals/frostdb/query/logicalplan.Named
TableType table type implements TableType interfaceCommentValuesql.NullStringNameValuestringSchemaValuestringTypeValuestring Comment returns the comment of current table. Name returns the name of the table. Schema returns the schema of the table. Type returns the type of the table.
TableType : gorm.io/gorm.TableType
TableType : github.com/polarsignals/frostdb/query/logicalplan.Named
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.