22 #ifndef DBALLE_DB_SQL_DRIVER_H
23 #define DBALLE_DB_SQL_DRIVER_H
32 #include <dballe/db/defs.h>
33 #include <wreport/var.h>
62 wreport::Varcode out_varcode;
139 virtual void explain(
const std::string& query);
void remove_all(db::Format format)
Empty all tables for a DB with the given format.
virtual void run_built_query_v6(const v6::QueryBuilder &qb, std::function< void(SQLRecordV6 &rec)> dest)=0
Run a query on the given statement, returning results as SQLRecordV6 objects.
void dump(FILE *out)
Dump the record as a single line to the given output stream.
void delete_tables(db::Format format)
Delete all existing tables for a DB with the given format.
Copyright (C) 2008–2010 ARPA-SIM urpsim@smr.arpa.emr.it
Definition: cmdline.h:17
void create_tables(db::Format format)
Create all missing tables for a DB with the given format.
virtual std::unique_ptr< sql::DataV6 > create_datav6()=0
Precompiled queries to manipulate the data table.
Query results from SQL output.
Definition: sql/driver.h:56
virtual void create_tables_v6()=0
Create all missing tables for V6 databases.
virtual void exec_no_data(const std::string &query)=0
Run a SQL query that is expected to return no data.
virtual void remove_all_v6()
Empty all tables for V6 databases, assuming that they exist, without touching the repinfo table...
virtual std::unique_ptr< sql::LevTr > create_levtrv6()=0
Precompiled queries to manipulate the levtr table.
virtual void delete_tables_v6()=0
Delete all existing tables for V6 databases.
virtual std::unique_ptr< sql::AttrV6 > create_attrv6()=0
Precompiled queries to manipulate the attr table.
Definition: sql/driver.h:84
bool querybest_fields_are_the_same(const SQLRecordV6 &r)
Checks true if ana_id, id_ltr, datetime and varcode are the same in both records. ...
Date and time.
Definition: types.h:147
virtual void explain(const std::string &query)
Outputs to stderr an explanation of the given query.
Build SQL queries for V6 databases.
Definition: qbuilder.h:15
virtual std::unique_ptr< sql::Repinfo > create_repinfov6()=0
Precompiled queries to manipulate the repinfo table.
virtual std::unique_ptr< sql::Station > create_stationv6()=0
Precompiled queries to manipulate the station table.
static std::unique_ptr< Driver > create(Connection &conn)
Create a Driver for this connection.
virtual void vacuum_v6()=0
Perform database cleanup/maintenance on v6 databases.