driver

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDataBaseDriver

type IDataBaseDriver interface {
	Open(dbUrl string) error
	Close() error
	Query(query string, args ...any) (IQueryResult, error)
	Write(query string, args ...any) (IWriteResult, error)
}

type IQueryResult

type IQueryResult interface {
	Next() bool
	Scan(dest ...any) error
	Close() error
}

type IWriteResult

type IWriteResult interface {
	LastInsertId() (int64, error)
}

type QueryResult

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

func (*QueryResult) Close

func (result *QueryResult) Close() error

func (*QueryResult) Next

func (result *QueryResult) Next() bool

func (*QueryResult) Scan

func (result *QueryResult) Scan(dest ...any) error

type RQLiteDB

type RQLiteDB struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewRQLiteDB

func NewRQLiteDB() *RQLiteDB

func (*RQLiteDB) Close

func (db *RQLiteDB) Close() error

func (*RQLiteDB) Open

func (db *RQLiteDB) Open(url string) error

func (*RQLiteDB) Query

func (db *RQLiteDB) Query(query string, args ...any) (IQueryResult, error)

func (*RQLiteDB) Write

func (db *RQLiteDB) Write(query string, args ...any) (IWriteResult, error)

type Result

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

func (*Result) LastInsertId

func (result *Result) LastInsertId() (int64, error)

type Rows

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

func (*Rows) Close

func (result *Rows) Close() error

func (*Rows) Next

func (result *Rows) Next() bool

func (*Rows) Scan

func (result *Rows) Scan(dest ...any) error

type SQLiteDB

type SQLiteDB struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewSQLiteDB

func NewSQLiteDB() *SQLiteDB

func (*SQLiteDB) Close

func (db *SQLiteDB) Close() error

func (*SQLiteDB) Open

func (db *SQLiteDB) Open(url string) error

func (*SQLiteDB) Query

func (db *SQLiteDB) Query(query string, args ...any) (IQueryResult, error)

func (*SQLiteDB) Write

func (db *SQLiteDB) Write(query string, args ...any) (IWriteResult, error)

type WriteResult

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

func (*WriteResult) LastInsertId

func (result *WriteResult) LastInsertId() (int64, error)

Jump to

Keyboard shortcuts

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