-
Notifications
You must be signed in to change notification settings - Fork 150
Convert to a regular JS module, add build script. #1
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jakewins
added a commit
that referenced
this pull request
Oct 2, 2015
Convert to a regular JS module, add build script.
lutovich
added a commit
to lutovich/neo4j-javascript-driver
that referenced
this pull request
Aug 29, 2018
Bolt V3 allows additional metadata to be attached to BEGIN and RUN messages. This makes it possible to expose couple new features in the API. Auto-commit transactions executed via `Session#run()` now support bookmarks. In previous protocol versions there was no good place in the RUN message to attach bookmarks. Auto-commit transactions will now use bookmarks given in `Driver#session(bookmarkOrBookmarks)` function and participate in causal chaining withing a session. Transactions functions, auto-commit and explicit transactions now accept a configuration object with transaction timeout and metadata. Example of a configuration object: ``` { timeout: 3000, // 3 seconds metadata: {key1: 42, key2: '42'} } ``` where timeout is specified in milliseconds and metadata is an object containing valid Cypher types. Transactions that execute longer than the configured timeout will be terminated by the database. This functionality allows to limit query/transaction execution time. Specified timeout overrides the default timeout configured in the database using `dbms.transaction.timeout` setting. Examples: Specified transaction metadata will be attached to the executing transaction and visible in the output of `dbms.listQueries` and `dbms.listTransactions` procedures. It will also get logged to the `query.log`. This functionality makes it easier to tag transactions and is equivalent to `dbms.setTXMetaData` procedure. Examples: ``` var driver = neo4j.driver(...); var session = driver.session(); var txConfig = { timeout: 5000, // 5 seconds metadata: { type: 'My Query', application: 'My App neo4j#1', sequence_number: 42 } }; // transaction configuration for auto-commit transaction session.run('RETURN $x', {x: 42}, txConfig) .then(...) .catch(...) // transaction configuration for explicit transaction var tx = session.beginTransaction(txConfig); tx.run(...); // transaction configuration for read transaction function session.readTransaction(tx => tx.run('RETURN $x', {x: 42}), txConfig) .then(...) .catch(...) // transaction configuration for write transaction function session.writeTransaction(tx => tx.run('RETURN $x', {x: 42}), txConfig) .then(...) .catch(...) ```
lutovich
added a commit
to lutovich/neo4j-javascript-driver
that referenced
this pull request
Aug 29, 2018
Bolt V3 allows additional metadata to be attached to BEGIN and RUN messages. This makes it possible to expose a couple new features in the API. Auto-commit transactions executed via `Session#run()` now support bookmarks. In previous protocol versions, there was no good place in the RUN message to attach bookmarks. Auto-commit transactions will now use bookmarks given in `Driver#session(bookmarkOrBookmarks)` function and participate in causal chaining within a session. Transactions functions, auto-commit, and explicit transactions now accept a configuration object with transaction timeout and metadata. Example of a configuration object: ``` { timeout: 3000, // 3 seconds metadata: {key1: 42, key2: '42'} } ``` where timeout is specified in milliseconds and metadata is an object containing valid Cypher types. Transactions that execute longer than the configured timeout will be terminated by the database. This functionality allows limiting query/transaction execution time. Specified timeout overrides the default timeout configured in the database using `dbms.transaction.timeout` setting. Examples: Specified transaction metadata will be attached to the executing transaction and visible in the output of `dbms.listQueries` and `dbms.listTransactions` procedures. It will also get logged to the `query.log`. This functionality makes it easier to tag transactions and is equivalent to `dbms.setTXMetaData` procedure. Examples: ``` var driver = neo4j.driver(...); var session = driver.session(); var txConfig = { timeout: 5000, // 5 seconds metadata: { type: 'My Query', application: 'My App neo4j#1', sequence_number: 42 } }; // transaction configuration for auto-commit transaction session.run('RETURN $x', {x: 42}, txConfig) .then(...) .catch(...) // transaction configuration for explicit transaction var tx = session.beginTransaction(txConfig); tx.run(...); // transaction configuration for read transaction function session.readTransaction(tx => tx.run('RETURN $x', {x: 42}), txConfig) .then(...) .catch(...) // transaction configuration for write transaction function session.writeTransaction(tx => tx.run('RETURN $x', {x: 42}), txConfig) .then(...) .catch(...) ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.