sqlite3

package
v0.22.5 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: MIT Imports: 21 Imported by: 0

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

func DBTypeForKind(knd kind.Kind) string

DBTypeForKind returns the database type for kind. For example: Int --> INTEGER

func NewScratchSource

func NewScratchSource(log lg.Log, name string) (src *source.Source, clnup func() error, err error)

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.

func PathFromLocation

func PathFromLocation(src *source.Source) (string, error)

PathFromLocation returns the absolute file path from the source location, which should have the "sqlite3://" prefix.

Types

type Provider

type Provider struct {
	Log lg.Log
}

Provider is the SQLite3 implementation of driver.Provider.

func (*Provider) DriverFor

func (d *Provider) DriverFor(typ source.Type) (driver.Driver, error)

DriverFor implements driver.Provider.

Jump to

Keyboard shortcuts

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