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
Click to show internal directories.
Click to hide internal directories.