Skip to content

Commit

Permalink
Updated the query executor to dropAllConstraints in Sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
nishant-jain-94 committed Aug 24, 2017
1 parent 74c5e2f commit 67357ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions neo4j_utils/dropAllConstraints/dropAllConstraints.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const getConstraints = require('../getConstraints');
const dropAllConstraints = (callback) => {

function dropConstraints(constraints, callback) {
async.map(constraints, ({property_keys, label, type}, callback) => {
const queryExecutorToDropConstraints = async.map(constraints, ({property_keys, label, type}, callback) => {
const query = `DROP CONSTRAINT ON (label:${label}) ASSERT label.${property_keys[0]} IS UNIQUE`;
queryExecutor(query, callback);

}, callback);
return queryExecutor.bind(null, query, callback);
});
async.series(queryExecutorToDropConstraints, callback);
};

async.waterfall([
Expand Down

0 comments on commit 67357ec

Please sign in to comment.