Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for series (0.25 sec)

  1. chainable_api.go

    		tx.Statement.AddClause(clause.Where{Exprs: []clause.Expression{clause.Not(conds...)}})
    	}
    	return
    }
    
    // Or add OR conditions
    //
    // Or is used to chain together queries with an OR.
    //
    //	// Find the first user with name equal to jinzhu or john
    //	db.Where("name = ?", "jinzhu").Or("name = ?", "john").First(&user)
    func (db *DB) Or(query interface{}, args ...interface{}) (tx *DB) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  2. migrator/migrator.go

    // For example, values that can pass this regular expression are:
    // - "123"
    // - "abc456"
    // -"%$#@789"
    var regFullDataType = regexp.MustCompile(`\D*(\d+)\D?`)
    
    // TODO:? Create const vars for raw sql queries ?
    
    var _ gorm.Migrator = (*Migrator)(nil)
    
    // Migrator m struct
    type Migrator struct {
    	Config
    }
    
    // Config schema config
    type Config struct {
    	CreateIndexAfterCreateTable bool
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
  3. tests/preload_test.go

    		}
    	}
    
    	if err := DB.Create(&users).Error; err != nil {
    		t.Fatalf("errors happened when create: %v", err)
    	}
    
    	var userIDs []uint
    	for _, user := range users {
    		userIDs = append(userIDs, user.ID)
    	}
    
    	var users2 []User
    	DB.Preload("Pets.Toy").Find(&users2, "id IN ?", userIDs)
    
    	for idx, user := range users2 {
    		CheckUser(t, user, users[idx])
    	}
    }
    
    func TestPreloadWithConds(t *testing.T) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  4. tests/connpool_test.go

    }
    
    // If you use BeginTx returned *sql.Tx as shown below then you can't record queries in a transaction.
    //
    //	func (c *wrapperConnPool) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) {
    //		 return c.db.BeginTx(ctx, opts)
    //	}
    //
    // You should use BeginTx returned gorm.Tx which could wrap *sql.Tx then you can record all queries.
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  5. .github/workflows/tests.yml

      mysql:
        strategy:
          matrix:
            dbversion: ['mysql:latest', 'mysql:5.7']
            go: ['1.21', '1.20', '1.19']
            platform: [ubuntu-latest]
        runs-on: ${{ matrix.platform }}
    
        services:
          mysql:
            image: ${{ matrix.dbversion }}
            env:
              MYSQL_DATABASE: gorm
              MYSQL_USER: gorm
              MYSQL_PASSWORD: gorm
              MYSQL_RANDOM_ROOT_PASSWORD: "yes"
    Others
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Jan 29 02:34:20 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  6. finisher_api.go

    	}
    
    	currentLogger.Trace(tx.Statement.Context, newLogger.BeginAt, func() (string, int64) {
    		return newLogger.SQL, tx.RowsAffected
    	}, tx.Error)
    	tx.Logger = currentLogger
    	return
    }
    
    // Pluck queries a single column from a model, returning in the slice dest. E.g.:
    //
    //	var ages []int64
    //	db.Model(&users).Pluck("age", &ages)
    func (db *DB) Pluck(column string, dest interface{}) (tx *DB) {
    	tx = db.getInstance()
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 22.7K bytes
    - Viewed (0)
Back to top