On Monday, 15 January 2018 at 15:28:19 UTC, Martin Nowak wrote:
More concise stuff is possible with heavy compile-time trickery
(https://dpaste.dzfl.pl/cd375ac594cf) without incurring dreaded
1+N queries or even any unnecessary SELECT fields.
foreach (u; db.select!User.where!"NOT can_overdraw"
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote:
auto db = new ORM;
auto users =
db.select(User).where(email.like("*@hotmail.com")).limit(10);
Expression templates are a dead-end for any non-trivial queries.
You have to embrace SQL to properly use RDMS, at the cost of
beginners having
On Friday, 5 January 2018 at 15:38:17 UTC, Binghoo Dang wrote:
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote:
I think code style like:
~~
struct User
{
int id;
string name;
string email;
}
class ORM
{
}
auto db =
On Friday, 5 January 2018 at 12:19:11 UTC, thedeemon wrote:
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote:
I think code style like:
db.select(User).where(email.like("*@hotmail.com")).limit(10);
You need to read about templates in D, here's a good guide:
https://github.com/PhilippeSiga
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote:
I think code style like:
~~
struct User
{
int id;
string name;
string email;
}
class ORM
{
}
auto db = new ORM;
auto users =
db.select(User).where(email.like("*@hotm
On Friday, 5 January 2018 at 12:19:11 UTC, thedeemon wrote:
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote:
I think code style like:
db.select(User).where(email.like("*@hotmail.com")).limit(10);
You need to read about templates in D, here's a good guide:
https://github.com/PhilippeSiga
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote:
I think code style like:
db.select(User).where(email.like("*@hotmail.com")).limit(10);
You need to read about templates in D, here's a good guide:
https://github.com/PhilippeSigaud/D-templates-tutorial
Basically you can write a function l
On Friday, 5 January 2018 at 08:34:00 UTC, user789 wrote:
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote:
I think code style like:
~~
struct User
{
int id;
string name;
string email;
}
class ORM
{
}
auto db = new
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote:
I think code style like:
~~
struct User
{
int id;
string name;
string email;
}
class ORM
{
}
auto db = new ORM;
auto users =
db.select(User).where(email.like("*@hotm
I think code style like:
~~
struct User
{
int id;
string name;
string email;
}
class ORM
{
}
auto db = new ORM;
auto users =
db.select(User).where(email.like("*@hotmail.com")).limit(10);
foreach(user; users)
{
writel
10 matches
Mail list logo