@@ -424,7 +424,7 @@ async def get_two_tx(tx):
424
424
was obtained has been closed.
425
425
426
426
.. versionchanged:: 5.0
427
- Can raise :exc:`ResultConsumedError`.
427
+ Can raise :exc:`. ResultConsumedError`.
428
428
"""
429
429
if self ._out_of_scope :
430
430
raise ResultConsumedError (self , _RESULT_OUT_OF_SCOPE_ERROR )
@@ -452,24 +452,24 @@ async def single(self, strict: bool = False) -> t.Optional[Record]:
452
452
453
453
Calling this method always exhausts the result.
454
454
455
- If ``strict`` is :const :`True`, this method will raise an exception if
455
+ If ``strict`` is :data :`True`, this method will raise an exception if
456
456
there is not exactly one record left.
457
457
458
- If ``strict`` is :const :`False`, fewer than one record will make this
458
+ If ``strict`` is :data :`False`, fewer than one record will make this
459
459
method return :data:`None`, more than one record will make this method
460
460
emit a warning and return the first record.
461
461
462
462
:param strict:
463
- If :const :`True`, raise a :class:`neo4j .ResultNotSingleError`
464
- instead of returning None if there is more than one record or
465
- warning if there are more than 1 record.
466
- :const :`False` by default.
463
+ If :data :`True`, raise a :exc:` .ResultNotSingleError` instead of
464
+ returning :data:` None` if there is more than one record or warning
465
+ if there is more than 1 record.
466
+ :data :`False` by default.
467
467
:type strict: bool
468
468
469
469
:returns: the next :class:`neo4j.Record` or :data:`None` if none remain
470
470
471
471
:warns: if more than one record is available and
472
- ``strict`` is :const :`False`
472
+ ``strict`` is :data :`False`
473
473
474
474
:raises ResultNotSingleError:
475
475
If ``strict=True`` and not exactly one record is available.
@@ -480,7 +480,7 @@ async def single(self, strict: bool = False) -> t.Optional[Record]:
480
480
.. versionchanged:: 5.0
481
481
482
482
* Added ``strict`` parameter.
483
- * Can raise :exc:`ResultConsumedError`.
483
+ * Can raise :exc:`. ResultConsumedError`.
484
484
"""
485
485
await self ._buffer (2 )
486
486
buffer = self ._record_buffer
@@ -545,7 +545,7 @@ async def peek(self) -> t.Optional[Record]:
545
545
consumed.
546
546
547
547
.. versionchanged:: 5.0
548
- Can raise :exc:`ResultConsumedError`.
548
+ Can raise :exc:`. ResultConsumedError`.
549
549
"""
550
550
await self ._buffer (1 )
551
551
if self ._record_buffer :
@@ -554,14 +554,14 @@ async def peek(self) -> t.Optional[Record]:
554
554
555
555
@AsyncNonConcurrentMethodChecker .non_concurrent_method
556
556
async def graph (self ) -> Graph :
557
- """Turn the result into a :class:`neo4j .Graph`.
557
+ """Turn the result into a :class:`.Graph`.
558
558
559
- Return a :class:`neo4j.graph. Graph` instance containing all the graph
560
- objects in the result. This graph will also contain already consumed
561
- records.
559
+ Return a :class:`. Graph` instance containing all the graph objects in
560
+ the result.
561
+ This graph will also contain already consumed records.
562
562
563
- After calling this method, the result becomes
564
- detached, buffering all remaining records.
563
+ After calling this method, the result becomes detached, buffering all
564
+ remaining records.
565
565
566
566
:returns: a result graph
567
567
@@ -570,7 +570,7 @@ async def graph(self) -> Graph:
570
570
consumed.
571
571
572
572
.. versionchanged:: 5.0
573
- Can raise :exc:`ResultConsumedError`.
573
+ Can raise :exc:`. ResultConsumedError`.
574
574
"""
575
575
await self ._buffer_all ()
576
576
return self ._hydration_scope .get_graph ()
@@ -591,7 +591,7 @@ async def value(
591
591
consumed.
592
592
593
593
.. versionchanged:: 5.0
594
- Can raise :exc:`ResultConsumedError`.
594
+ Can raise :exc:`. ResultConsumedError`.
595
595
596
596
.. seealso:: :meth:`.Record.value`
597
597
"""
@@ -612,7 +612,7 @@ async def values(
612
612
consumed.
613
613
614
614
.. versionchanged:: 5.0
615
- Can raise :exc:`ResultConsumedError`.
615
+ Can raise :exc:`. ResultConsumedError`.
616
616
617
617
.. seealso:: :meth:`.Record.values`
618
618
"""
@@ -641,7 +641,7 @@ async def data(self, *keys: _TResultKey) -> t.List[t.Dict[str, t.Any]]:
641
641
consumed.
642
642
643
643
.. versionchanged:: 5.0
644
- Can raise :exc:`ResultConsumedError`.
644
+ Can raise :exc:`. ResultConsumedError`.
645
645
646
646
.. seealso:: :meth:`.Record.data`
647
647
"""
@@ -690,7 +690,7 @@ async def to_df(
690
690
for instance will return a DataFrame with two columns: ``n`` and ``m``
691
691
and 10 rows.
692
692
693
- :param expand: If :const :`True`, some structures in the result will be
693
+ :param expand: If :data :`True`, some structures in the result will be
694
694
recursively expanded (flattened out into multiple columns) like so
695
695
(everything inside ``<...>`` is a placeholder):
696
696
@@ -720,21 +720,21 @@ async def to_df(
720
720
* ``<r>->.type`` (str) the relationship's type.
721
721
See :attr:`.Relationship.type`.
722
722
723
- * :const :`list` objects under any variable ``<l>`` will be expanded
723
+ * :class :`list` objects under any variable ``<l>`` will be expanded
724
724
into
725
725
726
726
* ``<l>[].0`` (any) the 1st list element
727
727
* ``<l>[].1`` (any) the 2nd list element
728
728
* ...
729
729
730
- * :const :`dict` objects under any variable ``<d>`` will be expanded
730
+ * :class :`dict` objects under any variable ``<d>`` will be expanded
731
731
into
732
732
733
733
* ``<d>{}.<key1>`` (any) the 1st key of the dict
734
734
* ``<d>{}.<key2>`` (any) the 2nd key of the dict
735
735
* ...
736
736
737
- * :const :`list` and :const :`dict` objects are expanded recursively.
737
+ * :class :`list` and :class :`dict` objects are expanded recursively.
738
738
Example::
739
739
740
740
variable x: [{"foo": "bar", "baz": [42, 0]}, "foobar"]
@@ -751,10 +751,10 @@ async def to_df(
751
751
* Everything else (including :class:`.Path` objects) will not
752
752
be flattened.
753
753
754
- :const :`dict` keys and variable names that contain ``.`` or ``\``
754
+ :class :`dict` keys and variable names that contain ``.`` or ``\``
755
755
will be escaped with a backslash (``\.`` and ``\\`` respectively).
756
756
:param parse_dates:
757
- If :const :`True`, columns that exclusively contain
757
+ If :data :`True`, columns that exclusively contain
758
758
:class:`time.DateTime` objects, :class:`time.Date` objects, or
759
759
:data:`None`, will be converted to :class:`pandas.Timestamp`.
760
760
@@ -818,7 +818,7 @@ def closed(self) -> bool:
818
818
result cannot be used to acquire further records.
819
819
820
820
In such case, all methods that need to access the Result's records,
821
- will raise a :exc:`ResultConsumedError` when called.
821
+ will raise a :exc:`. ResultConsumedError` when called.
822
822
823
823
:returns: whether the result is closed.
824
824
0 commit comments