shark 0.1.2
Native object-relational mapping for various databases
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:
Shark <img align="right" alt="Logo" width="100" src="https://i.imgur.com/ef3a5Ph.png">
Native connector for various databases.
Supports:
- PostreSQL
Work in progress:
- MySQL (and MariaDB)
import shark;
class Test : Entity {
override string tableName() {
return "test";
}
@PrimaryKey
@AutoIncrement
Integer testId;
@NotNull
String a;
Short b;
}
Database database = new PostgresqlDatabase("localhost");
database.connect("test", "postgres", "root");
database.dropIfExists("test");
database.init!Test();
Test test = new Test();
test.a = "test";
database.insert(test);
assert(test.testId == 1); // auto-increment of primary key
Test[] result = database.select!Test();
assert(result.length == 1);
assert(result[0].testId == 1);
assert(result[0].a == "test");
- Registered by Kripth
- 0.1.2 released 5 years ago
- scorpion-framework/shark
- MIT
- Dependencies:
- xbuffer
- Versions:
-
0.1.2 2019-Jan-08 0.1.1 2019-Jan-03 0.1.0 2018-Dec-31 ~master 2019-Jan-11 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
35 downloads total
-
- Score:
- 0.4
- Short URL:
- shark.dub.pm