engine

package
v0.0.0-...-82d63aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	TZLocation *time.Location // The timezone of the application
	DatabaseTZ *time.Location // The timezone of the database
	// contains filtered or unexported fields
}

func New

func New(dialectName constants.DIALECT, source string) (e *Engine, err error)

func (*Engine) CreateIndex

func (e *Engine) CreateIndex(table *schema.Table) error

func (*Engine) CreateTable

func (e *Engine) CreateTable(table *schema.Table) error

func (*Engine) CreateUnique

func (e *Engine) CreateUnique(table *schema.Table) error

func (*Engine) DropIndexes

func (e *Engine) DropIndexes(table *schema.Table) error

DropIndexes drop indexes

func (*Engine) DropTable

func (e *Engine) DropTable(models ...interface{}) error

func (*Engine) GetProvider

func (e *Engine) GetProvider() *rt.Provider

func (*Engine) HasTable

func (e *Engine) HasTable(table *schema.Table) error

func (*Engine) SetConnMaxIdleTime

func (e *Engine) SetConnMaxIdleTime(d time.Duration) *Engine

func (*Engine) SetConnMaxLifetime

func (e *Engine) SetConnMaxLifetime(d time.Duration) *Engine

func (*Engine) SetLogSQL

func (e *Engine) SetLogSQL(log bool) *Engine

func (*Engine) SetLogger

func (e *Engine) SetLogger(log logger.GpaLogger)

func (*Engine) SetMaxIdleConns

func (e *Engine) SetMaxIdleConns(n int) *Engine

func (*Engine) SetMaxOpenConns

func (e *Engine) SetMaxOpenConns(n int) *Engine

func (*Engine) Sync

func (e *Engine) Sync(beans ...interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL