sqlite

package
v4.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 14 Imported by: 27 modules, 28 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

SQLite3 adapter for upper.io/db

Please read the full docs, acknowledgements and examples at https://upper.io/db.v3/sqlite

Documentation

Overview

Package sqlite wraps the github.com/lib/sqlite SQLite driver. See https://github.com/upper/db/adapter/sqlite for documentation, particularities and usage examples.

Index

Constants

View Source
const Adapter = `sqlite`

Adapter is the public name of the adapter.

Variables

This section is empty.

Functions

func New

func New(sqlDB *sql.DB) (db.Session, error)

New creates a sqlbuilder.Sesion instance by wrapping a *sql.DB value.

func NewTx

func NewTx(sqlTx *sql.Tx) (sqlbuilder.Tx, error)

NewTx creates a sqlbuilder.Tx instance by wrapping a *sql.Tx value.

func Open

func Open(connURL db.ConnectionURL) (db.Session, error)

Open establishes a connection to the database server and returns a db.Session instance (which is compatible with db.Session).

Types

type ConnectionURL

type ConnectionURL struct {
	Database string
	Options  map[string]string
}

ConnectionURL implements a SQLite connection struct.

func ParseURL

func ParseURL(s string) (conn ConnectionURL, err error)

ParseURL parses s into a ConnectionURL struct.

func (ConnectionURL) String

func (c ConnectionURL) String() (s string)

Jump to

Keyboard shortcuts

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