Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Make session in assertSchema configurable #578

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,12 @@ export const assertSchema = ({
driver,
schema,
dropExisting = true,
debug = false
debug = false,
sessionParams = {}
}) => {
const statement = schemaAssert({ schema, dropExisting });
const executeQuery = driver => {
const session = driver.session();
const session = driver.session(sessionParams);
return session
.writeTransaction(tx =>
tx.run(statement).then(result => {
Expand Down