Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for nulla (0.19 sec)

  1. tests/connpool_test.go

    			"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 ?",
    			"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)
  2. schema/serializer.go

    func (JSONSerializer) Value(ctx context.Context, field *Field, dst reflect.Value, fieldValue interface{}) (interface{}, error) {
    	result, err := json.Marshal(fieldValue)
    	if string(result) == "null" {
    		if field.TagSettings["NOT NULL"] != "" {
    			return "", nil
    		}
    		return nil, err
    	}
    	return string(result), err
    }
    
    // UnixSecondSerializer json serializer
    type UnixSecondSerializer struct{}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  3. tests/associations_has_many_test.go

    func TestHasManyAssociationUnscoped(t *testing.T) {
    	type ItemContent struct {
    		gorm.Model
    		ItemID       uint   `gorm:"not null"`
    		Name         string `gorm:"not null;type:varchar(50)"`
    		LanguageCode string `gorm:"not null;type:varchar(2)"`
    	}
    	type Item struct {
    		gorm.Model
    		Logo     string        `gorm:"not null;type:varchar(50)"`
    		Contents []ItemContent `gorm:"foreignKey:ItemID"`
    	}
    
    	tx := DB.Session(&gorm.Session{})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 15.6K bytes
    - Viewed (0)
  4. tests/embedded_struct_test.go

    	}
    }
    
    type Content struct {
    	Content interface{} `gorm:"type:String"`
    }
    
    func (c Content) Value() (driver.Value, error) {
    	// mssql driver with issue on handling null bytes https://github.com/denisenkom/go-mssqldb/issues/530,
    	b, err := json.Marshal(c)
    	return string(b[:]), err
    }
    
    func (c *Content) Scan(src interface{}) error {
    	var value Content
    	str, ok := src.(string)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  5. tests/create_test.go

    	}
    }
    
    func TestCreateOnConflictWithDefaultNull(t *testing.T) {
    	type OnConflictUser struct {
    		ID     string
    		Name   string `gorm:"default:null"`
    		Email  string
    		Mobile string `gorm:"default:'133xxxx'"`
    	}
    
    	err := DB.Migrator().DropTable(&OnConflictUser{})
    	AssertEqual(t, err, nil)
    	err = DB.AutoMigrate(&OnConflictUser{})
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  6. clause/expression.go

    		if rv.Len() == 0 {
    			builder.WriteString(" IN (NULL)")
    		} else {
    			builder.WriteString(" IN (")
    			for i := 0; i < rv.Len(); i++ {
    				if i > 0 {
    					builder.WriteByte(',')
    				}
    				builder.AddVar(builder, rv.Index(i).Interface())
    			}
    			builder.WriteByte(')')
    		}
    	default:
    		if eqNil(eq.Value) {
    			builder.WriteString(" IS NULL")
    		} else {
    			builder.WriteString(" = ")
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:45:48 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  7. migrator/migrator.go

    		currentDefaultNotNull := field.HasDefaultValue && (field.DefaultValueInterface != nil || !strings.EqualFold(field.DefaultValue, "NULL"))
    		dv, dvNotNull := columnType.DefaultValue()
    		if dvNotNull && !currentDefaultNotNull {
    			// default value -> null
    			alterColumn = true
    		} else if !dvNotNull && currentDefaultNotNull {
    			// null -> default value
    			alterColumn = true
    		} else if currentDefaultNotNull || dvNotNull {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  8. logger/sql.go

    	"reflect"
    	"regexp"
    	"strconv"
    	"strings"
    	"time"
    	"unicode"
    
    	"gorm.io/gorm/utils"
    )
    
    const (
    	tmFmtWithMS = "2006-01-02 15:04:05.999"
    	tmFmtZero   = "0000-00-00 00:00:00"
    	nullStr     = "NULL"
    )
    
    func isPrintable(s string) bool {
    	for _, r := range s {
    		if !unicode.IsPrint(r) {
    			return false
    		}
    	}
    	return true
    }
    
    // A list of Go types that should be converted to SQL primitives
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  9. tests/table_test.go

    	if !regexp.MustCompile("SELECT \\* FROM \\(SELECT .name. FROM .users. WHERE .users.\\..deleted_at. IS NULL\\) as u, \\(SELECT .name. FROM .pets. WHERE .pets.\\..deleted_at. IS NULL\\) as p WHERE .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()) {
    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  10. logger/sql_test.go

    			Result:        `create table users (name, age, height, actived, bytes, create_at, update_at, deleted_at, email, role, pass) values ("jinzhu", 1, 999.99, true, "12345", "2020-02-23 11:10:10", "2020-02-23 11:10:10", NULL, "w@g.""com", "admin", "pass")`,
    		},
    		{
    			SQL:           "create table users (name, age, height, actived, bytes, create_at, update_at, deleted_at, email, role, pass) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top