Re: hunt entity v2.1.0 released!

2019-01-09 Thread Soulsbane via Digitalmars-d-announce

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.


Re: hunt entity v2.1.0 released!

2019-01-09 Thread Brian via Digitalmars-d-announce
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:

Fix example code:
https://github.com/huntlabs/hunt-entity/wiki/Pagination

Github repo:
https://github.com/huntlabs/hunt-entity


Is your work related to shark?
https://code.dlang.org/packages/shark

Regards mt.


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.


Re: hunt entity v2.1.0 released!

2019-01-09 Thread Martin Tschierschke via Digitalmars-d-announce

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-entity


Is your work related to shark?
https://code.dlang.org/packages/shark

Regards mt.




Re: hunt entity v2.1.0 released!

2019-01-09 Thread Brian via Digitalmars-d-announce

Fix example code:
https://github.com/huntlabs/hunt-entity/wiki/Pagination

Github repo:
https://github.com/huntlabs/hunt-entity


Re: [nvimhost-d] neovim/nvim plugins natively in D!

2019-01-09 Thread bauss via Digitalmars-d-announce

On Tuesday, 8 January 2019 at 21:29:51 UTC, viniarck wrote:

Hi All,

What if you could write natively high-performance nvim plugins 
in D? Which kind of plugins would you write? It turns out now 
you can.


I've just released `nvimhost` v1.1.1, 
https://github.com/viniarck/nvimhost-d.


I haven't written that many plugins yet, but the past weeks 
I've been using one simple plugin to quickly switch between 
`*.c*` and `*.h*` files (since I'm doing C++ full time in my 
day job) 
https://github.com/viniarck/nvimhost-d/blob/master/examples/altfile_plugin.d, and it's been stable so far. I'll release more plugins soon, stay tuned. This library is still pretty new, so, I'd appreciate any feedback and look forward to your contribution/plugins.


Let me take the chance to also thank @zombinedev and @wilzbach 
who promptly helped me in the slack channel when I needed help.


That's pretty cool.

Good job!


hunt entity v2.1.0 released!

2019-01-09 Thread Brian via Digitalmars-d-announce
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));
}

```