UNPKG

orange-orm

Version:

Object Relational Mapper

13 lines (11 loc) 412 B
let beginCommand = require('./commands/beginCommand'); let executeQuery = require('./executeQueries/executeQuery'); let setSessionSingleton = require('./setSessionSingleton'); function begin(context, transactionLess) { if (transactionLess) { setSessionSingleton(context, 'transactionLess', true); return Promise.resolve(); } return executeQuery(context, beginCommand(context)); } module.exports = begin;