mlaanderson / database-js

Common Database Interface for Node
MIT License
74 stars 16 forks source link

Transaction support #3

Closed thiagodp closed 6 years ago

thiagodp commented 6 years ago

database-js does not support transactions yet, right?

thiagodp commented 6 years ago

BTW, some suggested methods:

/** Returns true if it supports transactions, or false otherwise. */
isTransactionSupported(): boolean;

/** Returns true if it is in a transaction, or false otherwise. */
inTransaction(): boolean;

/** Returns (a promise with) true if a new transaction was started, or false if it was already in a transaction. */
beginTransaction(): Promise< boolean >;

/** Returns (a promise with) true if it commited, or false if it was not in a transaction. */
commit(): Promise< boolean >;

/** Returns (a promise with) true if it rolled back, or false if it was not in a transaction. */
rollback(): Promise< boolean >;
mlaanderson commented 6 years ago

No transaction support yet.

mlaanderson commented 6 years ago

Completed in 0284334417ff1391423ca6c983d3e4ae7ab5a956, tagged in v1.3.0