Skip to content

Bookmarking - #104

Merged
technige merged 4 commits into
1.1from
1.1-bookmarking
Dec 14, 2016
Merged

Bookmarking#104
technige merged 4 commits into
1.1from
1.1-bookmarking

Conversation

@technige

@technige technige commented Dec 5, 2016

Copy link
Copy Markdown
Contributor

No description provided.

@technige technige changed the title Bookmarking [NOT READY FOR MERGE] Bookmarking Dec 5, 2016
@apcj
apcj requested a review from lutovich December 8, 2016 09:26

@lutovich lutovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nigelsmall review completed, couple small comments.

Comment thread neo4j/v1/session.py
:return: Cypher result
:rtype: :class:`.StatementResult`
"""
self.last_bookmark = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to do this initialization together with initialization in line 314?

@technige technige Dec 14, 2016

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes we do. This clears the bookmark before a run, it's not initialisation.

Comment thread neo4j/v1/session.py
def commit_transaction(self):
self.run("COMMIT")
result = self.run("COMMIT")
self.connection.sync()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to test that we send commit and rollback messages eagerly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests added for that.

Comment thread neo4j/v1/bolt.py
self.der_encoded_server_certificate = config.get("der_encoded_server_certificate")

def on_success(metadata):
self.server_version = metadata.get("server")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

server_version field is initialized here but where is it read?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just used in a test right now. It will conflict with #108 so I'll adjust it properly for that.

Comment thread neo4j/v1/session.py

def begin_transaction(self):
def begin_transaction(self, bookmark=None):
""" Create a new :class:`.Transaction` within this session.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should docstring also say something about the bookmark parameter?

@technige
technige merged commit a39c181 into 1.1 Dec 14, 2016
@technige
technige deleted the 1.1-bookmarking branch December 14, 2016 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants