Skip to content

Commit 5c27147

Browse files
committed
Add index directives for keywords, symbols, sql equivalents, etc. in docs
1 parent e9368e7 commit 5c27147

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+391
-23
lines changed

docs/datamodel/access_policies.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
Access Policies
77
===============
88

9+
.. index:: access policy, object-level security, row-level security, RLS,
10+
allow, deny, using
11+
912
Object types can contain security policies that restrict the set of objects
1013
that can be selected, inserted, updated, or deleted by a particular query.
1114
This is known as *object-level security* and it is similar in function to SQL's
@@ -378,6 +381,9 @@ is visible to a particular query.
378381
Policy types
379382
^^^^^^^^^^^^
380383

384+
.. index:: accesss policy, select, insert, delete, update, update read,
385+
update write, all
386+
381387
For the most part, the policy types correspond to EdgeQL's *statement types*:
382388

383389
- ``select``: Applies to all queries; objects without a ``select`` permission
@@ -523,6 +529,8 @@ Custom error messages
523529

524530
.. versionadded:: 3.0
525531

532+
.. index:: access policy, errmessage, using
533+
526534
When you run a query that attempts a write and is restricted by an access
527535
policy, you will get a generic error message.
528536

@@ -583,6 +591,8 @@ will receive this error:
583591
Disabling policies
584592
^^^^^^^^^^^^^^^^^^
585593

594+
.. index:: apply_access_policies
595+
586596
You may disable all access policies by setting the ``apply_access_policies``
587597
:ref:`configuration parameter <ref_std_cfg>` to ``false``.
588598

docs/datamodel/aliases.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Aliases
55
=======
66

7+
.. index:: alias, virtual type
8+
79
.. important::
810

911
This section assumes a basic understanding of EdgeQL. If you aren't familiar

docs/datamodel/annotations.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Annotations
55
===========
66

7+
.. index:: annotation, title, description, deprecated
8+
79
*Annotations* are named values associated with schema items and
810
are designed to hold arbitrary schema-level metadata represented as a
911
:eql:type:`str`.
@@ -52,6 +54,8 @@ should be used instead.
5254
User-defined annotations
5355
------------------------
5456

57+
.. index:: abstract annotation
58+
5559
To declare a custom annotation type beyond the three built-ins, add an abstract
5660
annotation type to your schema. A custom annotation could be used to attach
5761
arbitrary JSON-encoded data to your schema—potentially useful for introspection

docs/datamodel/computeds.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Computeds
66

77
:edb-alt-title: Computed properties and links
88

9+
.. index:: computeds, :=, __source__, backlinks
10+
911
.. important::
1012

1113
This section assumes a basic understanding of EdgeQL. If you aren't familiar

docs/datamodel/constraints.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
Constraints
55
===========
66

7+
.. index:: constraint, validation, exclusive, expression on, one_of, max_value,
8+
max_ex_value, min_value, min_ex_value, max_len_value, min_len_value,
9+
regexp, __subject__
10+
711
.. important::
812

913
This section assumes a basic understanding of EdgeQL.
@@ -202,6 +206,8 @@ Constraints can be defined on computed properties.
202206
Composite constraints
203207
^^^^^^^^^^^^^^^^^^^^^
204208

209+
.. index:: tuple
210+
205211
To define a composite constraint, create an ``exclusive`` constraint on a
206212
tuple of properties or links.
207213

@@ -239,6 +245,8 @@ Partial constraints
239245

240246
.. versionadded:: 2.0
241247

248+
.. index:: constraint exclusive on, except
249+
242250
Constraints on object types can be made partial, so that they don't apply
243251
when some condition holds.
244252

@@ -333,6 +341,8 @@ Link ``@source`` and ``@target`` constraints
333341

334342
.. versionadded:: 4.0
335343

344+
.. index:: constraint exclusive on, @source, @target
345+
336346
.. note::
337347

