sqlite

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 10 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, shouldVacuum bool, logger *zap.Logger) (*sql.DB, error)

NewDB creates a sqlite3 DB in the specified path

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