Add database.getVersion
This commit is contained in:
parent
c5c94bc3ab
commit
417511ffd2
1 changed files with 6 additions and 0 deletions
|
@ -31,3 +31,9 @@ exports.completeTransaction = transaction =>
|
||||||
transaction.addEventListener('complete', () => resolve());
|
transaction.addEventListener('complete', () => resolve());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
exports.getVersion = async (name) => {
|
||||||
|
const connection = await exports.open(name);
|
||||||
|
const { version } = connection;
|
||||||
|
connection.close();
|
||||||
|
return version;
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue