sqlcipher

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: BSD-3-Clause, ISC Imports: 13 Imported by: 0

README

About sqlite3.c and sqlite3.h

The sqlite3.c and sqlite3.h files were generated from the SQLCipher source using the following procedure.

Clone the SQLCipher repository and check out the v4.5.6 tag:

git clone -b v4.5.6 https://github.com/sqlcipher/sqlcipher.git
cd sqlcipher

Apply sqlcipher.diff:

patch < /path/to/sigtop/sqlcipher/sqlcipher.diff

Generate sqlite3.c and sqlite3.h:

./configure --enable-tempstore=yes CFLAGS=-DSQLITE_HAS_CODEC
make sqlite3.c

Move sqlite3.c and sqlite3.h into place:

mv sqlite3.[ch] /path/to/sigtop/sqlcipher

Documentation

Index

Constants

View Source
const (
	OpenReadOnly     = C.SQLITE_OPEN_READONLY
	OpenReadWrite    = C.SQLITE_OPEN_READWRITE
	OpenCreate       = C.SQLITE_OPEN_CREATE
	OpenURI          = C.SQLITE_OPEN_URI
	OpenMemory       = C.SQLITE_OPEN_MEMORY
	OpenNoMutex      = C.SQLITE_OPEN_NOMUTEX
	OpenFullMutex    = C.SQLITE_OPEN_FULLMUTEX
	OpenSharedCache  = C.SQLITE_OPEN_SHAREDCACHE
	OpenPrivateCache = C.SQLITE_OPEN_PRIVATECACHE
	OpenNoFollow     = C.SQLITE_OPEN_NOFOLLOW
	OpenExResCode    = C.SQLITE_OPEN_EXRESCODE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

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

func NewBackup

func NewBackup(dstDB *DB, dstName string, srcDB *DB, srcName string) (*Backup, error)

func (*Backup) Finish

func (b *Backup) Finish() error

func (*Backup) Step

func (b *Backup) Step(nPages int) bool

type ColumnType

type ColumnType int
const (
	ColumnTypeInteger ColumnType = iota
	ColumnTypeFloat
	ColumnTypeText
	ColumnTypeBlob
	ColumnTypeNull
)

type DB

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

func Open

func Open(path string) (*DB, error)

func OpenFlags

func OpenFlags(path string, flags int) (*DB, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) Exec

func (db *DB) Exec(sql string) error

func (*DB) Execf

func (db *DB) Execf(format string, a ...any) error

func (*DB) Key

func (db *DB) Key(key []byte) error

func (*DB) KeyDatabase

func (db *DB) KeyDatabase(dbName string, key []byte) error

func (*DB) Prepare

func (db *DB) Prepare(sql string) (*Stmt, string, error)

func (*DB) Rekey

func (db *DB) Rekey(key []byte) error

func (*DB) RekeyDatabase

func (db *DB) RekeyDatabase(dbName string, key []byte) error

type Stmt

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

func (*Stmt) Bind

func (s *Stmt) Bind(idx int, val any) error

func (*Stmt) BindBlob

func (s *Stmt) BindBlob(idx int, val []byte) error

func (*Stmt) BindDouble

func (s *Stmt) BindDouble(idx int, val float64) error

func (*Stmt) BindInt

func (s *Stmt) BindInt(idx, val int) error

func (*Stmt) BindInt64

func (s *Stmt) BindInt64(idx int, val int64) error

func (*Stmt) BindNull

func (s *Stmt) BindNull(idx int) error

func (*Stmt) BindText

func (s *Stmt) BindText(idx int, val string) error

func (*Stmt) ColumnBlob

func (s *Stmt) ColumnBlob(idx int) []byte

func (*Stmt) ColumnCount

func (s *Stmt) ColumnCount() int

func (*Stmt) ColumnDouble

func (s *Stmt) ColumnDouble(idx int) float64

func (*Stmt) ColumnInt

func (s *Stmt) ColumnInt(idx int) int

func (*Stmt) ColumnInt64

func (s *Stmt) ColumnInt64(idx int) int64

func (*Stmt) ColumnText

func (s *Stmt) ColumnText(idx int) string

func (*Stmt) ColumnType

func (s *Stmt) ColumnType(idx int) ColumnType

func (*Stmt) Finalize

func (s *Stmt) Finalize() error

func (*Stmt) Step

func (s *Stmt) Step() bool

Jump to

Keyboard shortcuts

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