- Sort Score
- Result 10 results
- Languages All
Results 241 - 250 of 2,797 for volume (0.08 sec)
-
clause/expression.go
} func (like Like) NegationBuild(builder Builder) { builder.WriteQuoted(like.Column) builder.WriteString(" NOT LIKE ") builder.AddVar(builder, like.Value) } func eqNil(value interface{}) bool { if valuer, ok := value.(driver.Valuer); ok && !eqNilReflect(valuer) { value, _ = valuer.Value() } return value == nil || eqNilReflect(value) } func eqNilReflect(value interface{}) bool {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 06:45:48 UTC 2023 - 8.3K bytes - Viewed (0) -
soft_delete.go
"gorm.io/gorm/schema" ) type DeletedAt sql.NullTime // Scan implements the Scanner interface. func (n *DeletedAt) Scan(value interface{}) error { return (*sql.NullTime)(n).Scan(value) } // Value implements the driver Valuer interface. func (n DeletedAt) Value() (driver.Value, error) { if !n.Valid { return nil, nil } return n.Time, nil } func (n DeletedAt) MarshalJSON() ([]byte, error) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 4.5K bytes - Viewed (1) -
clause/values.go
type Values struct { Columns []Column Values [][]interface{} } // Name from clause name func (Values) Name() string { return "VALUES" } // Build build from clause func (values Values) Build(builder Builder) { if len(values.Columns) > 0 { builder.WriteByte('(') for idx, column := range values.Columns { if idx > 0 { builder.WriteByte(',') } builder.WriteQuoted(column) } builder.WriteByte(')')
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sun May 24 03:35:19 UTC 2020 - 849 bytes - Viewed (0) -
finisher_api.go
} else if eq, ok := expr.(clause.Eq); ok { switch column := eq.Column.(type) { case string: assigns[column] = eq.Value case clause.Column: assigns[column.Name] = eq.Value } } } return tx.Model(dest).Updates(assigns) } return tx } // Update updates column with value using callbacks. Reference: https://gorm.io/docs/update.html#Update-Changed-Fields
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Sep 14 12:58:29 UTC 2024 - 22.8K bytes - Viewed (0) -
association.go
} } else { tx.Clauses(clause.Eq{Column: ref.ForeignKey.DBName, Value: ref.PrimaryValue}) } } _, pvs := schema.GetIdentityFieldValuesMap(association.DB.Statement.Context, reflectValue, primaryFields) if column, values := schema.ToQueryValues(rel.JoinTable.Table, joinPrimaryKeys, pvs); len(values) > 0 { tx.Where(clause.IN{Column: column, Values: values}) } else { return ErrPrimaryKeyRequired
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
tests/migrate_test.go
t.Fatalf("column age comment should be correct, name: %v, column: %#v", columnType.Name(), columnType) } case "code": if v, ok := columnType.Unique(); !ok || !v { t.Fatalf("column code unique should be correct, name: %v, column: %#v", columnType.Name(), columnType) } if v, ok := columnType.DefaultValue(); !ok || v != "hello" {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0) -
scan.go
for idx, column := range columns { if reflectValue := reflect.Indirect(reflect.Indirect(reflect.ValueOf(values[idx]))); reflectValue.IsValid() { mapValue[column] = reflectValue.Interface() if valuer, ok := mapValue[column].(driver.Valuer); ok { mapValue[column], _ = valuer.Value() } else if b, ok := mapValue[column].(sql.RawBytes); ok { mapValue[column] = string(b) } } else {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 10.1K bytes - Viewed (0) -
callbacks/create.go
assignment := clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: curTime} switch field.AutoUpdateTime { case schema.UnixNanosecond: assignment.Value = curTime.UnixNano() case schema.UnixMillisecond: assignment.Value = curTime.UnixMilli() case schema.UnixSecond: assignment.Value = curTime.Unix() }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Apr 08 03:29:55 UTC 2024 - 12.5K bytes - Viewed (0) -
migrator/migrator.go
newName = field.DBName } } return m.DB.Exec( "ALTER TABLE ? RENAME COLUMN ? TO ?", m.CurrentTable(stmt), clause.Column{Name: oldName}, clause.Column{Name: newName}, ).Error }) } // MigrateColumn migrate column func (m Migrator) MigrateColumn(value interface{}, field *schema.Field, columnType gorm.ColumnType) error { if field.IgnoreMigration { return nil }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 26 07:15:49 UTC 2024 - 29K bytes - Viewed (0) -
callbacks/helper.go
result[k][idx] = v } } sort.Strings(columns) values.Values = make([][]interface{}, len(mapValues)) values.Columns = make([]clause.Column, len(columns)) for idx, column := range columns { values.Columns[idx] = clause.Column{Name: column} for i, v := range result[column] { if len(values.Values[i]) == 0 { values.Values[i] = make([]interface{}, len(columns)) } values.Values[i][idx] = v } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Apr 14 12:32:57 UTC 2022 - 3.7K bytes - Viewed (0)