datajs-fifiinart
v1.0.0
Published
A small database for node.js.
Readme
DataJS
This is a simple database for Node.js.
Functions
createDatabase
Creates a database. Parameters:
name: The name of the database.
deleteDatabase
Deletes a database. Parameters:
name: The name of the database.
createTable
Creates a table for a database. Parameters:
name: The name of the table.db: The database to connect the table to.columns: The columns to use for the table. Returns the table created.
deleteTable
Deletes a table for a database. Parameters:
name: The name of the table deleted.db: The database the table is connected to.
Table Class Methods
Table#insertRow
Inserts a row into a table. Parameters:
values: The values to insert. (Rest/spread parameter) Returns the table for chaining.
Table#insertRows
Inserts multiple rows into a table. Parameters:
values: The arrays of values to insert. (Rest/spread parameter) Returns the table for chaining.
Table#deleteRow
Deletes a row from the table. Parameters:
index: The index of the row to delete. Returns the table for chaining.
Table#deleteRows
Deletes multiple rows from the table. Parameters:
startIndex: The first index to delete.endIndex: The last index to delete (inclusive). Returns the table for chaining.
Table#push
Pushes the local data into the database and clears the local data.
Table#pull
Pulls data from the database into the local data.
get Table#localContent
Gets the local data.
