File tree 2 files changed +6
-30
lines changed
2 files changed +6
-30
lines changed Original file line number Diff line number Diff line change @@ -218,32 +218,6 @@ def summarize(self):
218
218
self ._consume ()
219
219
return self ._summary
220
220
221
- def skip (self , records ):
222
- """ Move the cursor forward by a number of records.
223
-
224
- :arg records: the number of records to step over
225
- """
226
- if records < 0 :
227
- raise ValueError ("Cannot skip a negative number of records" )
228
- skipped = 0
229
- while skipped < records and self .next ():
230
- skipped += 1
231
- return skipped
232
-
233
- def first (self ):
234
- """ Attempt to navigate to the first record in this stream, returning
235
- ``True`` if this is possible, ``False`` otherwise.
236
- """
237
- if self ._position < 0 :
238
- return self .next ()
239
- else :
240
- return self ._position == 0
241
-
242
- def single (self ):
243
- """ Return ``True`` if able to navigate to first and only record.
244
- """
245
- return self .first () and self .at_end ()
246
-
247
221
def _consume (self ):
248
222
# Consume the remainder of this result, triggering all appropriate callback functions.
249
223
fetch_next = self ._connection .fetch_next
Original file line number Diff line number Diff line change @@ -127,8 +127,9 @@ def test_transaction_commit(self):
127
127
tx .commit ()
128
128
# end::transaction-commit[]
129
129
cursor = session .run ("MATCH (p:Person {name: 'The One'}) RETURN count(p)" )
130
- assert cursor .single ()
131
- assert cursor .record ()["count(p)" ] == 1
130
+ assert cursor .next ()
131
+ assert cursor ["count(p)" ] == 1
132
+ assert cursor .at_end ()
132
133
session .close ()
133
134
driver .close ()
134
135
@@ -141,8 +142,9 @@ def test_transaction_rollback(self):
141
142
tx .rollback ()
142
143
# end::transaction-rollback[]
143
144
cursor = session .run ("MATCH (p:Person {name: 'The One'}) RETURN count(p)" )
144
- assert cursor .single ()
145
- assert cursor .record ()["count(p)" ] == 0
145
+ assert cursor .next ()
146
+ assert cursor ["count(p)" ] == 0
147
+ assert cursor .at_end ()
146
148
session .close ()
147
149
driver .close ()
148
150
You can’t perform that action at this time.
0 commit comments