Installing
Just installing module
$ npm install simple-databse
Quick start
Creating file with
import { SimpleDatabase } from 'simple-database'
const simd = new SimpleDatabase('example.simd')
Adding table columns
simd.addColumn('id', 'number', {
unique: true
})
simd.addColumns([{
name: 'name',
type: 'string',
default: 'No Name',
unique: true
}, {
name: 'suranme',
type: 'string',
unique: true
}])
Insert, update and delete data from table
simd.insert({
id: 12345,
name: 'Kio',
surname: 'gia'
})
simd.update({
surname: 'Gia'
}, {
column: 'id',
operand: 12345
})
simd.delete({
column: 'name',
operator: '!=',
operand: 'Kio'
})
Getting data
simd.select({
column: 'name',
operand: 'Kio'
})
simd.selectByUnique({
column: 'id',
operand: 12345
})
simd.forEach((row, rowIndex, rows) => {
})
simd.getAll
Classes
SimpleDatabase
Soon...
Visualizer
Soon...