db

package
v0.0.0-...-361378c Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: MIT Imports: 6 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 'tableName' in the database 'db'

func DB

func DB() (*sql.DB, error)

DB initalises a sqlite3 DB and returns it

func Insert

func Insert(db *sql.DB, id int, phoneNumber, tableName string) (int, error)

Insert inserts phoneNumber into db

func Report

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

Report returns the present state of the table 'tableName'

func Reset

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

Reset resets the given database 'db'

Types

This section is empty.

Jump to

Keyboard shortcuts

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