ADBC
Arrow Database Connectivity
Loading...
Searching...
No Matches
adbc::driver::BaseDatabase< Derived > Class Template Reference
Inheritance diagram for adbc::driver::BaseDatabase< Derived >:
adbc::driver::ObjectBase adbc::driver::Database< Derived >

Public Types

using Base = BaseDatabase<Derived>
 

Public Member Functions

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.
 
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::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_
 

Member Function Documentation

◆ Init()

template<typename Derived >
AdbcStatusCode adbc::driver::BaseDatabase< Derived >::Init ( void * parent,
AdbcError * error )
inlineoverridevirtual

Initialize the object.

Called after 0 or more SetOption calls. Generally, you won't need to override this directly. Instead, use the typed InitImpl provided by Database/Connection/Statement.

Parameters
[in]parentA pointer to the AdbcDatabase or AdbcConnection implementation as appropriate, or nullptr.

Reimplemented from adbc::driver::ObjectBase.

◆ InitImpl()

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

Initialize the database.

Reimplemented in adbc::driver::Database< Derived >.

◆ Release()

template<typename Derived >
AdbcStatusCode adbc::driver::BaseDatabase< Derived >::Release ( AdbcError * error)
inlineoverridevirtual

Finalize the object.

This can be used to return an error if the object is not in a valid state (e.g. prevent closing a connection with open statements) or to clean up resources when resource cleanup could fail. Infallible resource cleanup (e.g. releasing memory) should generally be handled in the destructor.

Generally, you won't need to override this directly. Instead, use the typed ReleaseImpl provided by Database/Connection/Statement.

Reimplemented from adbc::driver::ObjectBase.

◆ ReleaseImpl()

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

Release the database.

Reimplemented in adbc::driver::Database< Derived >.

◆ SetOption()

template<typename Derived >
AdbcStatusCode adbc::driver::BaseDatabase< Derived >::SetOption ( std::string_view key,
Option value,
AdbcError * error )
inlineoverridevirtual

Set an option value.

Reimplemented from adbc::driver::ObjectBase.

◆ SetOptionImpl()

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

Set an option. May be called prior to InitImpl.

Reimplemented in adbc::driver::Database< Derived >.


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