Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

prisma.db mysql

const { MysqlDatabase } = require("prisma.db");
const db = new MysqlDatabase({
    host: "...",
    user: "...",,
    password: "...",,
    database: "...",
});

db.tableList();  /* Object: {table...} */ 
db.tableSet(`CREATE TABLE IF NOT EXISTS...`);  /* Boolean: true */ 
db.tableDelete("users");  /* Boolean: true */ 

db.set("users", { name: "Raphael" }); /* Boolean: true */ 
db.update("users", "name", "Raffaello" , { name: "Raffaello Sanzio", });  /* Boolean: true */ 

db.fetch("users", "name", "Raphael"); /* returns { hello: "world" } */ 
db.has("users", "name", "Raphael"); /* Boolean: true */ 

db.delete("users", "name", "Raphael"); /* Boolean: true */ 
db.destroy(); // Database connect is closed
db.clear("users"); /* Boolean: true */ 
db.size("users"); /* returns 1 */
Comment

PREVIOUS NEXT
Code Example
Javascript :: padstart in javascript 
Javascript :: .then function 
Javascript :: nodejs cdn 
Javascript :: jwt decode 
Javascript :: fastify 
Javascript :: what is lexical environment in javascript 
Javascript :: push.js 
Javascript :: how to set three js canvas width 100% 
Javascript :: Graph pie 
Javascript :: click 
Javascript :: erc20 token api 
Javascript :: sort javascript 
Javascript :: how to return when child process is complete in node js 
Javascript :: angular loop through array 
Javascript :: react faq 
Javascript :: react npm start not working 
Javascript :: Javascript first example 
Javascript :: angular js 
Javascript :: AJAX - XMLHttpRequest 
Javascript :: usestate in react 
Javascript :: object model javascript 
Javascript :: What is constructor.constructor()() in JavaScript 
Javascript :: callback in javascript 
Javascript :: node js http request express 
Javascript :: what is a blob in javascript 
Javascript :: express middleware status code always 200 
Javascript :: rxjs sequence of api calls 
Javascript :: js.l17 
Javascript :: javqascript sarray push method 
Javascript :: file_get_contents api json 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =