From 906528bdf401a63ad12e9feafacb66ad80855043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alja=C5=BE=20Mur=20Er=C5=BEen?= Date: Tue, 17 Dec 2024 17:16:36 +0100 Subject: [PATCH] Docs for installing extensions --- docs/datamodel/extensions.rst | 56 +++++++++++++++++++++++++++++++++++ setup.py | 1 - 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/docs/datamodel/extensions.rst b/docs/datamodel/extensions.rst index 743312e6035..23cf80c9272 100644 --- a/docs/datamodel/extensions.rst +++ b/docs/datamodel/extensions.rst @@ -8,10 +8,66 @@ Extensions are the way EdgeDB adds more functionality. In principle, extensions could add new types, scalars, functions, etc., but, more importantly, they can add new ways of interacting with the database. +Built-in extensions +------------------- + +There is a few built-in extensions available: + - ``edgeql_http``: enables :ref:`EdgeQL over HTTP ` - ``graphql``: enables :ref:`GraphQL ` - ``auth``: enables :ref:`EdgeDB Auth ` +.. _ref_datamodel_using_extension: + +To enable these extensions, they need to be declared in the schema via ``using`` +statement: + +.. code:: sdl + + using extension auth; + + +Standalone extensions +--------------------- + +Additionally, standalone extension packages can be installed via the CLI: + +.. code:: bash + + $ edgedb extension list -I my_instance + ┌─────────┬─────────┐ + │ Name │ Version │ + └─────────┴─────────┘ + + $ edgedb extension list-available -I my_instance + ┌─────────┬───────────────┐ + │ Name │ Version │ + │ postgis │ 3.4.3+6b82d77 │ + └─────────┴───────────────┘ + + $ edgedb extension install -I my_instance -E postgis + Found extension package: postgis version 3.4.3+6b82d77 + 00:00:03 [====================] 22.49 MiB/22.49 MiB + Extension 'postgis' installed successfully. + + $ edgedb extension list -I my_instance + ┌─────────┬───────────────┐ + │ Name │ Version │ + │ postgis │ 3.4.3+6b82d77 │ + └─────────┴───────────────┘ + +After installing extensions, make sure to restart your instance: + +.. code:: bash + + $ edgedb instance restart -I my_instance + +Standalone extensions can now be declared in the schema, same as :ref:`built-in +extensions `. + +To restore a dump that uses a standalone extension, that extension has installed +before the restore process. + .. list-table:: :class: seealso diff --git a/setup.py b/setup.py index 5532ff45e04..9c9cfb8e9dc 100644 --- a/setup.py +++ b/setup.py @@ -550,7 +550,6 @@ def _compile_cli(build_base, build_temp): check=True, ) - for dest in ('gel', 'edgedb'): cli_dest = ROOT_PATH / 'edb' / 'cli' / dest # Delete the target first, to avoid "Text file busy" errors during