Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for CreateBatchSize (0.35 sec)

  1. gorm.go

    	var (
    		txConfig = *db.Config
    		tx       = &DB{
    			Config:    &txConfig,
    			Statement: db.Statement,
    			Error:     db.Error,
    			clone:     1,
    		}
    	)
    	if config.CreateBatchSize > 0 {
    		tx.Config.CreateBatchSize = config.CreateBatchSize
    	}
    
    	if config.SkipDefaultTransaction {
    		tx.Config.SkipDefaultTransaction = true
    	}
    
    	if config.AllowGlobalUpdate {
    		txConfig.AllowGlobalUpdate = true
    	}
    
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Wed Oct 09 11:29:48 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  2. finisher_api.go

    	"gorm.io/gorm/utils"
    )
    
    // Create inserts value, returning the inserted data's primary key in value's id
    func (db *DB) Create(value interface{}) (tx *DB) {
    	if db.CreateBatchSize > 0 {
    		return db.CreateInBatches(value, db.CreateBatchSize)
    	}
    
    	tx = db.getInstance()
    	tx.Statement.Dest = value
    	return tx.callbacks.Create().Execute(tx)
    }
    
    // CreateInBatches inserts value in batches of batchSize
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Sat Sep 14 12:58:29 UTC 2024
    - 22.8K bytes
    - Viewed (0)
Back to top