Hi Jesse,
I have a quick question here, I am using MongoDB adapter and I am finding
an issue when doing a
boss_db:find(post, [], [{limit,4},{offset,0},{order_by,timestamp},
descending]).
The issue is with the limit part, if I set limit to 1 will work find, it
will return only 1 record, now if I set it to a number greater then 1 it
will return all record in the DB.
Offset, Order_by and DES/ASC work perfectly fine.
I also tried boss_db:find(post, [], [{limit,4}) but same issue as described
above, it will only work fine if I do boss_db:find(post, [], [{limit,1})
Thanks!
El martes, 19 de agosto de 2014 15:01:44 UTC-7, Jesse Gumm escribió:
>
> This is definitely a hairy situation, and trying to selectively parse
> out the "account-1" could certainly lead to issues, since "account-1"
> is a perfectly valid string.
>
> I'm not sure the best way to handle this kind of situation.
>
> Perhaps the simple solution, rather than manually tokenizing the
> string each time would be a simple function like
> boss_db:extract_id(Id), then you could at least use that.
>
> Alternatively, supporting boss_db:find(game_mark, [{AccountId},
> {Gameid}]) where AccountId (having the format "account-1"), gets
> parsed out as {account_id, equals, IntegerID}.
>
> That might be a reasonable option to add some brevity, though not
> entirely sure what folks think of that.
>
>
> On Sun, Jul 20, 2014 at 10:45 AM, Caiyun Deng <[email protected]
> <javascript:>> wrote:
> > Hi!
> > boss_db:find(game_mark, [{account_id, equals, AccountId}, {game_id,
> equals,
> > GameId}]).
> > It excute"SELECT * FROM game_marks WHERE game_id = 'game-5' AND
> account_id =
> > 'account-1' AND TRUE ORDER BY id ASC";
> > But i want it to excute"SELECT * FROM game_marks WHERE game_id = 5 AND
> > account_id = 1 AND TRUE ORDER BY id ASC"
> > Except this:
> > [_Pre, TrueAccountId]" = string.tokens("account-5", "-").
> >
> > Could you tell me is there other better method to do this?
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "ChicagoBoss" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to [email protected] <javascript:>.
> > Visit this group at http://groups.google.com/group/chicagoboss.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/chicagoboss/ee64417d-d7f3-43c4-a7f3-750267f240aa%40googlegroups.com.
>
>
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866 || sigma-star.com || @jessegumm
>
--
You received this message because you are subscribed to the Google Groups
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit
https://groups.google.com/d/msgid/chicagoboss/b7a919d8-3389-434d-9979-50dfbbde9d84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.