On Sat, 20 Nov 2010 18:03:34 -0500, Kagamin wrote:
> Adam D. Ruppe Wrote:
>
>> Meh, I find the placeholders to be much better (safer too):
>>
>> db.query("select id from objects where type = ?", typeName);
>
> I use it too, but found it hard to maintain/check ordering and meaning
> of parameter
Tomek Sowi�ski Wrote:
> Dnia 20-11-2010 o 22:46:33 Kagamin napisa�(a):
>
> > See attachment. It's just a thought. Anyone want this in the language?
> > ---
> > string sval="ab128#d";
> > int ival=274;
> > static assert("asdf \{sval} astt35 \{ival} zzf \{uuu} g,d" ==
> > "asdf ab128#d astt35
Dnia 20-11-2010 o 22:46:33 Kagamin napisał(a):
See attachment. It's just a thought. Anyone want this in the language?
---
string sval="ab128#d";
int ival=274;
static assert("asdf \{sval} astt35 \{ival} zzf \{uuu} g,d" ==
"asdf ab128#d astt35 274 zzf uuu g,d"); //(uuu not found)
---
std.conv.t
"Kagamin" wrote in message
news:ic9fjp$1no...@digitalmars.com...
> See attachment. It's just a thought. Anyone want this in the language?
> ---
> string sval="ab128#d";
> int ival=274;
> static assert("asdf \{sval} astt35 \{ival} zzf \{uuu} g,d" ==
> "asdf ab128#d astt35 274 zzf uuu g,d"); //(uuu
Adam D. Ruppe Wrote:
> Meh, I find the placeholders to be much better (safer too):
>
> db.query("select id from objects where type = ?", typeName);
It's also non-trivial to implement such functionality, since MS (and Oracle,
afaik) require named parameters.
Adam D. Ruppe Wrote:
> Meh, I find the placeholders to be much better (safer too):
>
> db.query("select id from objects where type = ?", typeName);
I use it too, but found it hard to maintain/check ordering and meaning of
parameters when you edit the query, add or remove parameters.
Kagamin Wrote:
> Wrote some unittests today and thought, this feature is useful when one wants
easy sql statements (in, e.g. unittests).
Meh, I find the placeholders to be much better (safer too):
db.query("select id from objects where type = ?", typeName);
I generally feel the same way about al
Kagamin Wrote:
> See attachment. It's just a thought. Anyone want this in the language?
> ---
> string sval="ab128#d";
> int ival=274;
> static assert("asdf \{sval} astt35 \{ival} zzf \{uuu} g,d" ==
> "asdf ab128#d astt35 274 zzf uuu g,d"); //(uuu not found)
> ---
Wrote some unittests today and t
See attachment. It's just a thought. Anyone want this in the language?
---
string sval="ab128#d";
int ival=274;
static assert("asdf \{sval} astt35 \{ival} zzf \{uuu} g,d" ==
"asdf ab128#d astt35 274 zzf uuu g,d"); //(uuu not found)
---
php.d
Description: Binary data