ADBC
Arrow Database Connectivity
Loading...
Searching...
No Matches
adbc::driver::Database< Derived > Class Template Reference

The CRTP base implementation of an AdbcDatabase. More...

#include <database.h>

Inheritance diagram for adbc::driver::Database< Derived >:
adbc::driver::BaseDatabase< Derived > adbc::driver::ObjectBase

Public Types

using Base = Database<Derived>
 
- Public Types inherited from adbc::driver::BaseDatabase< Derived >
using Base = BaseDatabase<Derived>
 

Public Member Functions

virtual Status InitImpl ()
 Initialize the database.
 
virtual Status ReleaseImpl ()
 Release the database.
 
virtual Status SetOptionImpl (std::string_view key, Option value)
 Set an option. May be called prior to InitImpl.
 
- Public Member Functions inherited from adbc::driver::BaseDatabase< Derived >
AdbcStatusCode Init (void *parent, AdbcError *error) override
 Initialize the object.
 
AdbcStatusCode Release (AdbcError *error) override
 Finalize the object.
 
AdbcStatusCode SetOption (std::string_view key, Option value, AdbcError *error) override
 Set an option value.
 
- Public Member Functions inherited from adbc::driver::ObjectBase
virtual Result< OptionGetOption (std::string_view key)
 Get an option value.
 

Private Member Functions

Derived & impl ()
 

Additional Inherited Members

- Protected Attributes inherited from adbc::driver::ObjectBase
LifecycleState lifecycle_state_
 

Detailed Description

template<typename Derived>
class adbc::driver::Database< Derived >

The CRTP base implementation of an AdbcDatabase.

Derived should override and implement the Impl methods, but not others. Overridden methods should defer to the superclass version at the end. (The Base typedef is provided to make this easier.) Derived should also define a constexpr static symbol called kErrorPrefix that is used to construct error messages.

Member Function Documentation

◆ InitImpl()

template<typename Derived >
virtual Status adbc::driver::Database< Derived >::InitImpl ( )
inlinevirtual

Initialize the database.

Reimplemented from adbc::driver::BaseDatabase< Derived >.

◆ ReleaseImpl()

template<typename Derived >
virtual Status adbc::driver::Database< Derived >::ReleaseImpl ( )
inlinevirtual

Release the database.

Reimplemented from adbc::driver::BaseDatabase< Derived >.

◆ SetOptionImpl()

template<typename Derived >
virtual Status adbc::driver::Database< Derived >::SetOptionImpl ( std::string_view key,
Option value )
inlinevirtual

Set an option. May be called prior to InitImpl.

Reimplemented from adbc::driver::BaseDatabase< Derived >.


The documentation for this class was generated from the following file: