Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for Orivel (0.27 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 28 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 28 09:35:09 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  3. utils/utils.go

    	yval := reflect.ValueOf(y)
    	if xval.Kind() == reflect.Ptr && xval.IsNil() ||
    		yval.Kind() == reflect.Ptr && yval.IsNil() {
    		return false
    	}
    
    	if valuer, ok := x.(driver.Valuer); ok {
    		x, _ = valuer.Value()
    	}
    	if valuer, ok := y.(driver.Valuer); ok {
    		y, _ = valuer.Value()
    	}
    	return reflect.DeepEqual(x, y)
    }
    
    func ToString(value interface{}) string {
    	switch v := value.(type) {
    	case string:
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. soft_delete.go

    	"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.
    func (n DeletedAt) Value() (driver.Value, error) {
    	if !n.Valid {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  5. clause/expression.go

    package clause
    
    import (
    	"database/sql"
    	"database/sql/driver"
    	"go/ast"
    	"reflect"
    )
    
    // Expression expression interface
    type Expression interface {
    	Build(builder Builder)
    }
    
    // NegationExpressionBuilder negation expression builder
    type NegationExpressionBuilder interface {
    	NegationBuild(builder Builder)
    }
    
    // Expr raw expression
    type Expr struct {
    	SQL                string
    	Vars               []interface{}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Oct 10 06:45:48 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  6. logger/sql.go

    package logger
    
    import (
    	"database/sql/driver"
    	"fmt"
    	"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
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  7. 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 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 28 14:16:42 GMT 2022
    - 963 bytes
    - Viewed (0)
  8. 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 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  9. migrator/column_type.go

    	}
    	return ct.SQLColumnType.Name()
    }
    
    // DatabaseTypeName returns the database system name of the column type. If an empty
    // string is returned, then the driver type name is not supported.
    // Consult your driver documentation for a list of driver data types. Length specifiers
    // are not included.
    // Common type names include "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL",
    // "INT", and "BIGINT".
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 24 01:31:58 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  10. utils/tests/utils.go

    			t.Errorf("%v: expect: %+v, got %+v", utils.FileWithLineNum(), expect, got)
    			return
    		}
    
    		if valuer, ok := got.(driver.Valuer); ok {
    			got, _ = valuer.Value()
    		}
    
    		if valuer, ok := expect.(driver.Valuer); ok {
    			expect, _ = valuer.Value()
    		}
    
    		if got != nil {
    			got = reflect.Indirect(reflect.ValueOf(got)).Interface()
    		}
    
    		if expect != nil {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Mar 10 09:21:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
Back to top