7 #include <dballe/core/error.h> 8 #include <dballe/fwd.h> 23 #define TRACE(...) fprintf(stderr, __VA_ARGS__) 24 #define IFTRACE if (1) 27 #define TRACE(...) do { } while (0) 29 #define IFTRACE if (0) 69 const std::string& get_url()
const {
return url; }
77 virtual std::unique_ptr<Transaction> transaction(
bool readonly=
false) = 0;
80 virtual bool has_table(
const std::string& name) = 0;
87 virtual std::string get_setting(
const std::string& key) = 0;
94 virtual void set_setting(
const std::string& key,
const std::string& value) = 0;
97 virtual void drop_settings() = 0;
103 virtual void execute(
const std::string& query) = 0;
106 virtual void explain(
const std::string& query, FILE* out) = 0;
130 virtual void commit() = 0;
133 virtual void rollback() = 0;
136 virtual void rollback_nothrow() noexcept = 0;
140 virtual void lock_table(
const char* name) = 0;
Forward declarations for public dballe/sql names.
ServerType server_type
Type of SQL server we are connected to.
Definition: sql.h:64
ServerType
Supported SQL servers.
Definition: sql.h:40
A RAII transaction interface for SQL transactions.
Definition: sql.h:121
Date and time.
Definition: types.h:164
Options controlling how to connect to a database.
Definition: db.h:17
const char * format_server_type(ServerType type)
Return a string description for a ServerType value.
String buffer for composing database queries.
Definition: querybuf.h:15