engine

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: MIT Imports: 14 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, opt *Option) (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) Reset

func (e *Engine) Reset()

func (*Engine) SetLogger

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

func (*Engine) Sync

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

type Option

type Option struct {
	rt.Option
	DatabaseTZ *time.Location
}

Jump to

Keyboard shortcuts

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