Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/v0idpointer/vsqlite
lightweight C++17 wrapper library for SQLite3
https://github.com/v0idpointer/vsqlite
cpp cpp17 library sqlite3
Last synced: about 1 month ago
JSON representation
lightweight C++17 wrapper library for SQLite3
- Host: GitHub
- URL: https://github.com/v0idpointer/vsqlite
- Owner: v0idpointer
- License: mit
- Created: 2024-06-14T08:35:22.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-11T14:46:12.000Z (4 months ago)
- Last Synced: 2024-10-12T16:20:10.949Z (about 1 month ago)
- Topics: cpp, cpp17, library, sqlite3
- Language: C++
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vsqlite
Vsqlite is a simple lightweight C++17 wrapper library for SQLite3.
On Windows 10 and Windows 11, you can use winsqlite3 by #define-ing VSQLITE_USE_WINSQLITE
# Example
```cpp
#include
#includeusing namespace Vsqlite;
int main(int argc, char* argv[]) {
Database db("database.db");
db.Execute(R"(
CREATE TABLE IF NOT EXISTS Customers(
CustomerId INTEGER PRIMARY KEY NOT NULL,
FirstName TEXT NOT NULL,
LastName TEXT NOT NULL,
Email TEXT NOT NULL
);
)");Statement s = db.PrepareStatement(R"(
INSERT INTO Customers (FirstName, LastName, Email)
VALUES (?, ?, ?);
)", SQLITE_PREPARE_PERSISTENT);s.Execute("John", "Warosa", "[email protected]");
return 0;
}
```