5#include "../../Api.hpp"
6#include "../Concept.hpp"
21namespace Lightweight::Driver::Sqlite3
25struct ConnectionState;
66 static constexpr SqlDriverId
Id = SqlDriverId::Sqlite3;
72 static constexpr std::string_view
Name =
"SQLite3";
108[[nodiscard]] LIGHTWEIGHT_API ::sqlite3* NativeHandle(
Connection const& connection)
noexcept;
113[[nodiscard]] LIGHTWEIGHT_API ::sqlite3_stmt* NativeHandle(
Statement const& stmt)
noexcept;
120[[nodiscard]] LIGHTWEIGHT_API ::sqlite3* NativeHandle(
SqlConnection const& connection)
noexcept;
125[[nodiscard]] LIGHTWEIGHT_API ::sqlite3_stmt* NativeHandle(
SqlStatement const& stmt)
noexcept;
129[[nodiscard]] LIGHTWEIGHT_API
int LibraryVersionNumber() noexcept;
133[[nodiscard]] LIGHTWEIGHT_API std::string_view LibraryVersion() noexcept;
136inline constexpr
int MinimumLibraryVersionNumber = 3'037'000;
Represents a connection to a SQL database.
High level API for (prepared) raw SQL statements.
The driver-owned state of one SQLite connection: everything mutable behind a Connection.
The SQLite3 driver's connection handle struct: one pointer to the driver-owned connection state.
ConnectionState * state
The connection's state; null for a connection that holds nothing.
bool operator==(Connection const &) const =default
Compares the state pointers.
The native SQLite3 driver: names its handle structs, its driver id and its capabilities.
static constexpr bool HasCatalogFunctions
SQLite has no catalog functions: SqlSchema reads the catalog with the SQL of the SQLite formatter.
static constexpr bool SupportsRowArrayFetch
SQLite steps one row at a time; there is no block fetch into array-bound columns.
static constexpr bool StatementsDieWithConnection
static constexpr bool SupportsParameterArrays
SQLite executes one parameter set per step; a batch is a loop over rows, not one native call.
static constexpr std::string_view Name
static constexpr bool TranscodesNarrowText
Narrow text is passed to and from SQLite as UTF-8, byte-exact; there is no client codepage.
static constexpr SqlDriverId Id
The id the tagged handles carry for this driver.
The driver-owned state of one SQLite statement: everything mutable behind a Statement.
The SQLite3 driver's statement handle struct: one pointer to the driver-owned statement state.
bool operator==(Statement const &) const =default
Compares the state pointers.
StatementState * state
The statement's state; null for a statement that holds nothing.