Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for opzione (0.24 sec)

  1. migrator/migrator.go

    //	// CREATE OR REPLACE VIEW `users_view` AS SELECT * FROM `users` WITH CHECK OPTION
    //	q := DB.Model(&User{})
    //	DB.Debug().Migrator().CreateView("user_view", gorm.ViewOption{Query: q, Replace: true, CheckOption: "WITH CHECK OPTION"})
    //
    // [subquery]: https://gorm.io/docs/advanced_query.html#SubQuery
    func (m Migrator) CreateView(name string, option gorm.ViewOption) error {
    	if option.Query == nil {
    		return gorm.ErrSubQueryRequired
    	}
    
    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. clause/locking.go

    	if locking.Table.Name != "" {
    		builder.WriteString(" OF ")
    		builder.WriteQuoted(locking.Table)
    	}
    
    	if locking.Options != "" {
    		builder.WriteByte(' ')
    		builder.WriteString(locking.Options)
    	}
    }
    
    // MergeClause merge order by clauses
    func (locking Locking) MergeClause(clause *Clause) {
    	clause.Expression = locking
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:32:56 GMT 2023
    - 773 bytes
    - Viewed (0)
  3. migrator/index.go

    }
    
    // Unique returns whether the index is unique or not.
    func (idx Index) Unique() (unique bool, ok bool) {
    	return idx.UniqueValue.Bool, idx.UniqueValue.Valid
    }
    
    // Option return the optional attribute of the index
    func (idx Index) Option() string {
    	return idx.OptionValue
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Apr 11 02:32:46 GMT 2023
    - 1023 bytes
    - Viewed (0)
  4. migrator.go

    func (db *DB) AutoMigrate(dst ...interface{}) error {
    	return db.Migrator().AutoMigrate(dst...)
    }
    
    // ViewOption view option
    type ViewOption struct {
    	Replace     bool   // If true, exec `CREATE`. If false, exec `CREATE OR REPLACE`
    	CheckOption string // optional. e.g. `WITH [ CASCADED | LOCAL ] CHECK OPTION`
    	Query       *DB    // required subquery.
    }
    
    // ColumnType column type interface
    type ColumnType interface {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  5. finisher_api.go

    			}
    		}()
    
    		if err = fc(tx); err == nil {
    			panicked = false
    			return tx.Commit().Error
    		}
    	}
    
    	panicked = false
    	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
    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)
  6. tests/migrate_test.go

    	const tblComment = "foobar comment"
    
    	type City struct {
    		gorm.Model
    		Name string `gorm:"unique"`
    	}
    
    	DB.Migrator().DropTable(&City{})
    
    	if err := DB.Set("gorm:table_options",
    		fmt.Sprintf("ENGINE InnoDB COMMENT '%s'", tblComment)).AutoMigrate(&City{}); err != nil {
    		t.Fatalf("failed to migrate cities tables, got error: %v", err)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  7. schema/index.go

    					idx.Type = index.Type
    				}
    				if idx.Where == "" {
    					idx.Where = index.Where
    				}
    				if idx.Comment == "" {
    					idx.Comment = index.Comment
    				}
    				if idx.Option == "" {
    					idx.Option = index.Option
    				}
    
    				idx.Fields = append(idx.Fields, index.Fields...)
    				sort.Slice(idx.Fields, func(i, j int) bool {
    					return idx.Fields[i].priority < idx.Fields[j].priority
    				})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  8. schema/index_test.go

    	Name5        int64  `gorm:"index:,class:FULLTEXT,comment:hello \\, world,where:age > 10"`
    	Name6        int64  `gorm:"index:profile,comment:hello \\, world,where:age > 10"`
    	Age          int64  `gorm:"index:profile,expression:ABS(age),option:WITH PARSER parser_name"`
    	OID          int64  `gorm:"index:idx_id;index:idx_oid,unique"`
    	MemberNumber string `gorm:"index:idx_id,priority:1"`
    	Name7        string `gorm:"index:type"`
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sun Feb 04 07:49:19 GMT 2024
    - 8K bytes
    - Viewed (0)
  9. clause/locking_test.go

    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Locking{Strength: clause.LockingStrengthUpdate, Options: clause.LockingOptionsNoWait}},
    			"SELECT * FROM `users` FOR UPDATE NOWAIT", nil,
    		},
    		{
    			[]clause.Interface{clause.Select{}, clause.From{}, clause.Locking{Strength: clause.LockingStrengthUpdate, Options: clause.LockingOptionsSkipLocked}},
    			"SELECT * FROM `users` FOR UPDATE SKIP LOCKED", nil,
    		},
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:32:56 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  10. gorm.go

    	if db != nil {
    		for _, plugin := range c.Plugins {
    			if err := plugin.Initialize(db); err != nil {
    				return err
    			}
    		}
    	}
    	return nil
    }
    
    // Option gorm option interface
    type Option interface {
    	Apply(*Config) error
    	AfterInitialize(*DB) error
    }
    
    // DB GORM DB definition
    type DB struct {
    	*Config
    	Error        error
    	RowsAffected int64
    	Statement    *Statement
    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