EntityManager

Entity Manager

Primary object of the ORM

Constructors

this
this(DatabaseDriver db)

Members

Functions

find
deprecated EntityCollection!TEntity find(Query delegate(Query) @(safe) buildQuery)
Undocumented in source. Be warned that the author may not have intended to support it.
find
deprecated EntityCollection!TEntity find(void delegate(Statement) @(safe) bindValues)
Undocumented in source. Be warned that the author may not have intended to support it.
get
bool get(ulong id, TEntity output)

Loads the requested entity (#ID) from the database

manyToManyAssign
void manyToManyAssign(TEntity1 e1, TEntity2 e2)

Assigns two entities with a many-to-many relation to each other

manyToManyUnassign
void manyToManyUnassign(TEntity1 e1, TEntity2 e2)

Deletes the association from each other of two entities with a many-to-many relation

manyToOne
bool manyToOne(TEntityMany many, TEntityOne output)
oneToOne
bool oneToOne(TEntitySource source, TEntityTarget toOne)
remove
void remove(ulong id)
void remove(TEntity entity)

Removes (deletes) the provided entity from the database

save
void save(TEntity entity)

Updates or stores the provided entity in the database

store
ulong store(TEntity entity)

Stores the provided entity in the database

update
void update(TEntity entity)

Updates the provided entity in the database

Static functions

_pragma
void _pragma()
Undocumented in source. Be warned that the author may not have intended to support it.
find
PreCollection!(TEntity, DatabaseDriver) find()

Finds entites from the database

manyToMany
PreCollection!(TEntityTarget, DatabaseDriver) manyToMany(TEntitySource source)
oneToMany
PreCollection!(TEntityMany, DatabaseDriver) oneToMany(TEntityOne source)

Meta