|
StormByte C++ Library: Database module 0.0.9999
StormByte-Database is a StormByte library module for handling database connections
|
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
You can visit the code repository at GitHub
Ensure you have the following installed:
To build the library, follow these steps:
StormByte Library is composed by several modules:
The Database module provides support for SQLite, an embedded SQL database engine. It includes classes for managing database connections, prepared statements, and result rows.
Below are short examples showing how to open a connection and run simple queries using the bundled optional backends.
This example shows an in-process SQLite database (file or in-memory). It uses the StormByte SQLite optional backend which exposes the same Database-style API as other backends.
This example uses the optional Postgres backend which delegates to libpq. The API mirrors the SQLite backend — constructors and connection semantics differ (host/user/password/db).
This example uses the optional MariaDB backend which delegates to MariaDB Connector/C (libmariadb). The API mirrors the other backends and uses secure server-side prepared statements internally; public headers do not expose mysql.h.
Build notes: enable the MariaDB optional backend with -DWITH_MARIADB=BUNDLED (bundled connector) or -DWITH_MARIADB=SYSTEM (requires libmariadb-dev/system connector).
Contributions are welcome! Please fork the repository and submit pull requests for any enhancements or bug fixes.
This project is licensed under GPL v3 License - see the [LICENSE](LICENSE) file for details.