-
Notifications
You must be signed in to change notification settings - Fork 0
/
jdb.js
34 lines (27 loc) · 896 Bytes
/
jdb.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const fs = require('fs')
const { v4: uuidv4 } = require('uuid')
const { create } = require('./jdb-funcs/create')
const { assignR } = require('./jdb-funcs/assign')
const { assignI } = require('./jdb-funcs/assign')
const { getR, __getIEl } = require('./jdb-funcs/get')
// keywords for the module
const tokens = {
'Db': 'database',
'rGroup': 'relational group',
'iGroup': 'individual group',
'element': 'JSON object in r/i groups'
}
// create('Db', 'database')
// create('rGroup', 'Users')
// create('iGroup', 'Office')
// create('element', 'Users', 'name')
// create('element', 'Users', 'id')
// create('element', 'Office', 'hardwares')
// let data = {
// 'name': 'Johnb',
// 'id': '1234653'
// }
// assignR('Users', data)
// assignR('Users', data)
// console.log(getR('Users', 'moral', ['id', '12346']))
module.exports = { create, assignI, assignR, getR, __getIEl }