- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 163 for sql (0.01 sec)
-
tests/update_has_one_test.go
package tests_test import ( "database/sql" "testing" "time" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestUpdateHasOne(t *testing.T) { user := *GetUser("update-has-one", Config{}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } user.Account = Account{Number: "account-has-one-association"} if err := DB.Save(&user).Error; err != nil {
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Jul 14 06:55:54 UTC 2022 - 3.6K bytes - Viewed (0) -
tests/non_std_test.go
package tests_test import ( "testing" "time" ) type Animal struct { Counter uint64 `gorm:"primary_key:yes"` Name string `gorm:"DEFAULT:'galeone'"` From string // test reserved sql keyword as field name Age *time.Time unexported string // unexported value CreatedAt time.Time UpdatedAt time.Time } func TestNonStdPrimaryKeyAndDefaultValues(t *testing.T) { DB.Migrator().DropTable(&Animal{})
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed May 08 04:07:58 UTC 2024 - 1.9K bytes - Viewed (0) -
association.go
for _, queryClause := range association.Relationship.JoinTable.QueryClauses { joinStmt.AddClause(queryClause) } joinStmt.Build("WHERE") if len(joinStmt.SQL.String()) > 0 { tx.Clauses(clause.Expr{SQL: strings.Replace(joinStmt.SQL.String(), "WHERE ", "", 1), Vars: joinStmt.Vars}) } } tx = tx.Session(&Session{QueryFields: true}).Clauses(clause.From{Joins: []clause.Join{{
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 21.5K bytes - Viewed (0) -
schema/relationship.go
func (constraint *Constraint) GetName() string { return constraint.Name } func (constraint *Constraint) Build() (sql string, vars []interface{}) { sql = "CONSTRAINT ? FOREIGN KEY ? REFERENCES ??" if constraint.OnDelete != "" { sql += " ON DELETE " + constraint.OnDelete } if constraint.OnUpdate != "" { sql += " ON UPDATE " + constraint.OnUpdate } foreignKeys := make([]interface{}, 0, len(constraint.ForeignKeys))
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Aug 18 11:44:52 UTC 2025 - 23.1K bytes - Viewed (1) -
schema/interfaces.go
package schema import ( "gorm.io/gorm/clause" ) // ConstraintInterface database constraint interface type ConstraintInterface interface { GetName() string Build() (sql string, vars []interface{}) } // GormDataTypeInterface gorm data type interface type GormDataTypeInterface interface { GormDataType() string } // FieldNewValuePool field new scan value pool type FieldNewValuePool interface { Get() interface{}
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Sun Feb 04 07:49:19 UTC 2024 - 980 bytes - Viewed (0) -
src/main/java/org/codelibs/core/beans/impl/PropertyDescImpl.java
import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.sql.Time; import java.sql.Timestamp; import java.util.Collection; import java.util.Map; import org.codelibs.core.beans.BeanDesc; import org.codelibs.core.beans.ParameterizedClassDesc; import org.codelibs.core.beans.PropertyDesc;
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 24 01:52:43 UTC 2025 - 15.1K bytes - Viewed (0) -
src/test/java/org/codelibs/core/exception/SQLRuntimeExceptionTest.java
* governing permissions and limitations under the License. */ package org.codelibs.core.exception; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import java.sql.SQLException; import java.util.Locale; import org.codelibs.core.misc.LocaleUtil; import org.junit.After; import org.junit.Before; import org.junit.Test; /** * @author manhole */
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Sat May 10 01:32:17 UTC 2025 - 3.2K bytes - Viewed (0) -
docs/sts/dex.yaml
# path is provided, dex's HTTP service will listen at a non-root URL. issuer: http://127.0.0.1:5556/dex # The storage configuration determines where dex stores its state. Supported # options include SQL flavors and Kubernetes third party resources. # # See the storage document at Documentation/storage.md for further information. storage: type: sqlite3 config: file: examples/dex.db
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Wed Jul 15 11:55:55 UTC 2020 - 2.7K bytes - Viewed (0) -
utils/utils.go
package utils import ( "database/sql/driver" "fmt" "path/filepath" "reflect" "runtime" "strconv" "strings" "unicode" ) var gormSourceDir string func init() { _, file, _, _ := runtime.Caller(0) // compatible solution to get gorm source directory with various operating systems gormSourceDir = sourceDir(file) } func sourceDir(file string) string { dir := filepath.Dir(file)
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 4.1K bytes - Viewed (0) -
tests/generics_test.go
} } func TestGenericsToSQL(t *testing.T) { ctx := context.Background() sql := DB.ToSQL(func(tx *gorm.DB) *gorm.DB { gorm.G[User](tx).Limit(10).Find(ctx) return tx }) if !regexp.MustCompile("SELECT \\* FROM .users..* 10").MatchString(sql) { t.Errorf("ToSQL: got wrong sql with Generics API %v", sql) } } func TestGenericsScanUUID(t *testing.T) { ctx := context.Background()
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Thu Sep 04 13:13:16 UTC 2025 - 28K bytes - Viewed (0)