Close

Argentum got SQLite integration

A project log for Argentum programming language

It automatically prevents all memory leaks. It doesn't use GC, so no pauses. It's compiled to machine code. It's crazy safe and fast.

andrey-kalmatskiyAndrey Kalmatskiy 01/07/2024 at 01:000 Comments

Example:

Sqlite.open("../demo/mydb.sqlite", xReadWrite) ?
_.query("
   SELECT "id", "name", "avatar"
   FROM "table"
   LIMIT 0, 20
", xSimpleQuery)
.execute() row {
   id = row.intAt(0);
   name = row.stringAt(1);
   ava = row.stringAt(2);
   log(`${id} ${name} ${ava}`);
"))

 This prints, depending on the actual database content:

1 Andy  0x4563
2 Paula 0x2321 

The SQLiteFfi argentum module has multiple feature not shown in the example:

Currently  sqliteFfi links the full database engine inside the application that uses it, but this can be easily switched to DLL/so if needed.

Discussions