Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for Orivel (0.23 sec)

  1. prepare_stmt.go

    package gorm
    
    import (
    	"context"
    	"database/sql"
    	"database/sql/driver"
    	"errors"
    	"reflect"
    	"sync"
    )
    
    type Stmt struct {
    	*sql.Stmt
    	Transaction bool
    	prepared    chan struct{}
    	prepareErr  error
    }
    
    type PreparedStmtDB struct {
    	Stmts       map[string]*Stmt
    	PreparedSQL []string
    	Mux         *sync.RWMutex
    	ConnPool
    }
    
    func NewPreparedStmtDB(connPool ConnPool) *PreparedStmtDB {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  2. tests/scanner_valuer_test.go

    package tests_test
    
    import (
    	"context"
    	"database/sql"
    	"database/sql/driver"
    	"encoding/json"
    	"errors"
    	"fmt"
    	"reflect"
    	"regexp"
    	"strconv"
    	"testing"
    	"time"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestScannerValuer(t *testing.T) {
    	DB.Migrator().DropTable(&ScannerValuerStruct{})
    	if err := DB.Migrator().AutoMigrate(&ScannerValuerStruct{}); err != nil {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  3. tests/connection_test.go

    package tests_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/driver/mysql"
    	"gorm.io/gorm"
    )
    
    func TestWithSingleConnection(t *testing.T) {
    	expectedName := "test"
    	var actualName string
    
    	setSQL, getSQL := getSetSQL(DB.Dialector.Name())
    	if len(setSQL) == 0 || len(getSQL) == 0 {
    		return
    	}
    
    	err := DB.Connection(func(tx *gorm.DB) error {
    		if err := tx.Exec(setSQL, expectedName).Error; err != nil {
    			return err
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Jan 28 14:16:42 GMT 2022
    - 963 bytes
    - Viewed (0)
  4. statement.go

    package gorm
    
    import (
    	"context"
    	"database/sql"
    	"database/sql/driver"
    	"fmt"
    	"reflect"
    	"regexp"
    	"sort"
    	"strconv"
    	"strings"
    	"sync"
    
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/logger"
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils"
    )
    
    // Statement statement
    type Statement struct {
    	*DB
    	TableExpr            *clause.Expr
    	Table                string
    	Model                interface{}
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  5. schema/serializer.go

    	fieldValue      interface{}
    }
    
    // Scan implements sql.Scanner interface
    func (s *serializer) Scan(value interface{}) error {
    	s.value = value
    	return nil
    }
    
    // Value implements driver.Valuer interface
    func (s serializer) Value() (driver.Value, error) {
    	return s.SerializeValuer.Value(s.Context, s.Field, s.Destination, s.fieldValue)
    }
    
    // SerializerInterface serializer interface
    type SerializerInterface interface {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. 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 {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  7. utils/utils_test.go

    		{"error not equal", errors.New("1"), errors.New("2"), false},
    		{"driver.Valuer equal", ModifyAt{Time: now, Valid: true}, ModifyAt{Time: now, Valid: true}, true},
    		{"driver.Valuer not equal", ModifyAt{Time: now, Valid: true}, ModifyAt{Time: now.Add(time.Second), Valid: true}, false},
    		{"driver.Valuer equal (ptr to nil ptr)", (*ModifyAt)(nil), &ModifyAt{}, false},
    	}
    	for _, test := range assertEqualTests {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  8. scan.go

    package gorm
    
    import (
    	"database/sql"
    	"database/sql/driver"
    	"reflect"
    	"time"
    
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils"
    )
    
    // prepareValues prepare values slice
    func prepareValues(values []interface{}, db *DB, columnTypes []*sql.ColumnType, columns []string) {
    	if db.Statement.Schema != nil {
    		for idx, name := range columns {
    			if field := db.Statement.Schema.LookUpField(name); field != nil {
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Mar 15 06:14:48 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  9. tests/tests_test.go

    package tests_test
    
    import (
    	"log"
    	"math/rand"
    	"os"
    	"path/filepath"
    	"time"
    
    	"gorm.io/driver/mysql"
    	"gorm.io/driver/postgres"
    	"gorm.io/driver/sqlite"
    	"gorm.io/driver/sqlserver"
    	"gorm.io/gorm"
    	"gorm.io/gorm/logger"
    	. "gorm.io/gorm/utils/tests"
    )
    
    var DB *gorm.DB
    var (
    	mysqlDSN     = "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True&loc=Local"
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  10. tests/connpool_test.go

    package tests_test
    
    import (
    	"context"
    	"database/sql"
    	"os"
    	"reflect"
    	"testing"
    
    	"gorm.io/driver/mysql"
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    type wrapperTx struct {
    	*sql.Tx
    	conn *wrapperConnPool
    }
    
    func (c *wrapperTx) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) {
    	c.conn.got = append(c.conn.got, query)
    	return c.Tx.PrepareContext(ctx, query)
    }
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
Back to top