- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 37 for Stmt (0.06 sec)
-
tests/embedded_struct_test.go
t.Errorf("should has prefixed column %v", name) } } stmt := gorm.Statement{DB: DB} if err := stmt.Parse(&EngadgetPost{}); err != nil { t.Fatalf("failed to parse embedded struct") } else if len(stmt.Schema.PrimaryFields) != 1 { t.Errorf("should have only one primary field with embedded struct, but got %v", len(stmt.Schema.PrimaryFields)) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed May 08 04:07:58 UTC 2024 - 7.3K bytes - Viewed (0) -
tests/joins_test.go
if !regexp.MustCompile("SELECT .* FROM .users. left join pets.*join accounts.*").MatchString(stmt.SQL.String()) { t.Errorf("joins should be ordered, but got %v", stmt.SQL.String()) } iv := DB.Table(`table_invoices`).Select(`seller, SUM(total) as total, SUM(paid) as paid, SUM(balance) as balance`).Group(`seller`)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
tests/multi_primary_keys_test.go
t.Skip("skip sqlite, sqlserver due to it doesn't support multiple primary keys with auto increment") } if name := DB.Dialector.Name(); name == "postgres" { stmt := gorm.Statement{DB: DB} stmt.Parse(&Blog{}) stmt.Schema.LookUpField("ID").Unique = true stmt.Parse(&Tag{}) stmt.Schema.LookUpField("ID").Unique = true // postgers only allow unique constraint matching given keys }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 12.8K bytes - Viewed (0) -
api/go1.8.txt
pkg database/sql, method (*Stmt) QueryContext(context.Context, ...interface{}) (*Rows, error) pkg database/sql, method (*Stmt) QueryRowContext(context.Context, ...interface{}) *Row pkg database/sql, method (*Tx) ExecContext(context.Context, string, ...interface{}) (Result, error) pkg database/sql, method (*Tx) PrepareContext(context.Context, string) (*Stmt, error) pkg database/sql, method (*Tx) QueryContext(context.Context, string, ...interface{}) (*Rows, error)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Dec 21 05:25:57 UTC 2016 - 16.3K bytes - Viewed (0) -
internal/event/target/mysql.go
} return nil } // MySQLTarget - MySQL target. type MySQLTarget struct { initOnce once.Init id event.TargetID args MySQLArgs updateStmt *sql.Stmt deleteStmt *sql.Stmt insertStmt *sql.Stmt db *sql.DB store store.Store[event.Event] firstPing bool loggerOnce logger.LogOnce quitCh chan struct{} } // ID - returns target ID.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 11.6K bytes - Viewed (0) -
tests/connpool_test.go
"gorm.io/driver/mysql" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) type wrapperTx struct { *sql.Tx conn *wrapperConnPool } func (c *wrapperTx) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) { c.conn.got = append(c.conn.got, query) return c.Tx.PrepareContext(ctx, query) } func (c *wrapperTx) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Feb 06 02:54:40 UTC 2024 - 5.5K bytes - Viewed (0) -
callbacks/associations.go
DisableNestedTransaction: true, }).Create(joins.Interface()).Error) } } } } } func onConflictOption(stmt *gorm.Statement, s *schema.Schema, defaultUpdatingColumns []string) (onConflict clause.OnConflict) { if len(defaultUpdatingColumns) > 0 || stmt.DB.FullSaveAssociations { onConflict.Columns = make([]clause.Column, 0, len(s.PrimaryFieldDBNames)) for _, dbName := range s.PrimaryFieldDBNames {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Apr 11 03:06:13 UTC 2023 - 14.3K bytes - Viewed (0) -
internal/event/target/postgresql.go
} // PostgreSQLTarget - PostgreSQL target. type PostgreSQLTarget struct { initOnce once.Init id event.TargetID args PostgreSQLArgs updateStmt *sql.Stmt deleteStmt *sql.Stmt insertStmt *sql.Stmt db *sql.DB store store.Store[event.Event] firstPing bool connString string loggerOnce logger.LogOnce quitCh chan struct{} }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.3K bytes - Viewed (0) -
tests/migrate_test.go
checkField := func(model interface{}, fieldName string, unique bool, uniqueIndex string) { stmt := &gorm.Statement{DB: DB} err := stmt.Parse(model) if err != nil { t.Fatalf("%v: failed to parse schema, got error: %v", utils.FileWithLineNum(), err) } _ = stmt.Schema.ParseIndexes() field := stmt.Schema.LookUpField(fieldName) if field == nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 18 11:24:16 UTC 2024 - 56.2K bytes - Viewed (0) -
utils/tests/dummy_dialecter.go
return clause.Expr{SQL: "DEFAULT"} } func (DummyDialector) Migrator(*gorm.DB) gorm.Migrator { return nil } func (DummyDialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{}) { writer.WriteByte('?') } func (DummyDialector) QuoteTo(writer clause.Writer, str string) { var ( underQuoted, selfQuoted bool continuousBacktick int8
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Mar 06 06:03:31 UTC 2023 - 2.2K bytes - Viewed (0)