- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for insert (0.23 sec)
-
clause/insert.go
package clause type Insert struct { Table Table Modifier string } // Name insert clause name func (insert Insert) Name() string { return "INSERT" } // Build build insert clause func (insert Insert) Build(builder Builder) { if insert.Modifier != "" { builder.WriteString(insert.Modifier) builder.WriteByte(' ') } builder.WriteString("INTO ") if insert.Table.Name == "" {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 09 09:07:00 GMT 2020 - 767 bytes - Viewed (0) -
clause/insert_test.go
Vars []interface{} }{ { []clause.Interface{clause.Insert{}}, "INSERT INTO `users`", nil, }, { []clause.Interface{clause.Insert{Modifier: "LOW_PRIORITY"}}, "INSERT LOW_PRIORITY INTO `users`", nil, }, { []clause.Interface{clause.Insert{Table: clause.Table{Name: "products"}, Modifier: "LOW_PRIORITY"}}, "INSERT LOW_PRIORITY INTO `products`", nil, }, }
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Jun 02 01:18:01 GMT 2020 - 737 bytes - Viewed (0) -
clause/values_test.go
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) -
tests/connpool_test.go
conn := &wrapperConnPool{ db: nativeDB, expect: []string{ "SELECT VERSION()", "INSERT INTO `users` (`created_at`,`updated_at`,`deleted_at`,`name`,`age`,`birthday`,`company_id`,`manager_id`,`active`) VALUES (?,?,?,?,?,?,?,?,?)", "SELECT * FROM `users` WHERE name = ? AND `users`.`deleted_at` IS NULL ORDER BY `users`.`id` LIMIT ?",
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Feb 06 02:54:40 GMT 2024 - 5.5K bytes - Viewed (0) -
prepare_stmt.go
// 1. g1 begin tx, g1 is requeue because of waiting for the system call, now `db.ConnPool` db.numOpen == 1. // 2. g2 select lock `conn.PrepareContext(ctx, query)`, now db.numOpen == db.maxOpen , wait for release. // 3. g1 tx exec insert, wait for unlock `conn.PrepareContext(ctx, query)` to finish tx and release. stmt, err := conn.PrepareContext(ctx, query) if err != nil { cacheStmt.prepareErr = err db.Mux.Lock() delete(db.Stmts, query)
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 28 08:47:39 GMT 2024 - 6.4K bytes - Viewed (0) -
utils/tests/dummy_dialecter.go
} func (DummyDialector) Name() string { return "dummy" } func (DummyDialector) Initialize(db *gorm.DB) error { callbacks.RegisterDefaultCallbacks(db, &callbacks.Config{ CreateClauses: []string{"INSERT", "VALUES", "ON CONFLICT", "RETURNING"}, UpdateClauses: []string{"UPDATE", "SET", "WHERE", "RETURNING"}, DeleteClauses: []string{"DELETE", "FROM", "WHERE", "RETURNING"}, LastInsertIDReversed: true, })
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Mar 06 06:03:31 GMT 2023 - 2.2K bytes - Viewed (0) -
README.md
* Eager loading with `Preload`, `Joins` * Transactions, Nested Transactions, Save Point, RollbackTo to Saved Point * Context, Prepared Statement Mode, DryRun Mode * Batch Insert, FindInBatches, Find To Map * SQL Builder, Upsert, Locking, Optimizer/Index/Comment Hints, NamedArg, Search/Update/Create with SQL Expr * Composite Primary Key * Auto Migrations * Logger
Plain Text - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Nov 07 02:20:06 GMT 2023 - 1.8K bytes - Viewed (0) -
callbacks/callbacks.go
package callbacks import ( "gorm.io/gorm" ) var ( createClauses = []string{"INSERT", "VALUES", "ON CONFLICT"} queryClauses = []string{"SELECT", "FROM", "WHERE", "GROUP BY", "ORDER BY", "LIMIT", "FOR"} updateClauses = []string{"UPDATE", "SET", "WHERE"} deleteClauses = []string{"DELETE", "FROM", "WHERE"} ) type Config struct { LastInsertIDReversed bool CreateClauses []string QueryClauses []string
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Wed Oct 27 23:56:55 GMT 2021 - 3.3K bytes - Viewed (0) -
tests/serializer_test.go
JobInfo: Job{ Title: "programmer", Number: 9920, Location: "Shadyside", IsIntern: false, }, CustomSerializerString: "world", } // first time insert record out := SerializerStruct{} if err := DB.Assign(data).FirstOrCreate(&out).Error; err != nil { t.Fatalf("failed to FirstOrCreate Assigned data, got error %v", err) } var result SerializerStruct
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Apr 21 14:09:38 GMT 2023 - 7.6K bytes - Viewed (0)