Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 40 for jinzhu1 (0.11 sec)

  1. soft_delete.go

    package gorm
    
    import (
    	"database/sql"
    	"database/sql/driver"
    	"encoding/json"
    	"reflect"
    
    	"github.com/jinzhu/now"
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/schema"
    )
    
    type DeletedAt sql.NullTime
    
    // Scan implements the Scanner interface.
    func (n *DeletedAt) Scan(value interface{}) error {
    	return (*sql.NullTime)(n).Scan(value)
    }
    
    // Value implements the driver Valuer interface.
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Feb 01 06:40:55 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  2. statement.go

    		newStmt.Settings.Store(k, v)
    		return true
    	})
    
    	return newStmt
    }
    
    // SetColumn set column's value
    //
    //	stmt.SetColumn("Name", "jinzhu") // Hooks Method
    //	stmt.SetColumn("Name", "jinzhu", true) // Callbacks Method
    func (stmt *Statement) SetColumn(name string, value interface{}, fromCallbacks ...bool) {
    	if v, ok := stmt.Dest.(map[string]interface{}); ok {
    		v[name] = value
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Jan 12 08:42:21 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  3. tests/associations_has_one_test.go

    	// Clear
    	DB.Model(&pets).Association("Toy").Clear()
    	AssertAssociationCount(t, pets, "Toy", 0, "After Clear")
    }
    
    func TestHasOneAssociationReplaceWithNonValidValue(t *testing.T) {
    	user := User{Name: "jinzhu", Account: Account{Number: "1"}}
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  4. tests/associations_test.go

    	}
    	DB.Migrator().DropTable(&AssociationEmptyUser{}, &AssociationEmptyPet{})
    	DB.AutoMigrate(&AssociationEmptyUser{}, &AssociationEmptyPet{})
    
    	id := uint(100)
    	user := AssociationEmptyUser{
    		ID:   id,
    		Name: "jinzhu",
    		Pets: []AssociationEmptyPet{
    			{AssociationEmptyUserID: &id, Name: "bar"},
    			{AssociationEmptyUserID: &id, Name: "foo"},
    		},
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Feb 08 08:29:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  5. tests/create_test.go

    package tests_test
    
    import (
    	"errors"
    	"fmt"
    	"regexp"
    	"testing"
    	"time"
    
    	"github.com/jinzhu/now"
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestCreate(t *testing.T) {
    	user := *GetUser("create", Config{})
    
    	if results := DB.Create(&user); results.Error != nil {
    		t.Fatalf("errors happened when create: %v", results.Error)
    	} else if results.RowsAffected != 1 {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  6. schema/relationship.go

    package schema
    
    import (
    	"context"
    	"fmt"
    	"reflect"
    	"strings"
    
    	"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
    	HasMany   RelationshipType = "has_many"     // HasManyRel has many relationship
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 03:46:59 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  7. tests/associations_has_many_test.go

    	}
    	if len(contents) != 0 {
    		t.Errorf("expected %d contents, got %d", 0, len(contents))
    	}
    }
    
    func TestHasManyAssociationReplaceWithNonValidValue(t *testing.T) {
    	user := User{Name: "jinzhu", Languages: []Language{{Name: "EN"}}}
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
  8. schema/field.go

    package schema
    
    import (
    	"context"
    	"database/sql"
    	"database/sql/driver"
    	"fmt"
    	"reflect"
    	"strconv"
    	"strings"
    	"sync"
    	"time"
    
    	"github.com/jinzhu/now"
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/utils"
    )
    
    // special types' reflect type
    var (
    	TimeReflectType    = reflect.TypeOf(time.Time{})
    	TimePtrReflectType = reflect.TypeOf(&time.Time{})
    	ByteReflectType    = reflect.TypeOf(uint8(0))
    )
    
    type (
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  9. src/cmd/go/internal/modfetch/zip_sum_test/testdata/zip_sums.csv

    github.com/jinzhu/copier,v0.0.0-20190924061706-b57f9002281a,h1:zPPuIq2jAWWPTrGt70eK/BSch+gFAGrNzecsoENgu2o=,c05742c031370bace7c0d5b4101d437e59ad4613bb707fda49c365b3e6af8ad2
    github.com/jinzhu/gorm,v1.9.11,h1:gaHGvE+UnWGlbWG4Y3FUwY1EcZ5n6S9WtqBA/uySMLE=,87f36225e1108c93f299d9b7e4cda23c2f9469ce3db0de59df90691c1e740565
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 18 17:29:01 UTC 2020
    - 334.9K bytes
    - Viewed (0)
  10. RELEASE.md

    Korczynski, David Svantesson, dingyuqing05, Dragan Mladjenovic, dskkato, Eli Kobrin, Erick Ochoa, Erik Schultheis, Frédéric Bastien, gaikwadrahul8, Gauri1 Deshpande, guozhong.zhuang, H. Vetinari, Isaac Cilia Attard, Jake Hall, Jason Furmanek, Jerry Ge, Jinzhe Zeng, JJ, johnnkp, Jonathan Albrecht, jongkweh, justkw, Kanvi Khanna, kikoxia, Koan-Sin Tan, Kun-Lu, ltsai1, Lu Teng, luliyucoordinate, Mahmoud Abuzaina, mdfaijul, Milos Puzovic, Nathan Luehr, Om Thakkar, pateldeev, Peng Sun, Philipp Hack, pjpratik,...
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 23:24:08 UTC 2024
    - 730.3K bytes
    - Viewed (0)
Back to top