4#ifndef _Stroika_Foundation_Database_SQL_ODBCClient_h_
5#define _Stroika_Foundation_Database_SQL_ODBCClient_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
31#ifndef qStroika_HasComponent_ODBC
32#error "qStroika_HasComponent_ODBC should normally be defined indirectly by StroikaConfig.h"
35namespace Stroika::Foundation::Database::SQL::ODBC {
39#if qStroika_HasComponent_ODBC
41 namespace Connection {
43 using namespace SQL::Connection;
52 struct Options final {
55 optional<String> fDSN;
63 class Ptr :
public SQL::Connection::Ptr {
65 using inherited = SQL::Connection::Ptr;
71 Ptr (
const shared_ptr<IRep>& src =
nullptr);
79 nonvirtual Ptr& operator= (
const Ptr& src);
80 nonvirtual Ptr& operator= (Ptr&& src)
noexcept;
85 nonvirtual IRep* operator->() const noexcept;
88 friend class Statement;
94 Ptr New (const Options& options);
101 class IRep : public SQL::Connection::IRep {
103 [[no_unique_address]] Debug::AssertExternallySynchronizedMutex fAssertExternallySynchronizedMutex;
115 class Statement :
public SQL::Statement {
117 using inherited = SQL::Statement;
122 Statement () =
delete;
123 Statement (
const Connection::Ptr& db,
const String& query);
124 Statement (
const Statement&) =
delete;
132 class Transaction :
public SQL::Transaction {
134 using inherited = SQL::Transaction;
139 Transaction () =
delete;
140 Transaction (
const Connection::Ptr& db);
141 Transaction (
const Transaction&) =
delete;