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

Public Types

enum class  AutocommitState { kAutocommit , kTransaction }
 Whether autocommit is enabled or not (by default: enabled). More...
 
using Base = BaseConnection<Derived>
 

Public Member Functions

AdbcStatusCode Init (void *parent, AdbcError *error) override
 Initialize the object.
 
virtual Status InitImpl (void *parent)
 Initialize the database.
 
AdbcStatusCode Cancel (AdbcError *error)
 
Status CancelImpl ()
 
AdbcStatusCode Commit (AdbcError *error)
 
Status CommitImpl ()
 
AdbcStatusCode GetInfo (const uint32_t *info_codes, size_t info_codes_length, ArrowArrayStream *out, AdbcError *error)
 
Status GetInfoImpl (const std::vector< uint32_t > info_codes, ArrowArrayStream *out)
 
AdbcStatusCode GetObjects (int c_depth, const char *catalog, const char *db_schema, const char *table_name, const char **table_type, const char *column_name, ArrowArrayStream *out, AdbcError *error)
 
Status GetObjectsImpl (int c_depth, std::optional< std::string_view > catalog_filter, std::optional< std::string_view > schema_filter, std::optional< std::string_view > table_filter, std::optional< std::string_view > column_filter, const std::vector< std::string_view > &table_types, struct ArrowArrayStream *out)
 
AdbcStatusCode GetStatistics (const char *catalog, const char *db_schema, const char *table_name, char approximate, ArrowArrayStream *out, AdbcError *error)
 
Status GetStatisticsImpl (std::optional< std::string_view > catalog, std::optional< std::string_view > db_schema, std::optional< std::string_view > table_name, bool approximate, ArrowArrayStream *out)
 
AdbcStatusCode GetStatisticNames (ArrowArrayStream *out, AdbcError *error)
 
Status GetStatisticNames (ArrowArrayStream *out)
 
AdbcStatusCode GetTableSchema (const char *catalog, const char *db_schema, const char *table_name, ArrowSchema *schema, AdbcError *error)
 
Status GetTableSchemaImpl (std::optional< std::string_view > catalog, std::optional< std::string_view > db_schema, std::string_view table_name, ArrowSchema *out)
 
AdbcStatusCode GetTableTypes (ArrowArrayStream *out, AdbcError *error)
 
Status GetTableTypesImpl (ArrowArrayStream *out)
 
AdbcStatusCode ReadPartition (const uint8_t *serialized_partition, size_t serialized_length, ArrowArrayStream *out, AdbcError *error)
 
Status ReadPartitionImpl (std::string_view serialized_partition, ArrowArrayStream *out)
 
AdbcStatusCode Release (AdbcError *error) override
 Finalize the object.
 
Status ReleaseImpl ()
 
AdbcStatusCode Rollback (AdbcError *error)
 
Status RollbackImpl ()
 
AdbcStatusCode SetOption (std::string_view key, Option value, AdbcError *error) override
 Set an option value.
 
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 Enumeration Documentation

◆ AutocommitState

template<typename Derived >
enum class adbc::driver::BaseConnection::AutocommitState
strong

Whether autocommit is enabled or not (by default: enabled).

Member Function Documentation

◆ Init()

template<typename Derived >
AdbcStatusCode adbc::driver::BaseConnection< 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::BaseConnection< Derived >::InitImpl ( void * parent)
inlinevirtual

Initialize the database.

◆ Release()

template<typename Derived >
AdbcStatusCode adbc::driver::BaseConnection< 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.

◆ SetOption()

template<typename Derived >
AdbcStatusCode adbc::driver::BaseConnection< 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::BaseConnection< Derived >::SetOptionImpl ( std::string_view key,
Option value )
inlinevirtual

Set an option. May be called prior to InitImpl.


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