338348
``@source`` and ``@target`` are available starting with version 4.3.
@@ -412,6 +422,8 @@ using arbitrary EdgeQL expressions. The example below uses the built-in
412422
Constraints and type inheritence
413423
--------------------------------
414424

425+
.. index:: delegated constraint
426+
415427
If you define a constraint on a type and then extend that type, the constraint
416428
will *not* be applied individually to each extending type. Instead, it will
417429
apply globally across all the types that inherited the constraint.

docs/datamodel/extensions.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
Extensions
55
==========
66

7+
.. index:: using extension
8+
79
Extensions are the way EdgeDB adds more functionality. In principle,
810
extensions could add new types, scalars, functions, etc., but, more
911
importantly, they can add new ways of interacting with the database.
1012

1113
Built-in extensions
1214
-------------------
1315

16+
.. index:: edgeql_http, graphql, auth, ai, pg_trgm, pg_unaccent, pgcrypto,
17+
pgvector
18+
1419
There are a few built-in extensions available:
1520

1621
- ``edgeql_http``: enables :ref:`EdgeQL over HTTP <ref_edgeql_http>`,
@@ -43,6 +48,8 @@ To enable these extensions, add a ``using`` statement at the top level of your s
4348
Standalone extensions
4449
---------------------
4550

51+
.. index:: postgis
52+
4653
Additionally, standalone extension packages can be installed via the CLI.
4754

4855
List installed extensions:

docs/datamodel/functions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Functions
55
=========
66

7+
.. index:: function, using
8+
79
.. note::
810

911
This page documents how to define custom functions, however EdgeDB provides a

docs/datamodel/future.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Future Behavior
55
===============
66

7+
.. index:: future, nonrecursive_access_policies
8+
79
Any time that we add new functionality to EdgeDB we strive to do it in the
810
least disruptive way possible. Deprecation warnings, documentation and guides
911
can help make these transitions smoother, but sometimes the changes are just

docs/datamodel/globals.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
Globals
77
=======
88

9+
.. index:: global, required global
10+
911
Schemas can contain scalar-typed *global variables*.
1012

1113
.. code-block:: sdl
@@ -151,6 +153,8 @@ default value.
151153
Computed globals
152154
----------------
153155

156+
.. index:: global, :=
157+
154158
Global variables can also be computed. The value of computed globals are
155159
dynamically computed when they are referenced in queries.
156160

docs/datamodel/indexes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Indexes
55
=======
66

7+
.. index:: index on, performance, postgres query planner
8+
79
An index is a data structure used internally to speed up filtering, ordering,
810
and grouping operations. Indexes help accomplish this in two key ways:
911

@@ -100,6 +102,8 @@ references multiple properties of the enclosing object type.
100102
Index on multiple properties
101103
----------------------------
102104

105+
.. index:: tuple
106+
103107
A *composite index* is an index that references multiple properties. This can
104108
speed up queries that filter, order, or group on both properties.
105109

@@ -137,6 +141,8 @@ In EdgeDB, this index is created by indexing on a ``tuple`` of properties.
137141
Index on a link property
138142
------------------------
139143

144+
.. index:: __subject__, linkprops
145+
140146
Link properties can also be indexed.
141147

142148
.. code-block:: sdl
@@ -168,6 +174,8 @@ Link properties can also be indexed.
168174
Specify a Postgres index type
169175
-----------------------------
170176

177+
.. index:: pg::hash, pg::btree, pg::gin, pg::gist, pg::spgist, pg::brin
178+
171179
.. versionadded:: 3.0
172180

173181
EdgeDB exposes Postgres indexes that you can use in your schemas. These are
@@ -201,6 +209,8 @@ You can use them like this:
201209
Annotate an index
202210
-----------------
203211

212+
.. index:: annotation
213+
204214
Indexes can be augmented with annotations.
205215

206216
.. code-block:: sdl

0 commit comments

Comments
 (0)