Operator overloading

aarti_pl aarti at interia.pl
Wed Dec 24 14:56:33 PST 2008


Christopher Wright pisze:
> Denis Koroskin wrote:
>> Slightly off-topic.
>>
>> How would you implement, say, LIKE condition? Similar to the 
>> following, perhaps:
>> Query query = Select(a).Where(id.Like("%substring%"));
>>
>> You could implement "==" the same way:
>> Query query = Select(a).Where(id.EqualsTo(5));
> 
> downs way:
> auto query1 = select(a) /where/ "id" /eq/ 5;
> auto query2 = select(a) /where/ "name" /like/ "%bob%";

Nice, but I am not so sure that as much intuitive? :-)

BR
Marcin Kuszczak
(aarti_pl)



More information about the Digitalmars-d mailing list