Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 41 - 50 of 70 for dialects (0.69 seconds)

  1. tests/connpool_test.go

    	c.got = append(c.got, query)
    	return c.db.QueryRowContext(ctx, query, args...)
    }
    
    func TestConnPoolWrapper(t *testing.T) {
    	dialect := os.Getenv("GORM_DIALECT")
    	if dialect != "mysql" {
    		t.SkipNow()
    	}
    
    	dbDSN := os.Getenv("GORM_DSN")
    	if dbDSN == "" {
    		dbDSN = "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True&loc=Local"
    	}
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sun May 25 07:40:40 GMT 2025
    - 5.5K bytes
    - Click Count (0)
  2. internal/rest/rpc-stats.go

    type RPCStats struct {
    	Errs uint64
    
    	DialAvgDuration uint64
    	TTFBAvgDuration uint64
    	DialErrs        uint64
    }
    
    // GetRPCStats returns RPC stats, include calls errors and dhcp/tcp metrics
    func GetRPCStats() RPCStats {
    	s := RPCStats{
    		Errs:     atomic.LoadUint64(&globalStats.errs),
    		DialErrs: atomic.LoadUint64(&globalStats.tcpDialErrs),
    	}
    	if v := atomic.LoadUint64(&globalStats.tcpDialCount); v > 0 {
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Tue Aug 13 18:21:34 GMT 2024
    - 2.6K bytes
    - Click Count (0)
  3. statement.go

    		writer.WriteByte(')')
    	case clause.Expr:
    		v.Build(stmt)
    	case string:
    		stmt.DB.Dialector.QuoteTo(writer, v)
    	case []string:
    		writer.WriteByte('(')
    		for idx, d := range v {
    			if idx > 0 {
    				writer.WriteByte(',')
    			}
    			stmt.DB.Dialector.QuoteTo(writer, d)
    		}
    		writer.WriteByte(')')
    	default:
    		stmt.DB.Dialector.QuoteTo(writer, fmt.Sprint(field))
    	}
    }
    
    // Quote returns quoted value
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Fri Sep 12 04:33:27 GMT 2025
    - 20.9K bytes
    - Click Count (0)
  4. tests/main_test.go

    package tests_test
    
    import (
    	"testing"
    
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestExceptionsWithInvalidSql(t *testing.T) {
    	if name := DB.Dialector.Name(); name == "sqlserver" {
    		t.Skip("skip sqlserver due to it will raise data race for invalid sql")
    	}
    
    	var columns []string
    	if DB.Where("sdsd.zaaa = ?", "sd;;;aa").Pluck("aaa", &columns).Error == nil {
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:35:55 GMT 2026
    - 1.5K bytes
    - Click Count (0)
  5. tests/chainable_api_test.go

    package tests
    
    import (
    	"context"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/schema"
    )
    
    // testDialector is a minimal Dialector implementation used only for unit tests in-memory.
    type testDialector struct{}
    
    func (d testDialector) Name() string                                   { return "test" }
    func (d testDialector) Initialize(*gorm.DB) error                      { return nil }
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Jan 31 08:39:40 GMT 2026
    - 3.9K bytes
    - Click Count (0)
  6. cmd/metrics-v3-system-network.go

    	connStats := globalConnStats.toServerConnStats()
    	rpcStats := rest.GetRPCStats()
    	if globalIsDistErasure {
    		m.Set(internodeErrorsTotal, float64(rpcStats.Errs))
    		m.Set(internodeDialErrorsTotal, float64(rpcStats.DialErrs))
    		m.Set(internodeDialAvgTimeNanos, float64(rpcStats.DialAvgDuration))
    		m.Set(internodeSentBytesTotal, float64(connStats.internodeOutputBytes))
    		m.Set(internodeRecvBytesTotal, float64(connStats.internodeInputBytes))
    	}
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  7. tests/generics_test.go

    		t.Fatalf("failed to nested preload")
    	}
    
    	if DB.Dialector.Name() == "mysql" {
    		// mysql 5.7 doesn't support row_number()
    		if strings.HasPrefix(DB.Dialector.(*mysql.Dialector).ServerVersion, "5.7") {
    			return
    		}
    	}
    	if DB.Dialector.Name() == "sqlserver" {
    		// sqlserver doesn't support order by in subquery
    		return
    	}
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Tue Dec 30 08:11:14 GMT 2025
    - 34.9K bytes
    - Click Count (0)
  8. tests/table_test.go

    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    	r = dryDB.Create(&UserWithTable{}).Statement
    	if DB.Dialector.Name() != "sqlite" {
    		if !regexp.MustCompile(`INSERT INTO .gorm.\..user. (.*name.*) VALUES (.*)`).MatchString(r.Statement.SQL.String()) {
    			t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    		}
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Jul 21 02:46:58 GMT 2025
    - 12.7K bytes
    - Click Count (0)
  9. tests/serializer_test.go

    	EncryptedString        EncryptedString
    }
    
    func (*SerializerPostgresStruct) TableName() string { return "serializer_structs" }
    
    func adaptorSerializerModel(s *SerializerStruct) interface{} {
    	if DB.Dialector.Name() == "postgres" || DB.Dialector.Name() == "gaussdb" {
    		sps := SerializerPostgresStruct(*s)
    		return &sps
    	}
    	return s
    }
    
    type Roles []string
    
    type Job struct {
    	Title    string
    	Number   int
    	Location string
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Nov 22 03:14:36 GMT 2025
    - 9.3K bytes
    - Click Count (0)
  10. tests/update_test.go

    	}
    }
    
    // only sqlite, postgres, gaussdb, sqlserver support returning
    func TestUpdateReturning(t *testing.T) {
    	if DB.Dialector.Name() != "sqlite" && DB.Dialector.Name() != "postgres" && DB.Dialector.Name() != "gaussdb" && DB.Dialector.Name() != "sqlserver" {
    		return
    	}
    
    	users := []*User{
    		GetUser("update-returning-1", Config{}),
    		GetUser("update-returning-2", Config{}),
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Jul 21 02:46:58 GMT 2025
    - 30.4K bytes
    - Click Count (0)
Back to Top