torm

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 9 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(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{}
}

Directories

Path Synopsis
examples
complex_query command
simple_query command
transaction command
internal

Jump to

Keyboard shortcuts

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