Skip to content

Commit

Permalink
Docs for installing extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
aljazerzen committed Dec 17, 2024
1 parent d89da8c commit 906528b
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
56 changes: 56 additions & 0 deletions docs/datamodel/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ref_edgeql_http>`
- ``graphql``: enables :ref:`GraphQL <ref_graphql_index>`
- ``auth``: enables :ref:`EdgeDB Auth <ref_guide_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 <ref_datamodel_using_extension>`.

To restore a dump that uses a standalone extension, that extension has installed
before the restore process.


.. list-table::
:class: seealso
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 906528b

Please sign in to comment.