sqlite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

--------------------------------

func Init

func Init(ctx ...context.Context)

func Select

func Select(fileName, args string) (*store.StoreUnit, error)

func Upsert

func Upsert(fileName, args string, unit *store.StoreUnit) error

Types

type Pull

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

func New

func New(ctx ...context.Context) *Pull

func (*Pull) Add

func (p *Pull) Add(fileName string) (*SQL, error)

Add creates new connection and adds to pull

func (*Pull) Close

func (p *Pull) Close() error

func (*Pull) Get

func (p *Pull) Get(fileName string) (*SQL, error)

Add creates new connection and adds to pull

func (*Pull) Select

func (p *Pull) Select(fileName, args string) (*store.StoreUnit, error)

func (*Pull) Upsert

func (p *Pull) Upsert(fileName, args string, unit *store.StoreUnit) error

Upsert just inserts or update one record

type SQL

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

func Add

func Add(fileName string) (*SQL, error)

func Conn

func Conn(fileName string) (*SQL, error)

func Get

func Get(fileName string) (*SQL, error)

func (*SQL) Close

func (s *SQL) Close() error

func (*SQL) CreateTable

func (s *SQL) CreateTable() error

func (*SQL) Open

func (s *SQL) Open() error

func (*SQL) Select

func (s *SQL) Select(args string) (*store.StoreUnit, error)

func (*SQL) Upsert

func (s *SQL) Upsert(args string, unit *store.StoreUnit) error

We are passing db reference connection from main to our method with other parameters

Jump to

Keyboard shortcuts

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