writer

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBExecutor

type DBExecutor interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
}

DBExecutor is an interface that is satisfied by both *sql.DB and *sql.Tx.

type SQLiteWriter

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

func NewSQLiteWriter

func NewSQLiteWriter(dbPath string) (*SQLiteWriter, error)

NewSQLiteWriter initializes the SQLiteWriter with a database connection

func NewSQLiteWriterWithDB added in v1.3.3

func NewSQLiteWriterWithDB(db *sql.DB) *SQLiteWriter

func (*SQLiteWriter) AsSlice added in v1.3.0

func (w *SQLiteWriter) AsSlice(tableName string) ([]model.TableInterface, error)

AsSlice reads all rows from a given table and returns them as a slice of model.TableInterface, dynamically mapping columns to struct fields.

func (*SQLiteWriter) Close

func (w *SQLiteWriter) Close()

func (*SQLiteWriter) Migrate

func (w *SQLiteWriter) Migrate() (err error)

func (*SQLiteWriter) Sync added in v1.3.2

func (w *SQLiteWriter) Sync(tableName string, items []model.TableInterface) error

Sync performs a full "delete-and-insert" operation using a fast bulk insert.

Jump to

Keyboard shortcuts

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