go_simple_db

package module
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 6 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleDB

type SimpleDB struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func NewClickhouse

func NewClickhouse(dsn string, opts ...gorm.Option) (*SimpleDB, error)

NewClickhouse new clickhouse

func NewMysql

func NewMysql(dsn string, opts ...gorm.Option) (*SimpleDB, error)

NewMysql new mysql

func NewSimple

func NewSimple(fn func() (driver.Driver, error)) (*SimpleDB, error)

NewSimple new simple

func (*SimpleDB) BulkInsertFromSliceMap

func (s *SimpleDB) BulkInsertFromSliceMap(table string, data []map[string]interface{}, batchSize int) error

func (*SimpleDB) BulkInsertFromSliceSlice

func (s *SimpleDB) BulkInsertFromSliceSlice(table string, fields []string, data [][]interface{}, batchSize int) error

func (*SimpleDB) BulkUpdateFromSliceMapById

func (s *SimpleDB) BulkUpdateFromSliceMapById(table string, id string, data []map[string]interface{}) error

func (*SimpleDB) Close

func (s *SimpleDB) Close() error

func (*SimpleDB) Copy added in v2.0.1

func (s *SimpleDB) Copy(src string, dst string) error

func (*SimpleDB) Drop added in v2.0.1

func (s *SimpleDB) Drop(table string) error

func (*SimpleDB) GetTableColumns added in v2.0.1

func (s *SimpleDB) GetTableColumns(table string) ([]string, error)

func (*SimpleDB) GormDB

func (s *SimpleDB) GormDB() *gorm.DB

func (*SimpleDB) Name

func (s *SimpleDB) Name() string

func (*SimpleDB) Ping

func (s *SimpleDB) Ping() error

func (*SimpleDB) SqlDB

func (s *SimpleDB) SqlDB() *sql.DB

func (*SimpleDB) Truncate

func (s *SimpleDB) Truncate(table string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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