microrm 0.8.1
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
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
- Registered by Oleg
- 0.8.1 released 3 years ago
- deviator/microrm
- MIT
- Copyright © 2017, Oleg Butko
- Authors:
- Dependencies:
- d2sqlite3
- Versions:
-
0.8.1 2021-May-06 0.8.0 2019-May-31 0.7.0 2017-Oct-18 0.6.0 2017-Oct-04 0.5.0 2017-Sep-17 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
171 downloads total
-
- Score:
- 1.8
- Short URL:
- microrm.dub.pm