db

package
v0.0.0-...-0a0c50c Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteDB

type SQLiteDB struct {
	DB *sql.DB
}

func NewSQLiteDB

func NewSQLiteDB(databasePath string) (*SQLiteDB, error)

func (*SQLiteDB) Close

func (s *SQLiteDB) Close()

func (*SQLiteDB) Exec

func (s *SQLiteDB) Exec(query string, args ...interface{}) (sql.Result, error)

func (*SQLiteDB) Query

func (s *SQLiteDB) Query(query string, args ...interface{}) (*sql.Rows, error)

func (*SQLiteDB) QueryRow

func (s *SQLiteDB) QueryRow(query string, args ...interface{}) *sql.Row

type WorkbookRepository

type WorkbookRepository struct {
	DB *SQLiteDB
}

func NewWorkbookRepository

func NewWorkbookRepository() (*WorkbookRepository, error)

func (*WorkbookRepository) Close

func (r *WorkbookRepository) Close()

func (*WorkbookRepository) DeleteCell

func (r *WorkbookRepository) DeleteCell(id string) error

func (*WorkbookRepository) DeleteMetadata

func (r *WorkbookRepository) DeleteMetadata(id string) error

func (*WorkbookRepository) DeleteSheet

func (r *WorkbookRepository) DeleteSheet(id string) error

func (*WorkbookRepository) GetAllWorkbooks

func (r *WorkbookRepository) GetAllWorkbooks() ([]*models.Workbook, error)

func (*WorkbookRepository) GetCell

func (r *WorkbookRepository) GetCell(id string) (*models.Cell, error)

func (*WorkbookRepository) GetMetadata

func (r *WorkbookRepository) GetMetadata(id string) (*models.Workbook, error)

func (*WorkbookRepository) GetSheet

func (r *WorkbookRepository) GetSheet(id string) (*models.Sheet, error)

func (*WorkbookRepository) GetWorkbook

func (r *WorkbookRepository) GetWorkbook(id string) (*models.Workbook, error)

func (*WorkbookRepository) Initialize

func (r *WorkbookRepository) Initialize() error

func (*WorkbookRepository) PrintWorkbookList

func (r *WorkbookRepository) PrintWorkbookList()

debug function to print all metadata

func (*WorkbookRepository) SaveCell

func (r *WorkbookRepository) SaveCell(cell *models.Cell, workbookID, sheetID string) error

func (*WorkbookRepository) SaveMetadata

func (r *WorkbookRepository) SaveMetadata(workbook *models.Workbook) error

func (*WorkbookRepository) SaveSheet

func (r *WorkbookRepository) SaveSheet(sheet *models.Sheet) error

Jump to

Keyboard shortcuts

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