Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBExecutor ¶
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.