Documentation ¶
Overview ¶
Package sqlite3 implements the sq driver for SQLite. The backing SQL driver is mattn/sqlite3.
Index ¶
Constants ¶
View Source
const ( // Type is the sqlite3 source driver type. Type source.Type = "sqlite3" // Prefix is the scheme+separator value "sqlite3://". Prefix = "sqlite3://" )
Variables ¶
This section is empty.
Functions ¶
func DBTypeForKind ¶
DBTypeForKind returns the database type for kind. For example: Int --> INTEGER
func MungeLocation ¶ added in v0.23.0
MungeLocation takes a location argument (as received from the user) and builds a sqlite3 location URL. Each of these forms are allowed:
sqlite3:///path/to/sakila.db --> sqlite3:///path/to/sakila.db sqlite3:sakila.db --> sqlite3:///current/working/dir/sakila.db sqlite3:/sakila.db --> sqlite3:///sakila.db sqlite3:./sakila.db --> sqlite3:///current/working/dir/sakila.db sqlite3:sakila.db --> sqlite3:///current/working/dir/sakila.db sakila.db --> sqlite3:///current/working/dir/sakila.db /path/to/sakila.db --> sqlite3:///path/to/sakila.db
The final form is particularly nice for shell completion etc.
func NewScratchSource ¶
NewScratchSource returns a new scratch src. Effectively this function creates a new sqlite db file in the temp dir, and src points at this file. The returned clnup func closes that db file and deletes it.
Types ¶
Click to show internal directories.
Click to hide internal directories.