dbutil

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNKNOWN = iota
	QUESTION
	DOLLAR
	NAMED
	AT
)

Variables

This section is empty.

Functions

func DefaultInsertFunc

func DefaultInsertFunc(job *InsertJob) error

func GormV2InsertFunc

func GormV2InsertFunc(db *gorm.DB) func(job *InsertJob) error

Types

type InsertFunc

type InsertFunc func(job *InsertJob) error

type InsertJob

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

func NewJob

func NewJob(val reflect.Value, columnValues map[string]interface{}) *InsertJob

func (*InsertJob) GetData

func (job *InsertJob) GetData() interface{}

func (*InsertJob) Insert

func (job *InsertJob) Insert() error

func (*InsertJob) SetDB

func (job *InsertJob) SetDB(db *sql.DB, driver, table, tag string) *InsertJob

func (*InsertJob) SetInsertFunc

func (job *InsertJob) SetInsertFunc(fn InsertFunc) *InsertJob

Jump to

Keyboard shortcuts

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