forked from cory/tildefriends
Exposed some ways to explore databases.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3879 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -199,6 +199,13 @@ async function getProcessBlob(blobId, key, options) {
|
||||
var db = new Database(process.credentials.session.name + ':' + key);
|
||||
return Object.fromEntries(Object.keys(db).map(x => [x, db[x].bind(db)]));
|
||||
};
|
||||
imports.my_shared_database = function(packageName, key) {
|
||||
var db = new Database(':shared:' + process.credentials.session.name + ':' + packageName + ':' + key);
|
||||
return Object.fromEntries(Object.keys(db).map(x => [x, db[x].bind(db)]));
|
||||
};
|
||||
imports.databases = function() {
|
||||
return [].concat(databases.list(':shared:' + process.credentials.session.name + ':%'), databases.list(process.credentials.session.name + ':%'));
|
||||
};
|
||||
}
|
||||
if (options.packageOwner && options.packageName) {
|
||||
imports.shared_database = function(key) {
|
||||
|
Reference in New Issue
Block a user