How to select a single record or a group of records using the SQLMap api

19 views
Skip to first unread message

Rubén V

unread,
Oct 14, 2020, 12:13:46 AM10/14/20
to CodenameOne Discussions
Hi,

I am trying to use the SQLMap api and I cannot find a way to select a single record or a group of records as is done by applying a filter with the "where" condition.

I appreciate an example of how to do it.

Thanks

Shai Almog

unread,
Oct 14, 2020, 11:25:20 PM10/14/20
to CodenameOne Discussions
Hi,
you would do a regular select and pass an object with the primary key field set to the value you're looking for. This would always return one result.

This isn't elegant though. We should probably add a "findByPrimaryKey()" API.

Rubén V

unread,
Oct 14, 2020, 11:46:00 PM10/14/20
to CodenameOne Discussions
Thanks
Reply all
Reply to author
Forward
0 new messages