- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for columnType (0.22 sec)
-
migrator.go
MigrateColumn(dst interface{}, field *schema.Field, columnType ColumnType) error // MigrateColumnUnique migrate column's UNIQUE constraint, it's part of MigrateColumn. MigrateColumnUnique(dst interface{}, field *schema.Field, columnType ColumnType) error HasColumn(dst interface{}, field string) bool RenameColumn(dst interface{}, oldName, field string) error ColumnTypes(dst interface{}) ([]ColumnType, error) // Views
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/migrate_test.go
columnType) } case "name": dataType := DB.Dialector.DataTypeOf(stmt.Schema.LookUpField(columnType.Name())) if !strings.Contains(strings.ToUpper(dataType), strings.ToUpper(columnType.DatabaseTypeName())) { t.Fatalf("column name type should be correct, name: %v, length: %v, expects: %v, column: %#v", columnType.Name(), columnType.DatabaseTypeName(), dataType, columnType) }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0) -
migrator/migrator.go
return m.DB.Migrator().CreateConstraint(value, constraint) } return nil }) } // ColumnTypes return columnTypes []gorm.ColumnType and execErr error func (m Migrator) ColumnTypes(value interface{}) ([]gorm.ColumnType, error) { columnTypes := make([]gorm.ColumnType, 0) execErr := m.RunWithValue(value, func(stmt *gorm.Statement) (err error) {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Apr 26 07:15:49 UTC 2024 - 29K bytes - Viewed (0) -
scan.go
func prepareValues(values []interface{}, db *DB, columnTypes []*sql.ColumnType, columns []string) { if db.Statement.Schema != nil { for idx, name := range columns { if field := db.Statement.Schema.LookUpField(name); field != nil { values[idx] = reflect.New(reflect.PtrTo(field.FieldType)).Interface() continue } values[idx] = new(interface{}) } } else if len(columnTypes) > 0 { for idx, columnType := range columnTypes {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:57:36 UTC 2024 - 10K bytes - Viewed (0) -
interfaces.go
} // GetDBConnector SQL db connector type GetDBConnector interface { GetDBConn() (*sql.DB, error) } // Rows rows interface type Rows interface { Columns() ([]string, error) ColumnTypes() ([]*sql.ColumnType, error) Next() bool Scan(dest ...interface{}) error Err() error Close() error } type ErrorTranslator interface { Translate(err error) error
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Sat Aug 19 13:33:31 UTC 2023 - 2.2K bytes - Viewed (0) -
src/database/sql/sql.go
// Consult your driver documentation for a list of driver data types. [ColumnType.Length] specifiers // are not included. // Common type names include "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL", // "INT", and "BIGINT". func (ci *ColumnType) DatabaseTypeName() string { return ci.databaseType } func rowsColumnInfoSetupConnLocked(rowsi driver.Rows) []*ColumnType { names := rowsi.Columns()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:53 UTC 2024 - 103.6K bytes - Viewed (0) -
src/database/sql/fakedb_test.go
name, len(columnNames), len(columnTypes)) } db.tables[name] = &table{colname: columnNames, coltype: columnTypes} return nil } // must be called with db.mu lock held func (db *fakeDB) table(table string) (*table, bool) { if db.tables == nil { return nil, false } t, ok := db.tables[table] return t, ok } func (db *fakeDB) columnType(table, column string) (typ string, ok bool) { db.mu.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 01 12:38:07 UTC 2024 - 30.3K bytes - Viewed (0) -
schema/field.go
NewValuePool FieldNewValuePool // In some db (e.g. MySQL), Unique and UniqueIndex are indistinguishable. // When a column has a (not Mul) UniqueIndex, Migrator always reports its gorm.ColumnType is Unique. // It causes field unnecessarily migration. // Therefore, we need to record the UniqueIndex on this column (exclude Mul UniqueIndex) for MigrateColumnUnique. UniqueIndex string }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 15 03:20:20 UTC 2024 - 32K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"TBSCertificateList.Version", Field, 0}, }, "database/sql": { {"(*ColumnType).DatabaseTypeName", Method, 8}, {"(*ColumnType).DecimalSize", Method, 8}, {"(*ColumnType).Length", Method, 8}, {"(*ColumnType).Name", Method, 8}, {"(*ColumnType).Nullable", Method, 8}, {"(*ColumnType).ScanType", Method, 8}, {"(*Conn).BeginTx", Method, 9}, {"(*Conn).Close", Method, 9},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0) -
src/database/sql/sql_test.go
db := newTestDB(t, "people") defer closeDB(t, db) rows, err := db.Query("SELECT|people|age,name|") if err != nil { t.Fatalf("Query: %v", err) } tt, err := rows.ColumnTypes() if err != nil { t.Fatalf("ColumnTypes: %v", err) } types := make([]reflect.Type, len(tt)) for i, tp := range tt { st := tp.ScanType() if st == nil { t.Errorf("scantype is null for column %q", tp.Name())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 111.6K bytes - Viewed (0)