Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is a Loader for gorm schema.
type Option ¶ added in v0.1.1
type Option func(*Loader)
Option configures the Loader.
func WithConfig ¶ added in v0.1.1
WithConfig sets the gorm config.
type ViewDefiner ¶ added in v0.4.0
type ViewDefiner interface {
ViewDef(dialect string) []ViewOption
}
ViewDefiner defines a view.
type ViewOption ¶ added in v0.4.0
type ViewOption func(*viewBuilder)
ViewOption configures a viewBuilder.
func BuildStmt ¶ added in v0.4.0
func BuildStmt(fn func(db *gorm.DB) *gorm.DB) ViewOption
BuildStmt accepts a function with gorm query builder to create a CREATE VIEW statement. With this option, the view's name will be the same as the model's table name
func CreateStmt ¶ added in v0.4.0
func CreateStmt(stmt string) ViewOption
CreateStmt accepts raw SQL to create a CREATE VIEW statement.
Click to show internal directories.
Click to hide internal directories.