Skip to content

Commit

Permalink
fix repl examples (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsidnev authored Aug 2, 2023
1 parent 9244572 commit 7461e99
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/edgedb.ex
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ defmodule EdgeDB do
```iex
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> {:error, %EdgeDB.Error{} = error} = EdgeDB.query(client, "select UndefinedType")
iex(2)> raise error
iex(3)> raise error
** (EdgeDB.Error) InvalidReferenceError: object type or alias 'default::UndefinedType' does not exist
```
Expand Down
6 changes: 3 additions & 3 deletions lib/edgedb/types/object.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule EdgeDB.Object do
```iex
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> %EdgeDB.Object{} = object =
iex(2)> EdgeDB.query_required_single!(client, "\"\"
...(2)> EdgeDB.query_required_single!(client, "\"\"
...(2)> select schema::ObjectType{
...(2)> name
...(2)> }
Expand All @@ -31,7 +31,7 @@ defmodule EdgeDB.Object do
```iex
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> %EdgeDB.Object{} = object =
iex(2)> EdgeDB.query_required_single!(client, "\"\"
...(2)> EdgeDB.query_required_single!(client, "\"\"
...(2)> select schema::Property {
...(2)> name,
...(2)> annotations: {
Expand Down Expand Up @@ -217,7 +217,7 @@ defmodule EdgeDB.Object do
```iex
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> object =
iex(2)> EdgeDB.query_required_single!(client, "\"\"
...(2)> EdgeDB.query_required_single!(client, "\"\"
...(2)> select schema::Property {
...(2)> name,
...(2)> annotations: {
Expand Down
2 changes: 1 addition & 1 deletion lib/edgedb/types/set.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule EdgeDB.Set do
```iex
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> %EdgeDB.Set{} =
iex(2)> EdgeDB.query!(client, "\"\"
...(2)> EdgeDB.query!(client, "\"\"
...(2)> select schema::ObjectType{
...(2)> name
...(2)> }
Expand Down
2 changes: 1 addition & 1 deletion pages/rst/api/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ If an error occurs, it will be returned as a ``{:error, exception}`` tuple where
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> {:error, %EdgeDB.Error{} = error} = EdgeDB.query(client, "select UndefinedType")
iex(2)> raise error
iex(3)> raise error
** (EdgeDB.Error) InvalidReferenceError: object type or alias 'default::UndefinedType' does not exist
If a query has arguments, they can be passed as a list for a query with positional arguments or as a list of keywords for a query with named
Expand Down
8 changes: 4 additions & 4 deletions pages/rst/api/edgedb-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ An immutable representation of an object instance returned from a query.
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> %EdgeDB.Object{} = object =
iex(2)> EdgeDB.query_required_single!(client, """
...(2)> EdgeDB.query_required_single!(client, """
...(2)> select schema::ObjectType{
...(2)> name
...(2)> }
Expand All @@ -38,7 +38,7 @@ in the query to access them from the links.
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> %EdgeDB.Object{} = object =
iex(2)> EdgeDB.query_required_single!(client, """
...(2)> EdgeDB.query_required_single!(client, """
...(2)> select schema::Property {
...(2)> name,
...(2)> annotations: {
Expand Down Expand Up @@ -183,7 +183,7 @@ Convert an object into a regular map.
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> object =
iex(2)> EdgeDB.query_required_single!(client, """
...(2)> EdgeDB.query_required_single!(client, """
...(2)> select schema::Property {
...(2)> name,
...(2)> annotations: {
Expand All @@ -208,7 +208,7 @@ A representation of an immutable set of values returned by a query. Nested sets
iex(1)> {:ok, client} = EdgeDB.start_link()
iex(2)> %EdgeDB.Set{} =
iex(2)> EdgeDB.query!(client, """
...(2)> EdgeDB.query!(client, """
...(2)> select schema::ObjectType{
...(2)> name
...(2)> }
Expand Down

0 comments on commit 7461e99

Please sign in to comment.