Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

prisma.db firebase

const { FireDatabase } = require("prisma.db");
const db = new FireBase({
  service: require("./service.json"),
  collection: "data",
});

db.set("mars", { hello: "world" }); // returns { hello: "world" }
db.push("mars", "livings", { name: "test" }); // returns { name: "test" }

db.get("mars"); // returns { hello: "world" }
db.fetch("mars"); // returns { hello: "world" }

db.has("mars"); // returns true
db.has("mars", "livings"); // returns true

db.delete("mars", "livings"); // returns true
db.clear("mars"); // returns true
db.destroy("mars"); // returns true

db.dataAll(); // returns { mars: { hello: "world" } }

db.type("mars", "hello"); // returns "object"
db.type("mars", "livings"); // returns "array"

db.add("mars", "population", 1); // returns 1
db.subtract("mars", "population", 1); // returns 0
db.math("mars", "population", "*", 10); // returns 10
Comment

PREVIOUS NEXT
Code Example
Javascript :: react js date range 
Javascript :: v-if disable vue 
Javascript :: Search an elemnt in a sorted and rotated array 
Javascript :: req.session undefined express node js 
Javascript :: function Using onpause and onplay Method to Start and Stop Animationto replace source file path to jpg image 
Javascript :: advanced javascript concepts 
Javascript :: change placeholder color in material ui 
Javascript :: how to square number in javascript 
Javascript :: javascript program to find largest of 2 numbers 
Javascript :: react word cload 
Javascript :: onScrollBottom 
Javascript :: spliting html select option 
Javascript :: random jwt secret key generator 
Javascript :: create useTransaction 
Javascript :: how to get the first element in an array in javascript 
Javascript :: nodejs mysql set query timeout 
Javascript :: adonis model inheritance 
Javascript :: react onwheel preventDefault 
Javascript :: filter by last week 
Javascript :: react-icons/vsc 
Javascript :: Cannot redefine property: clientWidth 
Javascript :: Delete Button not working with json server using angularjs 
Javascript :: angular chart js graph legend colors 
Javascript :: Changing Component File location in React native does not show in main App 
Javascript :: What is the best way to download mulitple images using jquery 
Javascript :: how to set the x and y axis title in plotly express bar 
Javascript :: mongodb create index json 
Javascript :: show hide div in javascript 
Javascript :: get value from createReadStream 
Javascript :: generate package json for existing project 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =