Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclarke committed Jan 8, 2025
1 parent 00f6937 commit c4754a1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 21 deletions.
36 changes: 36 additions & 0 deletions rstdocs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,24 @@ Executes a query, returning no result.
For details on ``args`` see the ``edgedb`` library
`docs page <https://pub.dev/documentation/edgedb/latest/edgedb-library.html>`__.

.. _edgedb-dart-Client-executeSQL:

*method* ``.executeSQL()``
..........................


.. code-block:: dart
Future<void> executeSQL(
String query, [
dynamic args]
)
Executes a SQL query, returning no result.

For details on ``args`` see the ``edgedb`` library
`docs page <https://pub.dev/documentation/edgedb/latest/edgedb-library.html>`__.

.. _edgedb-dart-Client-query:

*method* ``.query()``
Expand Down Expand Up @@ -229,6 +247,24 @@ If the query returns an empty set, a `NoDataError <https://pub.dev/documentation
For details on ``args`` see the ``edgedb`` library
`docs page <https://pub.dev/documentation/edgedb/latest/edgedb-library.html>`__.

.. _edgedb-dart-Client-querySQL:

*method* ``.querySQL()``
........................


.. code-block:: dart
Future<List> querySQL(
String query, [
dynamic args]
)
Executes a SQL query, returning a ``List`` of results.

For details on result types and ``args`` see the ``edgedb`` library
`docs page <https://pub.dev/documentation/edgedb/latest/edgedb-library.html>`__.

.. _edgedb-dart-Client-querySingle:

*method* ``.querySingle()``
Expand Down
32 changes: 16 additions & 16 deletions rstdocs/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,43 +74,43 @@ in parentheses are also valid for query parameters):
* - EdgeDB type
- Dart type
* - Sets
- `List\<dynamic\> <https://api.dart.dev/stable/3.5.4/dart-core/List-class.html>`__
- `List\<dynamic\> <https://api.dart.dev/stable/3.6.0/dart-core/List-class.html>`__
* - Arrays
- `List\<dynamic\> <https://api.dart.dev/stable/3.5.4/dart-core/List-class.html>`__
- `List\<dynamic\> <https://api.dart.dev/stable/3.6.0/dart-core/List-class.html>`__
* - Objects
- `Map\<String, dynamic\> <https://api.dart.dev/stable/3.5.4/dart-core/Map-class.html>`__
- `Map\<String, dynamic\> <https://api.dart.dev/stable/3.6.0/dart-core/Map-class.html>`__
* - Tuples (``tuple<x, y, ...>``)
- `List\<dynamic\> <https://api.dart.dev/stable/3.5.4/dart-core/List-class.html>`__
- `List\<dynamic\> <https://api.dart.dev/stable/3.6.0/dart-core/List-class.html>`__
* - Named tuples (``tuple<foo: x, bar: y, ...>``)
- `Map\<String, dynamic\> <https://api.dart.dev/stable/3.5.4/dart-core/Map-class.html>`__
- `Map\<String, dynamic\> <https://api.dart.dev/stable/3.6.0/dart-core/Map-class.html>`__
* - Ranges
- :ref:`Range\<dynamic\> <edgedb-dart-Range>`
* - Multiranges
- :ref:`MultiRange\<dynamic\> <edgedb-dart-MultiRange>`
* - Enums
- `String <https://api.dart.dev/stable/3.5.4/dart-core/String-class.html>`__
- `String <https://api.dart.dev/stable/3.6.0/dart-core/String-class.html>`__
* - ``str``
- `String <https://api.dart.dev/stable/3.5.4/dart-core/String-class.html>`__
- `String <https://api.dart.dev/stable/3.6.0/dart-core/String-class.html>`__
* - ``bool``
- `bool <https://api.dart.dev/stable/3.5.4/dart-core/bool-class.html>`__
- `bool <https://api.dart.dev/stable/3.6.0/dart-core/bool-class.html>`__
* - ``int16``/``int32``/``int64``
- `int <https://api.dart.dev/stable/3.5.4/dart-core/int-class.html>`__
- `int <https://api.dart.dev/stable/3.6.0/dart-core/int-class.html>`__
* - ``float32``/``float64``
- `double <https://api.dart.dev/stable/3.5.4/dart-core/double-class.html>`__
- `double <https://api.dart.dev/stable/3.6.0/dart-core/double-class.html>`__
* - ``json``
- as decoded by ``json.decode()``
* - ``uuid``
- `String <https://api.dart.dev/stable/3.5.4/dart-core/String-class.html>`__
- `String <https://api.dart.dev/stable/3.6.0/dart-core/String-class.html>`__
* - ``bigint``
- `BigInt <https://api.dart.dev/stable/3.5.4/dart-core/BigInt-class.html>`__
- `BigInt <https://api.dart.dev/stable/3.6.0/dart-core/BigInt-class.html>`__
* - ``decimal``
- *(unsupported)*
* - ``bytes``
- `Uint8List <https://api.dart.dev/stable/3.5.4/dart-typed_data/Uint8List-class.html>`__
- `Uint8List <https://api.dart.dev/stable/3.6.0/dart-typed_data/Uint8List-class.html>`__
* - ``datetime``
- `DateTime <https://api.dart.dev/stable/3.5.4/dart-core/DateTime-class.html>`__
- `DateTime <https://api.dart.dev/stable/3.6.0/dart-core/DateTime-class.html>`__
* - ``duration``
- `Duration <https://api.dart.dev/stable/3.5.4/dart-core/Duration-class.html>`__
- `Duration <https://api.dart.dev/stable/3.6.0/dart-core/Duration-class.html>`__
* - ``cal::local_datetime``
- `LocalDateTime <https://pub.dev/documentation/edgedb/latest/edgedb/LocalDateTime-class.html>`__
* - ``cal::local_date``
Expand All @@ -124,7 +124,7 @@ in parentheses are also valid for query parameters):
* - ``cfg::memory``
- :ref:`ConfigMemory <edgedb-dart-ConfigMemory>`
* - ``ext::pgvector::vector``
- `Float32List <https://api.dart.dev/stable/3.5.4/dart-typed_data/Float32List-class.html>`__ (`List\<double\> <https://api.dart.dev/stable/3.5.4/dart-core/List-class.html>`__)
- `Float32List <https://api.dart.dev/stable/3.6.0/dart-typed_data/Float32List-class.html>`__ (`List\<double\> <https://api.dart.dev/stable/3.6.0/dart-core/List-class.html>`__)

