mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-02-01 15:23:03 +00:00
support transaction for postgre
This commit is contained in:
parent
767c1f7568
commit
bc8aa37c86
@ -43,6 +43,18 @@ export default class extends Base {
|
||||
});
|
||||
return schema;
|
||||
}
|
||||
/**
|
||||
* start transaction
|
||||
* @return {Promise} []
|
||||
*/
|
||||
startTrans(){
|
||||
if (this.transTimes === 0) {
|
||||
this.transTimes++;
|
||||
return this.execute('BEGIN');
|
||||
}
|
||||
this.transTimes++;
|
||||
return Promise.resolve();
|
||||
}
|
||||
/**
|
||||
* parse limit
|
||||
* @param {String} limit []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user