query

package
v2.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkInsert

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

func NewBulkInsert

func NewBulkInsert(table, colNames, valueQuery string) *BulkInsert

NewBulkInsert

eg 1) INSERT INTO chair(id, name, description, thumbnail, price, height, width, depth, color, features, kind, popularity, stock) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)

table -> "chair"
columns -> "id, name, description, thumbnail, price, height, width, depth, color, features, kind, popularity, stock"
valueQuery -> "(?,?,?,?,?,?,?,?,?,?,?,?,?)"

eg 2) INSERT INTO chair VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)

table -> "chair"
columns -> ""
valueQuery -> "(?,?,?,?,?,?,?,?,?,?,?,?,?)"

func NewBulkInsertWithArgNum

func NewBulkInsertWithArgNum(table, colNames, valueQuery string, argNum int) *BulkInsert

func (*BulkInsert) Add

func (b *BulkInsert) Add(args ...any)

func (*BulkInsert) Query

func (b *BulkInsert) Query() (string, []any)

type BulkUpdate

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

func NewBulkUpdate

func NewBulkUpdate(table, keyCol string, valueCols []string) *BulkUpdate

func (*BulkUpdate) Add

func (b *BulkUpdate) Add(key any, values ...any) error

func (*BulkUpdate) Query

func (b *BulkUpdate) Query(whereQuery string, whereArgs ...any) (string, []any)

Jump to

Keyboard shortcuts

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