Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 144 for GORM (0.01 sec)

  1. .github/FUNDING.yml

    # These are supported funding model platforms
    
    github: [jinzhu]
    patreon: jinzhu
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun Jun 07 04:47:26 UTC 2020
    - 102 bytes
    - Viewed (0)
  2. logger/slog.go

    //go:build go1.21
    
    package logger
    
    import (
    	"context"
    	"errors"
    	"fmt"
    	"log/slog"
    	"time"
    
    	"gorm.io/gorm/utils"
    )
    
    type slogLogger struct {
    	Logger                    *slog.Logger
    	LogLevel                  LogLevel
    	SlowThreshold             time.Duration
    	Parameterized             bool
    	Colorful                  bool // Ignored in slog
    	IgnoreRecordNotFoundError bool
    }
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Oct 30 10:56:26 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  3. errors.go

    package gorm
    
    import (
    	"errors"
    
    	"gorm.io/gorm/logger"
    )
    
    var (
    	// ErrRecordNotFound record not found error
    	ErrRecordNotFound = logger.ErrRecordNotFound
    	// ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`
    	ErrInvalidTransaction = errors.New("invalid transaction")
    	// ErrNotImplemented not implemented
    	ErrNotImplemented = errors.New("not implemented")
    	// ErrMissingWhereClause missing where clause
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Apr 26 02:53:17 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  4. association.go

    package gorm
    
    import (
    	"fmt"
    	"reflect"
    	"strings"
    
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils"
    )
    
    // Association Mode contains some helper methods to handle relationship things easily.
    type Association struct {
    	DB           *DB
    	Relationship *schema.Relationship
    	Unscope      bool
    	Error        error
    }
    
    func (db *DB) Association(column string) *Association {
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun Oct 26 12:09:12 UTC 2025
    - 23.6K bytes
    - Viewed (0)
  5. clause/values_test.go

    package clause_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestValues(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{
    				clause.Insert{},
    				clause.Values{
    					Columns: []clause.Column{{Name: "name"}, {Name: "age"}},
    					Values:  [][]interface{}{{"jinzhu", 18}, {"josh", 1}},
    				},
    			},
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 691 bytes
    - Viewed (0)
  6. tests/group_by_test.go

    package tests_test
    
    import (
    	"testing"
    
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestGroupBy(t *testing.T) {
    	users := []User{{
    		Name:     "groupby",
    		Age:      10,
    		Birthday: Now(),
    		Active:   true,
    	}, {
    		Name:     "groupby",
    		Age:      20,
    		Birthday: Now(),
    	}, {
    		Name:     "groupby",
    		Age:      30,
    		Birthday: Now(),
    		Active:   true,
    	}, {
    		Name:     "groupby1",
    		Age:      110,
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  7. schema/schema.go

    package schema
    
    import (
    	"context"
    	"errors"
    	"fmt"
    	"go/ast"
    	"path"
    	"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"
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Oct 31 12:13:56 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  8. tests/associations_many2many_test.go

    package tests_test
    
    import (
    	"fmt"
    	"sync"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestMany2ManyAssociation(t *testing.T) {
    	user := *GetUser("many2many", Config{Languages: 2})
    
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	CheckUser(t, user, user)
    
    	// Find
    	var user2 User
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sat Jun 10 13:05:19 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  9. utils/tests/utils.go

    package tests
    
    import (
    	"database/sql/driver"
    	"fmt"
    	"go/ast"
    	"reflect"
    	"testing"
    	"time"
    
    	"gorm.io/gorm/utils"
    )
    
    func AssertObjEqual(t *testing.T, r, e interface{}, names ...string) {
    	for _, name := range names {
    		rv := reflect.Indirect(reflect.ValueOf(r))
    		ev := reflect.Indirect(reflect.ValueOf(e))
    		if rv.IsValid() != ev.IsValid() {
    			t.Errorf("%v: expect: %+v, got %+v", utils.FileWithLineNum(), r, e)
    			return
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Mar 10 09:21:56 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  10. clause/joins.go

    package clause
    
    import "gorm.io/gorm/utils"
    
    type JoinType string
    
    const (
    	CrossJoin JoinType = "CROSS"
    	InnerJoin JoinType = "INNER"
    	LeftJoin  JoinType = "LEFT"
    	RightJoin JoinType = "RIGHT"
    )
    
    type JoinTarget struct {
    	Type        JoinType
    	Association string
    	Subquery    Expression
    	Table       string
    }
    
    func Has(name string) JoinTarget {
    	return JoinTarget{Type: InnerJoin, Association: name}
    }
    
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Sun May 25 07:40:40 UTC 2025
    - 1.5K bytes
    - Viewed (0)
Back to top