sqlutil

package
v0.0.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable added in v0.1.0

func CreateTable(ctx context.Context, dbOpt dbutil.DBOpt, opt online.CreateTableOpt) error

func Get

func Get(ctx context.Context, db *sqlx.DB, opt online.GetOpt, backend types.BackendType) (dbutil.RowMap, error)

func Import

func Import(ctx context.Context, db *sqlx.DB, opt online.ImportOpt, backend types.BackendType) error

func MultiGet

func MultiGet(ctx context.Context, db *sqlx.DB, opt online.MultiGetOpt, backend types.BackendType) (map[string]dbutil.RowMap, error)

response: map[entity_key]map[feature_name]feature_value

func Purge

func Purge(ctx context.Context, db *sqlx.DB, revisionID int, backend types.BackendType) error

func PurgeTx added in v0.1.0

func PurgeTx(ctx context.Context, tx *sqlx.Tx, tableName string, backend types.BackendType) error

Types

type PushCondition

type PushCondition struct {
	Inserts            string
	InsertPlaceholders string
	InsertValues       []interface{}
	UpdateValues       []interface{}
	UpdatePlaceholders string
}

func BuildPushCondition

func BuildPushCondition(opt online.PushOpt, backend types.BackendType) *PushCondition

Jump to

Keyboard shortcuts

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