A clean, easy-to-use database framework for EZ Language. Provides SQLite database operations with CRUD helpers, query builders, transactions, and more.
ez install db
| Package | Range |
|---|---|
| No dependencies. | |
A secure and powerful object-oriented SQLite wrapper for the EZ language.
insert() and update() to avoid writing manual SQL.begin(), commit(), and rollback().Database model.ez install db
use "db"
Database Modelconnect(path)Opens or creates a SQLite database at the specified path.
query(sql, [params])Executes a SELECT query and returns an array of dictionaries (rows).
execute(sql, [params])Executes a command (INSERT, UPDATE, DELETE).
insert(table, data_dict)Inserts a record using a dictionary. Returns the last inserted ID.
update(table, id, data_dict)Updates a record by ID using a dictionary.
delete(table, id)Deletes a record by ID.
begin() / commit() / rollback()Standard transaction management.
use "db"
db = openDatabase("my_app.db")
// Schema
db.createTable("tasks", ["id INTEGER PRIMARY KEY", "title TEXT", "done BOOL"])
// Secure Insert
id = db.insert("tasks", {title: "Write README", done: false})
// Parameterized Query
results = db.query("SELECT * FROM tasks WHERE done = ?", [false])
get t in results {
out t.title
}
db.disconnect()| Version | Size | Downloads | Published |
|---|---|---|---|
1.0.0 |
3.4 KB | 0 | 1 hour ago |
sha256 07263a0ff7b49b0f6466996ba2a5b23a2c5a02daca6e7086eb764acca2789ada