Skip to content

Commit

Permalink
docs: add glossary terms for statement/connection/database (#1654)
Browse files Browse the repository at this point in the history
Fixes #1652.
  • Loading branch information
lidavidm authored Mar 22, 2024
1 parent 126076b commit 81fe935
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/source/cpp/recipe/quickstart.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ int main() {
/// Creating a Connection
/// ---------------------
///
/// ADBC distinguishes between "databases", "connections", and
/// "statements". A "database" holds shared state across multiple
/// connections. For example, in the SQLite driver, it holds the
/// actual instance of SQLite. A "connection" is one connection to
/// the database.
/// ADBC distinguishes between ":term:`databases <database>`",
/// ":term:`connections <connection>`", and ":term:`statements
/// <statement>`". A "database" holds shared state across multiple
/// connections. For example, in the SQLite driver, it holds the actual
/// instance of SQLite. A "connection" is one connection to the database.

AdbcConnection connection = {};
CHECK_ADBC(AdbcConnectionNew(&connection, &error));
Expand Down
14 changes: 14 additions & 0 deletions docs/source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Glossary
abstract over the underlying :term:`wire protocol` and other details.
For example, ADBC, JDBC, ODBC.

connection
In ADBC, the connection object/struct represents a single connection to a
database. Multiple connections may be created from one :term:`database`.

database
In ADBC, the database object/struct holds state that is shared across
connections.

driver
Loosely speaking, a library that implements a :term:`client API` using a
:term:`wire protocol`. For example, the ADBC PostgreSQL driver exposes
Expand All @@ -48,6 +56,12 @@ Glossary
would collide otherwise.) In Python, it loads drivers and provides
Python bindings on top.

statement
In ADBC, the statement object/struct holds state for executing a single
query. The query itself, bind parameters, result sets, and so on are all
tied to the statement. Multiple statements may be created from one
:term:`connection` (though not all drivers will support this).

Substrait
`Substrait`_ describes itself as a "cross-language serialization for
relational algebra". It operates in a similar space as SQL, but is
Expand Down

0 comments on commit 81fe935

Please sign in to comment.