[erlang-questions] ErlSQL: easy expression and generation of SQL statements in Erlang
Dmitrii Dimandt
dmitriid@REDACTED
Mon Sep 18 10:09:21 CEST 2006
On 9/17/06, Yariv Sadan <yarivvv@REDACTED> wrote:
>
> Hi,
>
> > It looks cool, but feels like it could need some polishing.
> >
> > For example, why
> >
> > {delete,project,{a,'=',5}} ->
> > "DELETE FROM project WHERE (a = 5)"
> >
> > and not
> >
> > {delete,project,{where, {a,'=',5}}} ->
> > "DELETE FROM project WHERE (a = 5)"
> >
> > making it consistent with
> >
> > {select,{foo,as,bar},{from,{baz,as,blub}}} ->
> > "SELECT foo AS bar FROM baz AS blub"
> >
>
> I made it so now you can write {delete, {from, project}, {where,
> {a,'=',5}}}, and also {update, project, {a,'=',5}, {where, {b,'=',7}}}
>
> The 'from' and 'where' components are optional because they are
> implicit in the structure of DELETE and UPDATE statements, but not in
> the structure of SELECT statements.
Hmmm.... I wonder if this could be mapped to Mnesia. Somehow... By
someone... :))
Regards,
> Yariv
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060918/11ac2936/attachment.htm>
More information about the erlang-questions
mailing list