digitalmars.D.announce - hunt entity v2.1.0 released!
- Brian (41/41) Jan 09 2019 Hunt Entity is an object-relational mapping (ORM) framework for
- Brian (4/4) Jan 09 2019 Fix example code:
- Martin Tschierschke (4/8) Jan 09 2019 Is your work related to shark?
- Brian (8/17) Jan 09 2019 No, shark library "Entity" define looks like hunt-entity history
- Soulsbane (2/5) Jan 09 2019 Really cool! Thanks.
Hunt Entity is an object-relational mapping (ORM) framework for dlang's database, support PostgreSQL / MySQL / SQLite. This version added pagination for EQL's createQuery(); Example 1 for pagination: ```D class User { mixin MakeModel; AutoIncrement PrimaryKey int id; string name; } auto query = em.createQuery!User("SELECT * FROM User", new Pageable(0, 10)); auto page = query.getPageResult(); logDebug("Page NO: %s, size of Page: %s, Total Pages: %s, Total: %s".format(page.getNumber(), page.getSize(), page.getTotalPages(), page.getTotalElements())); foreach (user; page.getContent()) { logDebug("User[%s] is: %s".format(user.id, user.name)); } ``` Example 2 for limit && offset : ```D class User { mixin MakeModel; AutoIncrement PrimaryKey int id; string name; } auto query = em.createQuery!User("SELECT * FROM User").setFirstResult(10).setMaxResults(20); foreach (user; query.getResultList()) { logDebug("User[%s] is: %s".format(user.id, user.name)); } ```
Jan 09 2019
Fix example code: https://github.com/huntlabs/hunt-entity/wiki/Pagination Github repo: https://github.com/huntlabs/hunt-entity
Jan 09 2019
On Wednesday, 9 January 2019 at 11:34:07 UTC, Brian wrote:Fix example code: https://github.com/huntlabs/hunt-entity/wiki/Pagination Github repo: https://github.com/huntlabs/hunt-entityIs your work related to shark? https://code.dlang.org/packages/shark Regards mt.
Jan 09 2019
On Wednesday, 9 January 2019 at 14:12:06 UTC, Martin Tschierschke wrote:On Wednesday, 9 January 2019 at 11:34:07 UTC, Brian wrote:No, shark library "Entity" define looks like hunt-entity history version. We team has hunt-database and hunt-sql support hunt-entity to work. hunt-entity is so powerfull ORM. shark is very simple, now.Fix example code: https://github.com/huntlabs/hunt-entity/wiki/Pagination Github repo: https://github.com/huntlabs/hunt-entityIs your work related to shark? https://code.dlang.org/packages/shark Regards mt.
Jan 09 2019
On Wednesday, 9 January 2019 at 11:28:58 UTC, Brian wrote:Hunt Entity is an object-relational mapping (ORM) framework for dlang's database, support PostgreSQL / MySQL / SQLite. [...]Really cool! Thanks.
Jan 09 2019