sqlite

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable

func CreateTable(db *sql.DB, tableName string) error

CreateTable creates the table that will persist the peers

func Migrations added in v0.8.0

func Migrations(db *sql.DB) error

Migrations is the function used for DB migration with sqlite driver

func NewDB

func NewDB(dburl string, logger *zap.Logger) (*sql.DB, error)

NewDB creates a sqlite3 DB in the specified path

func NewMockSqliteDB added in v0.9.0

func NewMockSqliteDB() *sql.DB

func NewQueries

func NewQueries(tbl string, db *sql.DB) (*persistence.Queries, error)

NewQueries creates a table if it doesn't exist and a new SQL set of queries for the passed table

Types

This section is empty.

Directories

Path Synopsis
sql

Jump to

Keyboard shortcuts

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