Available
amalgame-sqlite
Embedded SQLite 3, public domain, zero system deps.
Overview
Direct binding to SQLite 3 vendored inside the package. No system library to install — the SQLite C code is compiled once, when the package is installed, then linked into your binary. Ideal for single-node apps, local development, and anything that does not need a separate DB server.
Features
- ✓
SQLite.Open(path),Exec,QueryAll,LastInsertId,ChangesAPI - ✓Explicit transactions via
SQLite.Begin/Commit/Rollback - ✓Parameterised queries (
?) withExecBindandQueryBindAll - ✓Public domain — no license friction
- ✓Vendored: a single
amc package add sqliteand it compiles
Planned
- ◐Typed column accessors: today every cell comes back as text
- ◐Prepared-statement reuse
- ◐BLOBs and named parameters
- ◐WAL mode helpers
Example
Minimal usage example — copy-paste runnable after install.
import Amalgame.Database.SQLite
public class Program {
public static void Main() {
let db = SQLite.Open("data.db")
if (!SQLite.IsOpen(db)) {
Console.WriteLine("open failed: " + SQLite.LastError(db))
return
}
SQLite.Exec(db, "CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT)")
let params = new List<string>()
params.Add("Alice")
SQLite.ExecBind(db, "INSERT INTO users (name) VALUES (?)", params)
let rows = SQLite.QueryAll(db, "SELECT id, name FROM users")
for row in rows {
Console.WriteLine(row.Get(0) + " : " + row.Get(1))
}
SQLite.Close(db)
}
}
At a glance
- License: Apache-2.0
- Install:
amc package add sqlite - Source: amalgame-lang/amalgame-database-sqlite
- Official index: amalgame-lang/packages-index