Custom types
------------
Expand Down
10 changes: 5 additions & 5 deletions rstdocs/datatypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The upper boundary of the range, if it exists.
Compares this object to another object.

Returns a value like a `Comparator <https://api.dart.dev/stable/3.5.4/dart-core/Comparator.html>`__ when comparing ``this`` to ``other``.
Returns a value like a `Comparator <https://api.dart.dev/stable/3.6.0/dart-core/Comparator.html>`__ when comparing ``this`` to ``other``.
That is, it returns a negative integer if ``this`` is ordered before ``other``,
a positive integer if ``this`` is ordered after ``other``,
and zero if ``this`` and ``other`` are ordered together.
Expand Down Expand Up @@ -441,7 +441,7 @@ but must be consistent between changes to the set.
int get length
The number of elements in this `Iterable <https://api.dart.dev/stable/3.5.4/dart-core/Iterable-class.html>`__.
The number of elements in this `Iterable <https://api.dart.dev/stable/3.6.0/dart-core/Iterable-class.html>`__.

Counting all elements may involve iterating through all elements and can
therefore be slow.
Expand Down Expand Up @@ -585,7 +585,7 @@ The method has no effect if ``value`` was not in the set.
Set<Range<T>> toSet()
Creates a `Set <https://api.dart.dev/stable/3.5.4/dart-core/Set-class.html>`__ with the same elements and behavior as this ``Set``.
Creates a `Set <https://api.dart.dev/stable/3.6.0/dart-core/Set-class.html>`__ with the same elements and behavior as this ``Set``.

The returned set behaves the same as this set
with regard to adding and removing elements.
Expand All @@ -606,7 +606,7 @@ the returned set will have the same order.
A string representation of this object.

Some classes have a default textual representation,
often paired with a static ``parse`` function (like `int.parse <https://api.dart.dev/stable/3.5.4/dart-core/int/parse.html>`__).
often paired with a static ``parse`` function (like `int.parse <https://api.dart.dev/stable/3.6.0/dart-core/int/parse.html>`__).
These classes will provide the textual representation as
their string representation.

Expand Down Expand Up @@ -745,7 +745,7 @@ ambiguous 'kB', which can mean 1000 or 1024 bytes.
A string representation of this object.

Some classes have a default textual representation,
often paired with a static ``parse`` function (like `int.parse <https://api.dart.dev/stable/3.5.4/dart-core/int/parse.html>`__).
often paired with a static ``parse`` function (like `int.parse <https://api.dart.dev/stable/3.6.0/dart-core/int/parse.html>`__).
These classes will provide the textual representation as
their string representation.

Expand Down

0 comments on commit c4754a1

Please sign in to comment.