torm

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 10 Imported by: 0

README

torm

torm is helper package to provide guide for use of github.com/jmoiron/sqlx.

How to use?

see exmaples instead.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(s Schema)

func Transaction

func Transaction(ctx context.Context, opts *sql.TxOptions, sql *sqlx.DB, proc Proc) (err error)

func VerboseLevel

func VerboseLevel(level int)

Types

type Builder

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

func NewBuilder

func NewBuilder(h handler) *Builder

func (Builder) Delete

func (t Builder) Delete() *deleteBuilder

func (Builder) Insert

func (t Builder) Insert(f ...string) *insertBuilder

func (Builder) Querier

func (t Builder) Querier() querier

func (Builder) Select

func (t Builder) Select(f ...string) *selectBuilder

func (*Builder) SetTime added in v0.0.4

func (t *Builder) SetTime(ts *time.Time)

func (Builder) Update

func (t Builder) Update(f ...string) *updateBuilder

type KV

type KV map[string]interface{}

type Proc

type Proc func(*sqlx.Tx) error

type SQL

type SQL struct {
	Query string
	Args  []interface{}
}

type Schema added in v0.0.6

type Schema interface {
	TableName() string
}

Directories

Path Synopsis
examples
internal

Jump to

Keyboard shortcuts

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