Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 46 of 46 for things (0.19 sec)

  1. schema/field.go

    		field.Scale, _ = strconv.Atoi(s)
    	}
    
    	// default value is function or null or blank (primary keys)
    	field.DefaultValue = strings.TrimSpace(field.DefaultValue)
    	skipParseDefaultValue := strings.Contains(field.DefaultValue, "(") &&
    		strings.Contains(field.DefaultValue, ")") || strings.ToLower(field.DefaultValue) == "null" || field.DefaultValue == ""
    	switch reflect.Indirect(fieldValue).Kind() {
    	case reflect.Bool:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  2. tests/sql_builder_test.go

    	stmt := newDB.First(&result).Statement
    	str := stmt.SQL.String()
    
    	if !strings.Contains(str, "rgs.id = user.id") {
    		t.Errorf("The second join condition is over written instead of combining")
    	}
    
    	if !strings.Contains(str, "`users`.`company_id` = `companies`.`id`") && !strings.Contains(str, "\"users\".\"company_id\" = \"companies\".\"id\"") {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  3. clause/clause_test.go

    package clause_test
    
    import (
    	"reflect"
    	"strings"
    	"sync"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils/tests"
    )
    
    var db, _ = gorm.Open(tests.DummyDialector{}, nil)
    
    func checkBuildClauses(t *testing.T, clauses []clause.Interface, result string, vars []interface{}) {
    	var (
    		buildNames    []string
    		buildNamesMap = map[string]bool{}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Jun 02 02:50:38 GMT 2020
    - 1012 bytes
    - Viewed (0)
  4. utils/utils_test.go

    package utils
    
    import (
    	"database/sql"
    	"database/sql/driver"
    	"errors"
    	"math"
    	"strings"
    	"testing"
    	"time"
    )
    
    func TestIsValidDBNameChar(t *testing.T) {
    	for _, db := range []string{"db", "dbName", "db_name", "db1", "1dbname", "db$name"} {
    		if fields := strings.FieldsFunc(db, IsValidDBNameChar); len(fields) != 1 {
    			t.Fatalf("failed to parse db name %v", db)
    		}
    	}
    }
    
    func TestCheckTruth(t *testing.T) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  5. tests/query_test.go

    					switch name {
    					case "Name":
    						if !strings.Contains(resultType, "string") {
    							t.Errorf("invalid data type for %v, got %v %#v", dbName, resultType, first[dbName])
    						}
    					case "Age":
    						if !strings.Contains(resultType, "int") {
    							t.Errorf("invalid data type for %v, got %v %#v", dbName, resultType, first[dbName])
    						}
    					case "Birthday":
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  6. schema/schema.go

    package schema
    
    import (
    	"context"
    	"errors"
    	"fmt"
    	"go/ast"
    	"reflect"
    	"strings"
    	"sync"
    
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/logger"
    )
    
    type callbackType string
    
    const (
    	callbackTypeBeforeCreate callbackType = "BeforeCreate"
    	callbackTypeBeforeUpdate callbackType = "BeforeUpdate"
    	callbackTypeAfterCreate  callbackType = "AfterCreate"
    	callbackTypeAfterUpdate  callbackType = "AfterUpdate"
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
Back to top