Skip to content

check if statement text is empty on Session.run and Transaction.run #288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 21, 2017

Conversation

ali-ince
Copy link
Contributor

No description provided.

@ali-ince ali-ince changed the base branch from 1.5 to 1.4 September 19, 2017 10:18
Copy link
Contributor

@lutovich lutovich left a comment

Choose a reason for hiding this comment

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

@ali-ince looks good! one minor comment

@@ -65,6 +65,9 @@ class Session {
statement = statement.text;
}
assertString(statement, 'Cypher statement');
if (statement.length == 0) {
throw new TypeError('Cypher statement is expected to be a non-empty string.');
Copy link
Contributor

@lutovich lutovich Sep 20, 2017

Choose a reason for hiding this comment

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

Maybe worth adding a assertCypherStatement() function in util.js that will verify given cypher is a non-empty string? It can be used in session and transaction just to avoid minor code duplication

@lutovich lutovich merged commit a758662 into neo4j:1.4 Sep 21, 2017
@ali-ince ali-ince deleted the 1.4-check-for-empty-statement branch November 27, 2017 10:51
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