microrm2 0.8.3

Micro ORM for SQLite3


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Micro ORM for SQLite3

Build Status Build status Codecov Dub Downloads License

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)
  • redthing1
Dependencies:
d2sqlite3
Versions:
0.8.3 2023-May-16
~master 2023-May-16
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 25 downloads total

Score:
0.3
Short URL:
microrm2.dub.pm