mira-db
v1.0.42
Published
Mira-DB (OOJS) Database Management System
Downloads
67
Maintainers
Readme
MiraDB (OOJS) Database Management
Mira-DB is open source javascript object oriented database management system
Install (global)
npm install -g mira-db
Mira Source Example
Sample : "local-database.js"
/* MIRA-DB GLOBAL SETTINGS (NEW) */
process.env.SET_LANG="en_us"; //Select current language
process.env.MIRA_DB_TOKEN="E4WXqn_IotaTPN6E"; //Database encryption token
process.env.SET_FILE_HEADER="JQL1"; //Database file header
process.env.SET_FILE_EXTENSION="jsq"; //Database file extension (Do not use the dot)
/* IMPORT MODULE */
const mira = require("mira-db");
/* PERMISSION */
var Perms = { SELECT:true,ADD:true,UNIQUE:true,UPDATE:true,RENAME:true,DROP:true,DELETE:true,CREATE:true,LIST:true }
/* STORAGE FOLDER */
var Storage = __dirname + "/data";
/* DATABASE NAME */
var DB = "test";
/* CREATE A NEW MIRA OBJECT */
var new_database = new mira(Storage,DB,Perms,"UTF-8");
/* MIRA-QUERY */
var query = 'SELECT TABLE person'
/* SAMPLE (RETURN) */
var result = new_database.Query(query);
console.log( result );
/* SAMPLE (CALLBACK) */
new_database.Query(query ,function(result){
console.log( result );
});
Updates & Fixes
- (.0.40) : MIRA-DB GLOBAL SETTINGS (NEW)
License
Copyright (c) 2018 (https://github.com/Nodeclient)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.