- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 144 for GORM (0.01 sec)
-
clause/from_test.go
package clause_test import ( "fmt" "testing" "gorm.io/gorm/clause" ) func TestFrom(t *testing.T) { results := []struct { Clauses []clause.Interface Result string Vars []interface{} }{ { []clause.Interface{clause.Select{}, clause.From{}}, "SELECT * FROM `users`", nil, }, { []clause.Interface{ clause.Select{}, clause.From{ Tables: []clause.Table{{Name: "users"}},
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Wed Jul 15 02:25:10 UTC 2020 - 1.9K bytes - Viewed (0) -
migrator/index.go
package migrator import "database/sql" // Index implements gorm.Index interface type Index struct { TableName string NameValue string ColumnList []string PrimaryKeyValue sql.NullBool UniqueValue sql.NullBool OptionValue string } // Table return the table name of the index. func (idx Index) Table() string { return idx.TableName } // Name return the name of the index.Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Tue Apr 11 02:32:46 UTC 2023 - 1023 bytes - Viewed (0) -
generics.go
package gorm import ( "context" "database/sql" "errors" "fmt" "reflect" "sort" "strings" "gorm.io/gorm/clause" "gorm.io/gorm/logger" "gorm.io/gorm/schema" ) type result struct { Result sql.Result RowsAffected int64 } func (info *result) ModifyStatement(stmt *Statement) { stmt.Result = info } // Build implements clause.Expression interface
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Nov 02 14:09:18 UTC 2025 - 25.9K bytes - Viewed (0) -
statement.go
package gorm import ( "context" "database/sql" "database/sql/driver" "fmt" "reflect" "regexp" "sort" "strconv" "strings" "sync" "gorm.io/gorm/clause" "gorm.io/gorm/logger" "gorm.io/gorm/schema" "gorm.io/gorm/utils" ) // Statement statement type Statement struct { *DB TableExpr *clause.Expr Table string Model interface{}
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 12 04:33:27 UTC 2025 - 20.9K bytes - Viewed (0) -
clause/where_test.go
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Apr 25 12:22:53 UTC 2024 - 6.2K bytes - Viewed (0) -
schema/relationship.go
package schema import ( "context" "fmt" "reflect" "strings" "sync" "github.com/jinzhu/inflection" "golang.org/x/text/cases" "golang.org/x/text/language" "gorm.io/gorm/clause" ) // RelationshipType relationship type type RelationshipType string const ( HasOne RelationshipType = "has_one" // HasOneRel has one relationship
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Nov 16 04:11:05 UTC 2025 - 23.1K bytes - Viewed (1) -
prepare_stmt.go
package gorm import ( "context" "database/sql" "database/sql/driver" "errors" "reflect" "sync" "time" "gorm.io/gorm/internal/stmt_store" ) type PreparedStmtDB struct { Stmts stmt_store.Store Mux *sync.RWMutex ConnPool } // NewPreparedStmtDB creates and initializes a new instance of PreparedStmtDB. // // Parameters:
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Apr 25 08:22:26 UTC 2025 - 5.7K bytes - Viewed (0) -
internal/stmt_store/stmt_store.go
package stmt_store import ( "context" "database/sql" "math" "sync" "time" "gorm.io/gorm/internal/lru" ) type Stmt struct { *sql.Stmt Transaction bool prepared chan struct{} prepareErr error } func (stmt *Stmt) Error() error { return stmt.prepareErr } func (stmt *Stmt) Close() error { <-stmt.prepared if stmt.Stmt != nil { return stmt.Stmt.Close() } return nil
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sun Apr 27 06:05:16 UTC 2025 - 6K bytes - Viewed (0) -
logger/sql_test.go
package logger_test import ( "database/sql/driver" "encoding/json" "fmt" "regexp" "strings" "testing" "github.com/jinzhu/now" "gorm.io/gorm/logger" ) type JSON json.RawMessage func (j JSON) Value() (driver.Value, error) { if len(j) == 0 { return nil, nil } return json.RawMessage(j).MarshalJSON() } type ExampleStruct struct { Name string Val string }
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Thu Mar 21 08:00:02 UTC 2024 - 8.4K bytes - Viewed (0) -
tests/associations_has_one_test.go
package tests_test import ( "testing" . "gorm.io/gorm/utils/tests" ) func TestHasOneAssociation(t *testing.T) { user := *GetUser("hasone", Config{Account: true}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } CheckUser(t, user, user) // Find var user2 User DB.Find(&user2, "id = ?", user.ID) DB.Model(&user2).Association("Account").Find(&user2.Account)
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 7.1K bytes - Viewed (0)