Examples of custom mapping operations

27 views
Skip to first unread message

eirik...@knowit.no

unread,
Oct 13, 2018, 4:08:14 PM10/13/18
to ScalikeJDBC Users Group
The documentation of the One-To-X api (http://scalikejdbc.org/documentation/one-to-x.html) states that users can write their own mappings of the result set using #map and #foldLeft. Are there any examples of this somewhere?

Kazuhiro Sera

unread,
Oct 14, 2018, 2:40:48 AM10/14/18
to eirik...@knowit.no, scalikejdbc...@googlegroups.com
You can find example code in scalikejdbc github repository. The
following code will be helpful to understand how map/foldLeft can be
used.

* https://github.com/scalikejdbc/scalikejdbc/blob/535eb553bec5a951c33e3463e7054c5e4d1ea1b3/scalikejdbc-interpolation/src/test/scala/scalikejdbc/SQLInterpolationSpec.scala#L180-L204
* https://github.com/scalikejdbc/scalikejdbc/blob/535eb553bec5a951c33e3463e7054c5e4d1ea1b3/scalikejdbc-core/src/main/scala/scalikejdbc/OneToManies2SQL.scala#L16-L29

On Sun, Oct 14, 2018 at 5:08 AM <eirik...@knowit.no> wrote:
>
> The documentation of the One-To-X api (http://scalikejdbc.org/documentation/one-to-x.html) states that users can write their own mappings of the result set using #map and #foldLeft. Are there any examples of this somewhere?
>
> --
> You received this message because you are subscribed to the Google Groups "ScalikeJDBC Users Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to scalikejdbc-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

eirik...@knowit.no

unread,
Oct 14, 2018, 11:38:38 AM10/14/18
to ScalikeJDBC Users Group
Much appreciated! Thank you!
> To unsubscribe from this group and stop receiving emails from it, send an email to scalikejdbc-users-group+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages