db

package
v0.0.0-...-3c3d51b Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	CreateTable(table string, header []string) error
	ImportPriceList(table string, header []string, records [][]string) error
	TableExists(table string) (bool, error)
}

DB represents database client interface

type SQLite3Client

type SQLite3Client struct {
	// contains filtered or unexported fields
}

SQLite3Client represents the wrapper of SQLite3 client

func NewSQLite3Client

func NewSQLite3Client(filename string) (*SQLite3Client, error)

NewSQLite3Client creates new SQLite3Client object

func (*SQLite3Client) CreateTable

func (c *SQLite3Client) CreateTable(table string, header []string) error

CreateTable creates the given table

func (*SQLite3Client) ImportPriceList

func (c *SQLite3Client) ImportPriceList(table string, header []string, records [][]string) error

ImportPriceList imports price list to database

func (*SQLite3Client) TableExists

func (c *SQLite3Client) TableExists(table string) (bool, error)

TableExists returns whether the given table exists or not

Jump to

Keyboard shortcuts

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