microrm 0.7.0

Micro ORM for SQLite3


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Micro ORM for SQLite3

Very simple ORM with single backend (SQLite3).

struct Foo { ulong id; string text; ulong ts; }
struct Baz { string one; double two; }
struct Bar { ulong id; float value; Baz baz; }

enum schema = buildSchema!(Foo, Bar);

auto db = new MDatabase("test.db");
db.run(schema);

writeln("Bar count: ", db.count!Bar.run);

db.del!Foo.where("ts <", cts - cast(ulong)1e8).run;

db.insert(Foo(0, "hello", cts), Foo(20, "world", cts));
db.insert(Foo(0, "hello", cts), Foo(0, "world", cts));

db.insertOrReplace(Foo(1, "hello", cts), Foo(3, "world", cts));

See example/source/app.d

Authors:
Oleg Butko (deviator)
Dependencies:
d2sqlite3
Versions:
0.7.0 2017-Oct-18
0.6.0 2017-Oct-04
0.5.0 2017-Sep-17
0.4.0 2017-Aug-26
0.3.0 2017-Aug-07
Show all 8 versions
Download Stats:
  • 0 downloads today

  • 3 downloads this week

  • 3 downloads this month

  • 13 downloads total