Help us shape the future of Go! Take the 2026 Go Developer Survey

gorpmapping

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: BSD-3-Clause Imports: 9 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetAllOptions = gorpmapper.GetAllOptions
View Source
var GetOptions = gorpmapper.GetOptions

Functions

func CheckSignature

func CheckSignature(i gorpmapper.Canonicaller, sig []byte) (bool, error)

func ConfigureKeys

func ConfigureKeys(signatureKeys, encryptionKeys []keyloader.KeyConfig) error

func Delete

func Delete(db gorp.SqlExecutor, i interface{}) error

Delete value in given db.

func Get

func Get(ctx context.Context, db gorp.SqlExecutor, q Query, i interface{}, opts ...GetOptionFunc) (bool, error)

Get a value from database.

func GetAll

func GetAll(ctx context.Context, db gorp.SqlExecutor, q Query, i interface{}, opts ...GetAllOptionFunc) error

GetAll values from database.

func GetInt

func GetInt(db gorp.SqlExecutor, q Query) (int64, error)

GetInt a value from database.

func IDStringsToQueryString

func IDStringsToQueryString(ids []string) string

IDStringsToQueryString returns a comma separated list of given string ids.

func IDsToQueryString

func IDsToQueryString(ids []int64) string

IDsToQueryString returns a comma separated list of given ids.

func Insert

func Insert(db gorp.SqlExecutor, i interface{}) error

Insert value in given db.

func InsertAndSign

InsertAndSign a data in database, given data should implement canonicaller interface.

func JSONNullString

func JSONNullString(s sql.NullString, holder interface{}) error

JSONNullString sets the holder with unmarshalled sql.NullString

func JSONToNullString

func JSONToNullString(i interface{}) (sql.NullString, error)

JSONToNullString returns a valid sql.NullString with json-marshalled i

func New

func New(target interface{}, name string, autoIncrement bool, keys ...string) gorpmapper.TableMapping

func Register

func Register(ms ...gorpmapper.TableMapping)

func Update

func Update(db gorp.SqlExecutor, i interface{}) error

Update value in given db.

func UpdateAndSign

UpdateAndSign a data in database, given data should implement canonicaller interface.

func UpdateColumns

func UpdateColumns(db gorp.SqlExecutor, i interface{}, columnFilter gorp.ColumnFilter) error

func UpdateColumnsAndSign

func UpdateColumnsAndSign(ctx context.Context, db gorpmapper.SqlExecutorWithTx, i gorpmapper.Canonicaller, colFilter gorp.ColumnFilter) error

UpdateColumnsAndSign a data in database, given data should implement canonicaller interface.

Types

type GetAllOptionFunc added in v0.55.2

type GetAllOptionFunc = gorpmapper.GetAllOptionFunc

type GetOptionFunc

type GetOptionFunc = gorpmapper.GetOptionFunc

type Query

type Query struct {
	gorpmapper.Query
}

func NewQuery

func NewQuery(q string) Query

NewQuery returns a new query from given string request.

func (Query) Args

func (q Query) Args(as ...interface{}) Query

Args store query arguments.

func (Query) Limit

func (q Query) Limit(i int) Query

Jump to

Keyboard shortcuts

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