cruddyorm

CruddyORM is a simple object relational mapping library for Postgresql and vibe.d.

Cruddiness: - It only supports one database. - It assumes that you only want to persist fields, not properties. - It assumes that the id field is a UUID named id. - It uses std.experimental.logger instead of vibe's logging. Vibe doesn't offer a topic-based logging configuration, so that wouldn't let the ORM be stricter about its logging than application code. - It doesn't do connection pooling.

Members

Aliases

Connection
alias Connection = LockedConnection!__Conn
Undocumented in source.

Enums

Conflict
enum Conflict
Undocumented in source.

Functions

dbdelete
void dbdelete(T val)

Delete something from the database.

dbdelete
void dbdelete(UUID id)

Delete something from the database.

fetch
Nullable!T fetch(UUID id)
Undocumented in source. Be warned that the author may not have intended to support it.
inConnection
auto inConnection()
Undocumented in source. Be warned that the author may not have intended to support it.
insert
void insert(T val)

Insert a new DB row.

insertConn
void insertConn(Connection conn, T val)
Undocumented in source. Be warned that the author may not have intended to support it.
insertText
string insertText()
Undocumented in source. Be warned that the author may not have intended to support it.
parse
T parse(Row row)
Undocumented in source. Be warned that the author may not have intended to support it.
parse
T parse(Row row)
Undocumented in source. Be warned that the author may not have intended to support it.
query
auto query(string cmd, Args args)

Execute a query, parsing the results automatically.

queryConn
auto queryConn(Connection conn, string cmd, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
saveOrUpdate
void saveOrUpdate(T val)

Update the value if it's already in the database, otherwise insert it.

toParams
QueryParams toParams(T val, bool trailingId)
Undocumented in source. Be warned that the author may not have intended to support it.
update
void update(T val)

Update a DB row.

updateConn
void updateConn(Connection conn, T val)

Update a DB row with an existing connection.

updateText
string updateText()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

connectionString
string connectionString;

The connection string to connect to postgresql.

dblog
MultiLogger dblog;

The logger for the ORM. This is public so you can set its level separately. By default, it logs at warning and above.

Structs

Transient
struct Transient

Attribute to mark a field as transient (don't save it).

Meta