factory

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

type KV map[string]any

func ToKV

func ToKV(opts []any) KV

func (KV) Bool

func (kv KV) Bool(key string, deflt ...bool) any

func (KV) Int

func (kv KV) Int(key string, deflt ...int) any

func (KV) String

func (kv KV) String(key string, deflt ...string) any

func (KV) Time

func (kv KV) Time(key string, deflt ...time.Time) any

func (KV) UInt16

func (kv KV) UInt16(key string, deflt ...uint16) any

func (KV) UUID

func (kv KV) UUID(key string, deflt ...string) any

type SQLStorage

type SQLStorage interface {
	MustExec(sql string, args ...any)
	Placeholder(i int) string
}
var DB SQLStorage

type Table

type Table struct {
	Truncate func() Table
	Insert   func(args ...any) typed.Typed
}

func NewTable

func NewTable(name string, builder func(KV) KV) Table

Jump to

Keyboard shortcuts

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