package
Version:
v0.0.0-...-c144a73
Opens a new window with list of versions in this module.
Published: Jan 7, 2025
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
ConnectDB opens a connection to a SQLite database.
It returns a pointer to the sql.DB object and an error if any occurs.
FileExists This function checks if a file exists, if it does returns true.
Otherwise it returns false.
IsSetup checks if the database has been set up.
- Returns false if the tasks table does not exist
- Returns true if the tasks table exists
ResetDB drops all tables and recreates them.
SetupDB Setup the Initial DB Schema
- Creates the areas and tasks tables if they do not exist
- Returns an error if any occurs
- Uses transactions for safety
- Uses prepared statements for better performance
Source Files
¶
Click to show internal directories.
Click to hide internal directories.