Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for vnopts (0.15 sec)

  1. migrator/migrator.go

    		).Row().Scan(&count)
    	})
    
    	return count > 0
    }
    
    // BuildIndexOptions build index options
    func (m Migrator) BuildIndexOptions(opts []schema.IndexOption, stmt *gorm.Statement) (results []interface{}) {
    	for _, opt := range opts {
    		str := stmt.Quote(opt.DBName)
    		if opt.Expression != "" {
    			str = opt.Expression
    		} else if opt.Length > 0 {
    			str += fmt.Sprintf("(%d)", opt.Length)
    		}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  2. finisher_api.go

    	return
    }
    
    // Begin begins a transaction with any transaction options opts
    func (db *DB) Begin(opts ...*sql.TxOptions) *DB {
    	var (
    		// clone statement
    		tx  = db.getInstance().Session(&Session{Context: db.Statement.Context, NewDB: db.clone == 1})
    		opt *sql.TxOptions
    		err error
    	)
    
    	if len(opts) > 0 {
    		opt = opts[0]
    	}
    
    	switch beginner := tx.Statement.ConnPool.(type) {
    	case TxBeginner:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
  3. gorm.go

    }
    
    // Open initialize db session based on dialector
    func Open(dialector Dialector, opts ...Option) (db *DB, err error) {
    	config := &Config{}
    
    	sort.Slice(opts, func(i, j int) bool {
    		_, isConfig := opts[i].(*Config)
    		_, isConfig2 := opts[j].(*Config)
    		return isConfig && !isConfig2
    	})
    
    	for _, opt := range opts {
    		if opt != nil {
    			if applyErr := opt.Apply(config); applyErr != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
Back to top