sqlite

package
v1.0.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogf

func SetLogf(fn func(code int, msg string))

func Version

func Version() string

Types

type ApplyEventFunction

type ApplyEventFunction func(conn Conn, offset int64, cache []byte) (int, error)

type Arg

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

func Blob

func Blob(name string, b []byte) Arg

func BlobConst

func BlobConst(name string, b []byte) Arg

func BlobString

func BlobString(name string, s string) Arg

func BlobText

func BlobText(name string, s string) Arg

func Int64

func Int64(name string, n int64) Arg

type Conn

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

func (Conn) Exec

func (c Conn) Exec(sql string, args ...Arg) (int64, error)

func (Conn) ExecUnsafe

func (c Conn) ExecUnsafe(sql string, args ...Arg) (int64, error)

func (Conn) LastInsertRowID

func (c Conn) LastInsertRowID() int64

func (Conn) Query

func (c Conn) Query(sql string, args ...Arg) Rows

type Engine

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

func OpenEngine

func OpenEngine(
	opt Options,
	binlog binlog2.Binlog,
	apply ApplyEventFunction) (*Engine, error)

func (*Engine) Backup

func (e *Engine) Backup(prefix string) error

func (*Engine) Close

func (e *Engine) Close() error

func (*Engine) Do

func (e *Engine) Do(fn func(Conn, []byte) ([]byte, error),
	waitCommit bool) error

type Options

type Options struct {
	Path   string
	APPID  int32
	Scheme string
}

type Rows

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

func (*Rows) ColumnBlob

func (r *Rows) ColumnBlob(i int, buf []byte) ([]byte, error)

func (*Rows) ColumnBlobRaw

func (r *Rows) ColumnBlobRaw(i int) ([]byte, error)

func (*Rows) ColumnBlobRawString

func (r *Rows) ColumnBlobRawString(i int) (string, error)

func (*Rows) ColumnBlobString

func (r *Rows) ColumnBlobString(i int) (string, error)

func (*Rows) ColumnInt64

func (r *Rows) ColumnInt64(i int) (int64, error)

func (*Rows) ColumnIsNull

func (r *Rows) ColumnIsNull(i int) bool

func (*Rows) Error

func (r *Rows) Error() error

func (*Rows) Next

func (r *Rows) Next() bool

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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