Skip to content

Commit

Permalink
Kill old -> syntax from synopses
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Feb 20, 2025
1 parent 33e18cb commit 728dcb5
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions docs/datamodel/constraints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ constraint:

.. code-block:: edgeql
alter type User create property score -> int64 {
alter type User create property score: int64 {
create constraint min_value(0)
};
Expand All @@ -786,8 +786,8 @@ Create a Vector with a maximum magnitude:
.. code-block:: edgeql
create type Vector {
create required property x -> float64;
create required property y -> float64;
create required property x: float64;
create required property y: float64;
create constraint expression ON (
__subject__.x^2 + __subject__.y^2 < 25
);
Expand Down
10 changes: 5 additions & 5 deletions docs/datamodel/globals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ commands described later:
# Global variable declaration:
[{required | optional}] [single]
global <name> -> <type>
global <name>: <type>
[ "{"
[ default := <expression> ; ]
[ <annotation-declarations> ]
Expand All @@ -266,7 +266,7 @@ Description
There are two different forms of ``global`` declarations, as shown in the
syntax synopsis above:

1. A *settable* global (defined with ``-> <type>``) which can be changed using
1. A *settable* global (defined with ``: <type>``) which can be changed using
a session-level :ref:`set <ref_eql_statements_session_set_alias>` command.

2. A *computed* global (defined with ``:= <expression>``), which cannot be
Expand Down Expand Up @@ -326,7 +326,7 @@ Declare a new global variable:

.. code-block:: sdl
global current_user_id -> uuid;
global current_user_id: uuid;
global current_user := (
select User filter .id = global current_user_id
);
Expand Down Expand Up @@ -376,7 +376,7 @@ Declare a new global variable using DDL.
[ with <with-item> [, ...] ]
create [{required | optional}] [single]
global <name> -> <type>
global <name>: <type>
[ "{" <subcommand>; [...] "}" ] ;

# Computed global variable form:
Expand Down Expand Up @@ -420,7 +420,7 @@ Define a new global property ``current_user_id``:

.. code-block:: edgeql
create global current_user_id -> uuid;
create global current_user_id: uuid;
Define a new *computed* global property ``current_user`` based on the
previously defined ``current_user_id``:
Expand Down
2 changes: 1 addition & 1 deletion docs/datamodel/indexes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ Example:
.. code-block:: edgeql
create type User {
create property name -> str {
create property name: str {
set default := '';
};
Expand Down
6 changes: 3 additions & 3 deletions docs/datamodel/introspection/casts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ allowed. For example, consider the following type:
.. code-block:: sdl
type Example {
property p_int16 -> int16;
property p_float32 -> float32;
property p_json -> json;
property p_int16: int16;
property p_float32: float32;
property p_json: json;
}
.. code-block:: edgeql-repl
Expand Down
4 changes: 2 additions & 2 deletions docs/datamodel/introspection/colltypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ For a type with an :eql:type:`array` property, consider the following:
.. code-block:: sdl
type User {
required property name -> str;
property favorites -> array<str>;
required property name: str;
property favorites: array<str>;
}
Introspection of the ``User`` with emphasis on properties:
Expand Down
6 changes: 3 additions & 3 deletions docs/datamodel/introspection/indexes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ Consider the following schema:
.. code-block:: sdl
abstract type Addressable {
property address -> str;
property address: str;
}
type User extending Addressable {
# define some properties and a link
required property name -> str;
required property name: str;
multi link friends -> User;
multi link friends: User;
# define an index for User based on name
index on (.name);
Expand Down
4 changes: 2 additions & 2 deletions docs/datamodel/migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ syntax:
start migration to {
module default {
type User {
property username -> str;
property username: str;
};
};
};
Expand Down Expand Up @@ -234,7 +234,7 @@ syntax:
create migration {
create type default::User {
create property username -> str;
create property username: str;
}
};
Expand Down
6 changes: 3 additions & 3 deletions docs/datamodel/mutation_rewrites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ When creating a new property or link:
.. eql:synopsis::
{create | alter} type <type-name> "{"
create { property | link } <prop-or-link-name> -> <type> "{"
create { property | link } <prop-or-link-name>: <type> "{"
create rewrite {insert | update} [, ...]
using <expr>
"}" ;
Expand Down Expand Up @@ -426,10 +426,10 @@ property on each update:
.. code-block:: edgeql
alter type User {
create property created -> datetime {
create property created: datetime {
create rewrite insert using (datetime_of_statement());
};
create property modified -> datetime {
create property modified: datetime {
create rewrite update using (datetime_of_statement());
};
};
Expand Down
2 changes: 1 addition & 1 deletion docs/datamodel/objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ Create an object type ``User``:
.. code-block:: edgeql
create type User {
create property name -> str;
create property name: str;
};
Expand Down

0 comments on commit 728dcb5

Please sign in to comment.