Skip to content

Commit dc51441

Browse files
committed
Update docs
1 parent b995130 commit dc51441

File tree

5 files changed

+47
-34
lines changed

5 files changed

+47
-34
lines changed

c/include/arrow-adbc/adbc_driver_manager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ AdbcStatusCode AdbcLoadDriver(const char* driver_name, const char* entrypoint,
8080
/// a shared library. Erroring if this fails.
8181
///
8282
/// If the passed in driver_name does not have an extension and is not an absolute path:
83-
/// - The load_options parameter will control whether the driver manager will search
84-
/// the ADBC_CONFIG_PATH and CONDA_PREFIX environment variables, the user
85-
/// configuration directory, and/or the system level directory of /etc/adbc for either
86-
/// a manifest file or a shared library.
83+
/// - The load_options parameter will control whether the driver manager will search the
84+
/// environment variable ADBC_CONFIG_PATH and (if built or installed with conda) the
85+
/// conda environment, the user-level configuration, and/or the system-level
86+
/// configuration for either a manifest file or a shared library.
8787
/// - For each path to be searched, it will first look for <path>/<driver_name>.toml. If
8888
/// that file exists, it will attempt to parse the manifest and load the driver
8989
/// specified within it, erroring if this fails.

docs/source/format/driver_manifests.rst

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,8 @@ to control which directories will be searched for manifests, with the behavior b
351351

352352
The type :c:type:`AdbcLoadFlags` is a set of bitflags to control the directories to be searched. The flags are
353353

354-
* :c:macro:`ADBC_LOAD_FLAG_SEARCH_ENV` - search environment variables (``ADBC_CONFIG_PATH``, ``CONDA_PREFIX``)
354+
* :c:macro:`ADBC_LOAD_FLAG_SEARCH_ENV` - search the directory paths in the environment variable
355+
``ADBC_CONFIG_PATH`` and (when built or installed with conda) search in the conda environment
355356
* :c:macro:`ADBC_LOAD_FLAG_SEARCH_USER` - search the user configuration directory
356357
* :c:macro:`ADBC_LOAD_FLAG_SEARCH_SYSTEM` - search the system configuration directory
357358
* :c:macro:`ADBC_LOAD_FLAG_ALLOW_RELATIVE_PATHS` - allow a relative path to be provided
@@ -364,7 +365,8 @@ to control which directories will be searched for manifests, with the behavior b
364365

365366
The type ``GADBCLoadFlags`` is a set of bitflags to control the directories to be searched. The flags are
366367

367-
* ``GADBC_LOAD_SEARCH_ENV`` - search environment variables (``ADBC_CONFIG_PATH``, ``CONDA_PREFIX``)
368+
* ``GADBC_LOAD_SEARCH_ENV`` - search the directory paths in the environment variable
369+
``ADBC_CONFIG_PATH`` and (when built or installed with conda) search in the conda environment
368370
* ``GADBC_LOAD_FLAG_SEARCH_USER`` - search the user configuration directory
369371
* ``GADBC_LOAD_FLAG_SEARCH_SYSTEM`` - search the system configuration directory
370372
* ``GADBC_LOAD_FLAG_ALLOW_RELATIVE_PATHS`` - allow a relative path to be provided
@@ -380,7 +382,8 @@ to control which directories will be searched for manifests, with the behavior b
380382
``drivermgr.LoadFlagsOptionKey`` with the value being the ``strconv.Itoa`` of the flags you want to use when you call ``NewDatabase``
381383
or ``NewDatabaseWithContext``. The flags are defined in the ``drivermgr`` package as constants:
382384

383-
* ``drivermgr.LoadFlagsSearchEnv`` - search environment variables (``ADBC_CONFIG_PATH``, ``CONDA_PREFIX``)
385+
* ``drivermgr.LoadFlagsSearchEnv`` - search the directory paths in the environment variable
386+
``ADBC_CONFIG_PATH``
384387
* ``drivermgr.LoadFlagsSearchUser`` - search the user configuration directory
385388
* ``drivermgr.LoadFlagsSearchSystem`` - search the system configuration directory
386389
* ``drivermgr.LoadFlagsAllowRelativePaths`` - allow a relative path to be used
@@ -403,7 +406,8 @@ to control which directories will be searched for manifests, with the behavior b
403406

404407
The class ``ADBC::LoadFlags`` is a set of bitflags to control the directories to be searched. The flags are
405408

406-
* ``ADBC::LoadFlags::SEARCH_ENV`` - search the environment variable ``ADBC_CONFIG_PATH``
409+
* ``ADBC::LoadFlags::SEARCH_ENV`` - search the directory paths in the environment variable
410+
``ADBC_CONFIG_PATH`` and (when built or installed with conda) search in the conda environment
407411
* ``ADBC::LoadFlags::SEARCH_USER`` - search the user configuration directory
408412
* ``ADBC::LoadFlags::SEARCH_SYSTEM`` - search the system configuration directory
409413
* ``ADBC::LoadFlags::ALLOW_RELATIVE_PATHS`` - allow a relative path to be provided
@@ -419,7 +423,8 @@ to control which directories will be searched for manifests, with the behavior b
419423
The ``ManagedDriver`` type has a method ``load_dynamic_from_name`` which takes an optional ``load_flags`` parameter. The flags as a ``u32`` with
420424
the type ``adbc_core::driver_manager::LoadFlags``, which has the following constants:
421425

422-
* ``LOAD_FLAG_SEARCH_ENV`` - search the environment variable ``ADBC_CONFIG_PATH``
426+
* ``LOAD_FLAG_SEARCH_ENV`` - search the directory paths in the environment variable
427+
``ADBC_CONFIG_PATH`` and (when built or installed with conda) search in the conda environment
423428
* ``LOAD_FLAG_SEARCH_USER`` - search the user configuration directory
424429
* ``LOAD_FLAG_SEARCH_SYSTEM`` - search the system configuration directory
425430
* ``LOAD_FLAG_ALLOW_RELATIVE_PATHS`` - allow a relative path to be used
@@ -431,12 +436,15 @@ Unix-like Platforms
431436
For Unix-like platforms, (e.g. Linux, macOS), the driver manager will search the following directories based on the options provided, in
432437
the given order:
433438

434-
#. If the ``LOAD_FLAG_SEARCH_ENV`` load option is set, then environment variables will be searched in this order
439+
#. If the ``LOAD_FLAG_SEARCH_ENV`` load option is set, then the paths in the environment variable ``ADBC_CONFIG_PATH`` will be searched
435440

436-
* ``ADBC_CONFIG_PATH`` is a colon-separated list of directories to search for ``${name}.toml``
437-
* ``CONDA_PREFIX`` is used by `conda <https://anaconda.org/anaconda/conda>`__ and if set
438-
``$CONDA_PREFIX/etc/adbc`` will be searched for ``${name}.toml`` (This only occurs when built using conda-build
439-
or otherwise building for a conda package)
441+
* ``ADBC_CONFIG_PATH`` is a colon-separated list of directories
442+
443+
#. If additional search paths have been specified, those will be searched
444+
445+
* The Python driver manager automatically adds ``$VIRTUAL_ENV/etc/adbc`` to the search paths when running in a ``venv`` virtual environment
446+
447+
#. If the driver manager was built or installed with conda and the ``LOAD_FLAG_SEARCH_ENV`` load option is set, ``$CONDA_PREFIX/etc/adbc`` will be searched
440448

441449
#. If the ``LOAD_FLAG_SEARCH_USER`` load option is set, then a user-level configuration directory will be searched
442450

@@ -455,13 +463,15 @@ Windows
455463
Things are slightly different on Windows, where the driver manager will also search for driver information in the registry just as
456464
would happen for ODBC drivers. The search for a manifest on Windows would be the following:
457465

458-
#. If the ``LOAD_FLAG_SEARCH_ENV`` load option is set, then the environment variables will be searched in this order
466+
#. If the ``LOAD_FLAG_SEARCH_ENV`` load option is set, then the paths in the environment variable ``ADBC_CONFIG_PATH`` will be searched
467+
468+
* ``ADBC_CONFIG_PATH`` is a semicolon-separated list of directories
469+
470+
#. If additional search paths have been specified, those will be searched
459471

460-
* ``ADBC_CONFIG_PATH`` is a semicolon-separated list of directories to search for ``${name}.toml``
461-
* ``CONDA_PREFIX`` is used by `conda <https://anaconda.org/anaconda/conda>`__ and if set
462-
``$CONDA_PREFIX/etc/adbc`` will be searched for ``${name}.toml`` (This only occurs when built using conda-build
463-
or otherwise building for a conda package)
472+
* The Python driver manager automatically adds ``$VIRTUAL_ENV\etc\adbc`` to the search paths when running in a ``venv`` virtual environment
464473

474+
#. If the driver manager was built or installed with conda and the ``LOAD_FLAG_SEARCH_ENV`` load option is set, ``$CONDA_PREFIX\etc\adbc`` will be searched
465475

466476
#. If the ``LOAD_FLAG_SEARCH_USER`` load option is set, then a user-level configuration is searched for
467477

@@ -474,7 +484,7 @@ would happen for ODBC drivers. The search for a manifest on Windows would be the
474484
* ``entrypoint`` - the entrypoint to use for the driver if a non-default entrypoint is needed
475485
* ``driver`` - the path to the driver shared library
476486

477-
* If no registry key is found, then the directory ``%LOCAL_APPDATA%\ADBC\drivers`` is searched for ``${name}.toml``
487+
* If no registry key is found, then the directory ``%LOCAL_APPDATA%\ADBC\drivers`` is searched
478488

479489
#. If the ``LOAD_FLAG_SEARCH_SYSTEM`` load option is set, the driver manager will search for a system-level configuration
480490

glib/adbc-glib/database.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ G_BEGIN_DECLS
2727

2828
/**
2929
* GADBCLoadFlags:
30-
* @GADBC_LOAD_SEARCH_ENV: Check the ADBC_CONFIG_PATH and CONDA_PREFIX
31-
* environment variables.
32-
* @GADBC_LOAD_SEARCH_USER: Check the user configuration directory.
33-
* @GADBC_LOAD_SEARCH_SYSTEM: Check the system configuration directory.
30+
* @GADBC_LOAD_SEARCH_ENV: Search the directory paths in the environment
31+
* variable ADBC_CONFIG_PATH and (when built or installed with conda)
32+
* search in the conda environment
33+
* @GADBC_LOAD_SEARCH_USER: Search the user configuration directory.
34+
* @GADBC_LOAD_SEARCH_SYSTEM: Search the system configuration directory.
3435
* @GADBC_LOAD_ALLOW_RELATIVE_PATHS: Allow relative driver paths.
3536
*
3637
* The flags are used by gadbc_database_set_load_flags().

r/adbcdrivermanager/R/driver_void.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,13 @@ adbc_driver_load <- function(x, entrypoint, version, driver, error,
108108
#'
109109
#' Options that indicate where to look for driver manifests. Manifests
110110
#' (.toml files) can be installed at the system level, the user level,
111-
#' and/or location(s) specified by the ADBC_CONFIG_PATH or CONDA_PREFIX
112-
#' environment variables. See the ADBC documentation for details regarding
113-
#' the locations of the user and system paths on various platforms.
111+
#' in location(s) specified by the ADBC_CONFIG_PATH environment variable,
112+
#' and/or in a conda environment. See the ADBC documentation for details
113+
#' regarding the locations of the user and system paths on various platforms.
114114
#'
115-
#' @param search_env Search for manifest files in the directories specified by
116-
#' the ADBC_CONFIG_PATH or CONDA_PREFIX environment variables.
115+
#' @param search_env Search for manifest files in the directories specified in
116+
#' the ADBC_CONFIG_PATH environment variable and (when installed with conda)
117+
#' in the conda environment.
117118
#' @param search_user Search for manifest files in the designated directory
118119
#' for user ADBC driver installs.
119120
#' @param search_system Search for manifest files in the designtaed directory

r/adbcdrivermanager/man/adbc_load_flags.Rd

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)