//create databaseletquery=orm.database('DATABASE_NAME').create().run();//list all databases Refsletquery=orm.database().allRef().run();//list all database documentletquery=orm.database().all().run();//get single databaseletquery=orm.database("DATABASE_NAME").get().run();//rename single databaseletquery=orm.database("OLD_DATABASE_NAME").renameTo('NEW_DATABASE_NAME').run();//delete databaseletquery=orm.database("DATABASE_NAME").delete().run();//annotate databaseletquery=orm.database("DATABASE_NAME").annotate({key: "value"}).run();
Key
//create keyletquery=orm.key().create("DATABASE_NAME","ROLE_NAME","KEY_NAME","KEY_DATA").run();//list all key Refsletquery=orm.key().allRef().run();//list all key documentsletquery=orm.key().all().run();//get key from secretletquery=orm.key().keyFromSecret("SECRET").run();//get single keyletquery=orm.key("KEY_ID").get().run();//delete keyletquery=orm.key("KEY_ID").delete().run();
Collection
//create collectionletquery=orm.collection('COLLECTION_NAME').create().run();//update collectionletquery=orm.collection('COLLECTION_NAME').update({name: name,ttl_days: ttl_days,history_days: history_days,data: data,permissions: permissions}).run();//list all collection Refsletquery=orm.collection().all().run();//list all collection Documentsletquery=orm.collection().allRef().run();//get single collectionletquery=orm.collection("COLLECTION_NAME").get().run();//rename single collectionletquery=orm.collection("OLD_COLLECTION_NAME").renameTo('NEW_COLLECTION_NAME').run();//delete collectionletquery=orm.collection("COLLECTION_NAME").delete().run();
Document
//create documentletquery=orm.collection("COLLECTION_NAME").document.create({foo: "bar"}).run();//create document with idletquery=orm.collection("COLLECTION_NAME").document.create({id: "DOCUMENT_ID",foo: "bar"}).run();//create many documentletquery=orm.collection("COLLECTION_NAME").document.createMany([{foo: "bar"},{baz: "faz"}]).run();//list all documentletquery=orm.collection("COLLECTION_NAME").document.all().run();//get single documentletquery=orm.collection("COLLECTION_NAME").document.get("DOCUMENT_ID").run();//update single collectionletquery=orm.collection("COLLECTION_NAME").document.update('DOCUMENT_ID',{foo: "bar"}).run();//replace single documentletquery=orm.collection("COLLECTION_NAME").document.replace('DOCUMENT_ID',{foo: "bar"}).run();//delete documentletquery=orm.collection("COLLECTION_NAME").document.delete().run();
Index
// create indexletquery=orm.index('INDEX_NAME').create("COLLECTION_NAME").run();//create index with termsletquery=orm.index('INDEX_NAME').create("COLLECTION_NAME",["email","name","address.city"]).run();//create index with terms, ref and tsletquery=orm.index('INDEX_NAME').create("COLLECTION_NAME",["email","ref","ts"]).run();//create index with valuesletquery=orm.index('INDEX_NAME').create("COLLECTION_NAME",null,["email","name","address.city"]).run();//create index with values, ref, tsletquery=orm.index('INDEX_NAME').create("COLLECTION_NAME",null,["email","ref","ts"]).run();//create unique indexletquery=orm.index('INDEX_NAME').create('collection',"email",null,true).run();//list all collectionletquery=orm.index().all().run();//get single collectionletquery=orm.index("INDEX_NAME").get().run();// rename single indexletquery=orm.index("INDEX_NAME").renameTo('INDEX_NAME').run();// delete indexletquery=orm.index("INDEX_NAME").delete().run();