persist_db

package
v0.0.0-...-678c32f Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseModule

type DatabaseModule struct {
}

func (DatabaseModule) Name

func (module DatabaseModule) Name() string

func (DatabaseModule) Setup

func (module DatabaseModule) Setup(cfg *Config)

func (DatabaseModule) Start

func (module DatabaseModule) Start() error

func (DatabaseModule) Stop

func (module DatabaseModule) Stop() error

type PersistConfig

type PersistConfig struct {
	//Driver only `mysql` and `sqlite` are available
	Driver string               `config:"driver"`
	SQLite *sqlite.SQLiteConfig `config:"sqlite"`
	MySQL  *mysql.MySQLConfig   `config:"mysql"`
}

type SQLORM

type SQLORM struct {
	// contains filtered or unexported fields
}

func (SQLORM) Count

func (handler SQLORM) Count(o interface{}) (int, error)

func (SQLORM) Create

func (handler SQLORM) Create(o interface{}) error

func (SQLORM) Delete

func (handler SQLORM) Delete(o interface{}) error

func (SQLORM) Get

func (handler SQLORM) Get(o interface{}) error

func (SQLORM) GetBy

func (handler SQLORM) GetBy(field string, value interface{}, t interface{}, to interface{}) (error, api.Result)

func (SQLORM) GroupBy

func (handler SQLORM) GroupBy(o interface{}, selectField, groupField string, haveQuery string, haveValue interface{}) (error, map[string]interface{})

func (SQLORM) RegisterSchema

func (handler SQLORM) RegisterSchema(t interface{}) error

func (SQLORM) Save

func (handler SQLORM) Save(o interface{}) error

func (SQLORM) Search

func (handler SQLORM) Search(t interface{}, o interface{}, q *api.Query) (error, api.Result)

func (SQLORM) Update

func (handler SQLORM) Update(o interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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