|
From: Justin B. <jgb...@gm...> - 2009-07-22 15:34:14
|
Nope, that really wouldn't work with HaskellDB. I've CC'ed the list
but I am pretty sure on this one.
On Wed, Jul 22, 2009 at 7:16 AM, Keren Lenz<ker...@gm...> wrote:
> Thank you very much for your help.
> I'm comparing features of HaskellDB with those of other libraries/solutions
> for type safe generation of queries.
> Here is an example (in imperative pseudo code) of what I mean by dynamic
> query:
> Query generate(bool cond1, bool cond2) {
> Colums c = null;
> if(cond1)
> c.add(col1);
> if(cond3)
> c.add(col2);
> Query q = SELECT + c + FROM table_name;
> return q;
> }
>
> That is, the selected columns are chosen based on runtime conditions.
> Is that possible with HaskellDB?
>
> Thanks again,
> Keren.
>
>
>
>
> On Mon, Jul 20, 2009 at 6:17 PM, Justin Bailey <jgb...@gm...> wrote:
>>
>> In what way do you mean "dynamic"? Do you mean the tables & columns
>> used in the query, or the conditions (i.e. whatever is in the "where"
>> clause)?
>>
>> In the first case, not easily. The columns in the result of a query
>> are carried in the type, which means you could only specify that at
>> runtime with some Template Haskell magic. In the second case, easily.
>>
>> If you want to be more specific I'm sure I (or someone) can help you out.
>>
>> 2009/7/19 Keren Lenz <ker...@gm...>:
>> > Hello,
>> >
>> > Does HaskellDB support dynamic queries, that is, queries which
>> > are
>> > generated at runtime based on some user input?
>> >
>> > Thanks in advanced,
>> > Keren.
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Enter the BlackBerry Developer Challenge
>> > This is your chance to win up to $100,000 in prizes! For a limited time,
>> > vendors submitting new applications to BlackBerry App World(TM) will
>> > have
>> > the opportunity to enter the BlackBerry Developer Challenge. See full
>> > prize
>> > details at: http://p.sf.net/sfu/Challenge
>> > _______________________________________________
>> > Haskelldb-users mailing list
>> > Has...@li...
>> > https://lists.sourceforge.net/lists/listinfo/haskelldb-users
>> >
>> >
>
>
|