ADBC
Arrow Database Connectivity
Toggle main menu visibility
Loading...
Searching...
No Matches
driver
framework
database.h
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License. You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied. See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#pragma once
19
20
#include <string_view>
21
#include <utility>
22
23
#include <
arrow-adbc/adbc.h
>
24
25
#include "driver/framework/base_driver.h"
26
#include "
driver/framework/status.h
"
27
28
namespace
adbc::driver {
36
template
<
typename
Derived>
37
class
Database :
public
BaseDatabase<Derived> {
38
public
:
39
using
Base = Database<Derived>;
40
41
Database() : BaseDatabase<Derived>() {}
42
~Database() =
default
;
43
45
virtual
Status
InitImpl
() {
return
BaseDatabase<Derived>::InitImpl
(); }
46
48
virtual
Status
ReleaseImpl
() {
return
BaseDatabase<Derived>::ReleaseImpl
(); }
49
51
virtual
Status
SetOptionImpl
(std::string_view key,
Option
value) {
52
return
BaseDatabase<Derived>::SetOptionImpl
(key, value);
53
}
54
55
private
:
56
Derived& impl() {
return
static_cast<
Derived&
>
(*this); }
57
};
58
}
// namespace adbc::driver
adbc.h
adbc::driver::BaseDatabase::InitImpl
virtual Status InitImpl()
Initialize the database.
Definition
base_driver.h:813
adbc::driver::BaseDatabase::SetOptionImpl
virtual Status SetOptionImpl(std::string_view key, Option value)
Set an option. May be called prior to InitImpl.
Definition
base_driver.h:819
adbc::driver::BaseDatabase::ReleaseImpl
virtual Status ReleaseImpl()
Release the database.
Definition
base_driver.h:816
adbc::driver::Database::ReleaseImpl
virtual Status ReleaseImpl()
Release the database.
Definition
database.h:48
adbc::driver::Database::SetOptionImpl
virtual Status SetOptionImpl(std::string_view key, Option value)
Set an option. May be called prior to InitImpl.
Definition
database.h:51
adbc::driver::Database::InitImpl
virtual Status InitImpl()
Initialize the database.
Definition
database.h:45
adbc::driver::Option
A typed option value wrapper. It currently does not attempt conversion (i.e., getting a double option...
Definition
base_driver.h:59
adbc::driver::Status
A wrapper around AdbcStatusCode + AdbcError.
Definition
status.h:43
status.h
Generated by
1.17.0