Release Notes - Version 1.0.0
Overview:
- Introduces
myDB
, a database management system with JSON support for easy data storage and manipulation in Lua. - Provides functions for creating, modifying, and querying databases and tables.
- Offers flexible data structures for handling structured data, including simple data storage and retrieval.
Features:
- Database Creation:
createDB(dbname)
- Creates a new database with basic info (name, ID, date of creation).
- Table Management:
createTable(dbname, tablename, data)
- Creates a new table within a database.getTableData(dbname, tablename)
- Retrieves data from a specified table.modifyTable(dbname, tablename, data)
- Updates table data with new values.createStructTable(dbname, tablename, struct)
- Creates a table with a specific structure.addStructData(dbname, tablename, vals)
- Adds data to a structured table.removeStructData(dbname, tablename, sno)
- Removes data from a structured table.getStructData(dbname, tablename, sno)
- Retrieves structured data from a table.
- Table Query:
queryStructData(dbname, tablename, fieldname)
- Queries specific fields from the structured data of a table.
- File System Management:
fs.removeDbFile(dbname, file)
- Removes a file from the database directory without updating DB info.fs.fixTableInfo(dbname)
- Fixes and updates the table info based on current database contents.
Internal:
idgen(length)
- Generates a random ID with a specified length.mergeDicts(t1, t2)
- Merges two tables, handling both array and dictionary cases.getdbinfo(dbname)
- Retrieves database info from the database directory.savedbinfo(dbname, info)
- Saves updated database info.
Additional:
- Error Handling: Provides error messages for duplicate tables, missing fields, and non-existent databases or tables.
- JSON Encoding/Decoding: Uses the
json
library for all data encoding and decoding operations.