package
0.0.0-20250301080608-94dd30a0f6c7
Repository: https://github.com/gurch101/gowebutils.git
Documentation: pkg.go.dev

# Functions

DeleteByID deletes a record from the specified table by its ID.
No description provided by the author
GetBy gets a record from the database by the provided filters.
GetByID gets a record from the database by its id.
GetChunkSize calculates the number of chunks needed to process a given number of rows and fields.
Insert inserts a record into the database.
No description provided by the author
Open opens a SQLite database file.
ProcessInChunks splits a large set of arguments into manageable chunks and applies a callback to each chunk.
UpdateByID updates a record in the database by its id and version.
WithTransaction is a helper function that handles transaction creation, error handling, and rollbacks.
WrapDBError returns a ConstraintError if the provided error is a database constraint error.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ErrCheckConstraint is returned when a CHECK constraint is violated.
ErrEditConflict is returned if there is a data race and a conflicting edit made by another user.
ErrForeignKeyConstraint is returned when a FOREIGN KEY constraint is violated.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrNoGetFilters is returned when no filters are provided to the GetBy function.
ErrNoSuchColumn is returned when a column does not exist.
ErrNoSuchTable is returned when a table does not exist.
ErrNotNullConstraint is returned when a NOT NULL constraint is violated.
ErrRecordNotFound is returned when a query does not return any rows.
ErrUniqueConstraint is returned when a UNIQUE constraint is violated.
No description provided by the author

# Structs

No description provided by the author

# Interfaces

DB is an interface that both sql.DB and sql.Tx satisfy.

# Type aliases

ChunkCallbackFunc is a function type that processes a chunk of data.
ConstraintError represents an error related to database constraints.
No description provided by the author