How to express Postgres arrays with Scala Slick

前端 未结 2 1815
春和景丽
春和景丽 2021-01-03 17:06

I have a table in Postgres 9.5 with this structure:

my_table (id Integer, images_ranks image_rank[]);

where image_rank is:

2条回答
  •  佛祖请我去吃肉
    2021-01-03 17:17

    The best would be for you to use this excellent library: https://github.com/tminglei/slick-pg

    If you would rather implement it yourself, have a look at the source code (https://github.com/tminglei/slick-pg/tree/master/core/src/main/scala/com/github/tminglei/slickpg/array) and get what you want from there.

提交回复
热议问题