Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gavin Bisesi
    @Daenyth
    not sure, I recall someone on our team hit weird issues with it but I don't remember what
    Naveen Kumar Parachur Cotha
    @naveencotha-zt
    Hi, is there a getting started guide or something to read up?
    Gavin Bisesi
    @Daenyth
    Essential Slick is what I recommend
    Naveen Kumar Parachur Cotha
    @naveencotha-zt
    does it talk about slick-pg specifics?
    Gavin Bisesi
    @Daenyth
    You really only need the README
    from github
    Naveen Kumar Parachur Cotha
    @naveencotha-zt
    ok sounds good.
    Tom Wang
    @TomWang41841655_twitter
    Hi there. Does anyone know if slick-pg 0.16.3 supports Postgres 9.6? I see in the README that slick-pg 0.16.3 is tested on Postgres 10.
    And is there any additional testing on Postgres 10 beyond the test suite? I had run the test suite on Postgres 9.6 and got the test suite to pass, but not sure if that is sufficient to be confident of using slick 0.16.3 with Postgres 9.6 in production.
    Gavin Bisesi
    @Daenyth
    we use it in prod with 9.6
    no problems so far
    Tom Wang
    @TomWang41841655_twitter
    Thanks!
    So when the README says slick-pg is tested with Postgres 10, is that saying support for other Postgres versions are excluded? Or is that simply saying that’s the Postgres version on which the tests are continually being run against? I saw that TravisCI is set up to run the test suite against Postgres 10.
    Gavin Bisesi
    @Daenyth
    it's saying that slick-pg is tested against pg 10
    10 is guaranteed, otherwise is not
    I mean, to the extent a 1-developer library is guaranteed about anything
    Tom Wang
    @TomWang41841655_twitter
    :D
    Thanks!
    František Kocun
    @fokot
    @TomWang41841655_twitter we aslo use slick pg with 9.6 - array support, window functions (partition by), json support, date support and all works
    nafg
    @nafg
    What's new in 10 that's relevant?
    Andrzej Sołtysik
    @asoltysik
    Hi, does anyone know how to use aggregate functions like mode with a groupedBy query?
    mode().within expects ColumnOrdered but I have a Seq from the groupBy
    Andrzej Sołtysik
    @asoltysik

    In short I want to translate a sql like this:

    SELECT a.id, mode() WITHIN GROUP (ORDER BY b.id) 
    FROM a INNER JOIN b on a.id = b.a_id
    GROUP BY a.id

    into Slick

    Tom Wang
    @TomWang41841655_twitter
    @nafg I do not think there's anything in pg 10 that is relevant for slick-pg. It's just that slick-pg is tested with pg 10.
    nafg
    @nafg
    But what's your concern
    Tom Wang
    @TomWang41841655_twitter
    My original concern was that the newest slick-pg would not work with pg 9.6. I think that concern has been addressed.
    Łukasz Dycjan
    @dycu
    Hi, do you know if there is a way of using date support while having value classes as column types rather than pure date types (case class extending AnyVal)?
    Tor Holm
    @holm.tor_gitlab
    Hi, is it possible to have an array of jsonb elements?
    I use play-json for serde
    nafg
    @nafg
    @holm.tor_gitlab did you have any particular trouble?
    Hmm I see, it seems array support is hardcoded for specific element types, although it looks easy to add more
    nafg
    @nafg
    But why would you use array when you can you json array?
    nafg
    @nafg
    @holm.tor_gitlab here is what I did:
      implicit val componentKindsMapping: SlickDriver.SimpleArrayJdbcType[ComponentKind] =
        new SimpleArrayJdbcType[String]("text").mapTo[ComponentKind](ComponentKind(_), _.name)
    Pyry-Samuli Lahti
    @Pyppe

    Howdy! I'm trying to write a join based on array using slick-pg:

    SELECT * FROM foos f JOIN bars b ON b.identifiers @> array[f.identifier]::text[]

    But I cannot find a way to do that array[f.identifier]::text[] part in Slick. Any tips?

    So in the example above, column bars.identifiers is of type text[], and column foos.identifier is type varchar(254).
    Gavin Bisesi
    @Daenyth
    you could always use sql if you don't need to compose Query objects
    Pyry-Samuli Lahti
    @Pyppe
    Yeah, that would be my fallback. But in my use-case I’m joining many tables. Would like to use type-safe approach, if at all possible.
    Francesco Levorato
    @flevour
    Hi everyone!
    I'm trying to upgrade my project to slick 3.3.0, so I set slick-pg to 0.17.2 but unfortunately in slick-pg 0.17.1 a few deps including json4s were upgraded to latest version. Alas json4s 3.6.x versions have a longstanding bug for case classes with type constructors (json4s/json4s#507). My project also dependes on json4s and thus breaks when upgrading. Is there anyway this dependency hell can be circumvented?
    Gavin Bisesi
    @Daenyth
    @flevour if slick-pg is using only things that are binary compatible with the old one, it should work to add an exclude to your build.sbt
    but also you might not need to bump slick-pg
    Francesco Levorato
    @flevour
    @Daenyth even if a bit late, I want to send you a wholehearted thanks for pointing towards SBT's exclude directive! That's what I needed to get this sorted out. Thanks a lot!
    Gavin Bisesi
    @Daenyth
    np
    ochmist
    @ochmist
    hey guys, is there any good documentation on how to get started with slick-pg?
    If i use the sample on the readme i get a lot of not defined types
    ochmist
    @ochmist

    `import com.github.tminglei.slickpg._

    trait MyPostgresDriver
    extends ExPostgresProfile
    with PgArraySupport
    with PgDateSupportJoda
    with PgEnumSupport
    with PgRangeSupport
    with PgHStoreSupport
    with PgSearchSupport
    with PgPostGISSupport {

    override val api = new MyAPI {}

    trait MyAPI
    extends API
    with ArrayImplicits
    with DateTimeImplicits
    with RangeImplicits
    with HStoreImplicits
    with SearchImplicits
    with PostGISImplicits
    with SearchAssistants
    }

    object MyPostgresDriver extends MyPostgresDriver`

    Bascially none of the PG types here are found.

    Gavin Bisesi
    @Daenyth
    Did you import MyPostgresDriver.api._ ?
    ochmist
    @ochmist
    No i did not ... but the api is defined in this file itself no?
    Gavin Bisesi
    @Daenyth
    sure, but your db tables etc won't be
    queries, etc