Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for create_view (0.21 sec)

  1. migrator.go

    	HasColumn(dst interface{}, field string) bool
    	RenameColumn(dst interface{}, oldName, field string) error
    	ColumnTypes(dst interface{}) ([]ColumnType, error)
    
    	// Views
    	CreateView(name string, option ViewOption) error
    	DropView(name string) error
    
    	// Constraints
    	CreateConstraint(dst interface{}, name string) error
    	DropConstraint(dst interface{}, name string) error
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  2. migrator/migrator.go

    		}
    
    		return
    	})
    
    	return columnTypes, execErr
    }
    
    // CreateView create view from Query in gorm.ViewOption.
    // Query in gorm.ViewOption is a [subquery]
    //
    //	// CREATE VIEW `user_view` AS SELECT * FROM `users` WHERE age > 20
    //	q := DB.Model(&User{}).Where("age > ?", 20)
    //	DB.Debug().Migrator().CreateView("user_view", gorm.ViewOption{Query: q})
    //
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 07:15:49 GMT 2024
    - 29K bytes
    - Viewed (0)
Back to top