- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 87 for interfaces (0.16 sec)
-
schema/interfaces.go
type CreateClausesInterface interface { CreateClauses(*Field) []clause.Interface } // QueryClausesInterface query clauses interface type QueryClausesInterface interface { QueryClauses(*Field) []clause.Interface } // UpdateClausesInterface update clauses interface type UpdateClausesInterface interface { UpdateClauses(*Field) []clause.Interface } // DeleteClausesInterface delete clauses interface
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Feb 04 07:49:19 GMT 2024 - 980 bytes - Viewed (0) -
callbacks/interfaces.go
package callbacks import "gorm.io/gorm" type BeforeCreateInterface interface { BeforeCreate(*gorm.DB) error } type AfterCreateInterface interface { AfterCreate(*gorm.DB) error } type BeforeUpdateInterface interface { BeforeUpdate(*gorm.DB) error } type AfterUpdateInterface interface { AfterUpdate(*gorm.DB) error } type BeforeSaveInterface interface { BeforeSave(*gorm.DB) error }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Aug 27 07:03:57 GMT 2020 - 667 bytes - Viewed (0) -
interfaces.go
} type ParamsFilter interface { ParamsFilter(ctx context.Context, sql string, params ...interface{}) (string, []interface{}) } // ConnPool db conns pool interface type ConnPool interface { PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Aug 19 13:33:31 GMT 2023 - 2.2K bytes - Viewed (0) -
schema/serializer.go
} // SerializerInterface serializer interface type SerializerInterface interface { Scan(ctx context.Context, field *Field, dst reflect.Value, dbValue interface{}) error SerializerValuerInterface } // SerializerValuerInterface serializer valuer interface type SerializerValuerInterface interface { Value(ctx context.Context, field *Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 4.6K bytes - Viewed (0) -
callbacks/helper_test.go
name string input map[string]interface{} expect clause.Values }{ { name: "Test convert string value", input: map[string]interface{}{ "name": "my name", }, expect: clause.Values{ Columns: []clause.Column{{Name: "name"}}, Values: [][]interface{}{{"my name"}}, }, }, { name: "Test convert int value", input: map[string]interface{}{ "age": 18, },
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 05 02:22:57 GMT 2024 - 3.4K bytes - Viewed (0) -
scan.go
if columnType.ScanType() != nil { values[idx] = reflect.New(reflect.PtrTo(columnType.ScanType())).Interface() } else { values[idx] = new(interface{}) } } } else { for idx := range columns { values[idx] = new(interface{}) } } } func scanIntoMap(mapValue map[string]interface{}, values []interface{}, columns []string) { for idx, column := range columns {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 26 09:53:11 GMT 2024 - 9.8K bytes - Viewed (0) -
clause/set_test.go
) func TestSet(t *testing.T) { results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{ clause.Update{}, clause.Set([]clause.Assignment{{clause.PrimaryColumn, 1}}), }, "UPDATE `users` SET `users`.`id`=?", []interface{}{1}, }, { []clause.Interface{ clause.Update{},
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 1.4K bytes - Viewed (0) -
clause/values_test.go
results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{ clause.Insert{}, clause.Values{ Columns: []clause.Column{{Name: "name"}, {Name: "age"}}, Values: [][]interface{}{{"jinzhu", 18}, {"josh", 1}}, }, }, "INSERT INTO `users` (`name`,`age`) VALUES (?,?),(?,?)", []interface{}{"jinzhu", 18, "josh", 1}, }, }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Jan 06 07:02:53 GMT 2022 - 691 bytes - Viewed (0) -
schema/constraint.go
Constraint string // length(phone) >= 10 *Field } func (chk *CheckConstraint) GetName() string { return chk.Name } func (chk *CheckConstraint) Build() (sql string, vars []interface{}) { return "CONSTRAINT ? CHECK (?)", []interface{}{clause.Column{Name: chk.Name}, clause.Expr{SQL: chk.Constraint}} } // ParseCheckConstraints parse schema check constraints func (schema *Schema) ParseCheckConstraints() map[string]CheckConstraint {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 18 07:33:54 GMT 2024 - 1.9K bytes - Viewed (0) -
tests/create_test.go
func TestCreateFromMapWithoutPK(t *testing.T) { if !isMysql() { t.Skipf("This test case skipped, because of only supporting for mysql") } // case 1: one record, create from map[string]interface{} mapValue1 := map[string]interface{}{"name": "create_from_map_with_schema1", "age": 1} if err := DB.Model(&User{}).Create(mapValue1).Error; err != nil { t.Fatalf("failed to create data from map, got error: %v", err) }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Mar 19 03:50:28 GMT 2024 - 26.4K bytes - Viewed (0)