Yeah, the driver is not really complete and will probably always lag
behind the sql drivers in terms of functionality since mnesia is not a
sql database.  But, this looks like something that was just
overlooked.  Unfortunately, the project I was using the mnesia driver
for was put on hold so I haven't been able to flush out this kind of
stuff.

If you would like to dive into the code and fix it that would be
great.  The code could definitely use a second pair of eyes.  Else,
I'll fix it as soon as possible.  Let me know if you want a crack at
it...

On Nov 3, 10:42 pm, David King <[EMAIL PROTECTED]> wrote:
> It doesn't look like the mnesia erlydb driver supports ordering as
> well as the other erlydb drivers do. For instance, this doesn't work:
>
> newest(Top,First) ->
>    post:find({id,'>',1},
>              [{order_by,[{created_on,desc}]},
>               {limit,First,Top}]).
>
> It fails with:
>
> ERROR erlang  code  crashed:
> File: appmod:0
> Reason: "Unhandled extras"
> Req: {http_request,'GET',{abs_path,"/post/newest"},{1,1}}
>
> But this *does* work:
>
> newest(Top,First) ->
>    post:find({id,'>',1},
>              [{order_by,created_on},
>               {limit,First,Top}]).
>
> (Note the simplified ordering.) The former looks almost exactly like
> the one under "Protection against SQL injection attacks" at <http://
> yarivsblog.com/articles/2006/09/30/erlydb-0-7/>, so I would assume
> that it would work


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to