Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    nafg
    @nafg
    @SethTisue do you have any interest?
    Seth Tisue
    @SethTisue
    @nafg sure — write me at seth dot tisue at lightbend dot com and we can set it up. I'm not exactly sure what you have in mind or if I can help, but talking never hurts :-) I'm in Nevada/California time zone and free most weekday mornings
    James Phillips
    @jdrphillips
    I'd like to write my own DatabaseAction that does a special thing. But it doesn't seem it's possible as Database.run won't anticipate it. Is that correct?
    Richard Dallaway
    @d6y
    Yeah, that looks right @jdrphillips -- DBIOAction is a sealed trait. What do you want to achieve? There's likely another way we can try to think up!
    James Phillips
    @jdrphillips
    DBIOAction is sealed but DatabaseAction is not, so I hoped it may have been possible to sneak something in

    What do you want to achieve?

    I wanted to implement something like "clean up" actions. Attach an effect to your DBIO, and carry it around with you across all the flatmaps/andthens etc, and then when it is eventually run tack the effects on to the future as a side-effect.

    Imagine something like a huge dbio transaction that at some point changes a user's subscription settings. At that point in the DBIO, I know I have to send an email to the user. It would be handy to at that point attach it (the send-email effect) to the DBIO and have it dealt with alongside the transaction execution automatically (if the transaction succeeds)

    It's probably something to do properly on top of slick, I know that - but everything is already a DBIO in our code and I wanted an easy way to slip it in, that's all :)
    James Phillips
    @jdrphillips
    (I could of course turn the email-effect into a future and then into a DBIO and have it sit in the middle of the DB transaction but I don't want to do that)
    Richard Dallaway
    @d6y
    I wonder if cleanUp or andFinally on an action are a place you could do some of that.
    James Phillips
    @jdrphillips
    andFinally seems to inject things into the middle of the DBIO structure, rather than keeping them at the end. From my understanding anyway. So if we ended up rolling the transaction back the email would be sent in error
    I admit I didn't look too closely at cleanup as it seemed to be about errors but I'll have a closer look
    Richard Dallaway
    @d6y
    James Phillips
    @jdrphillips
    thanks
    Seth Tisue
    @SethTisue
    hey, all: PR reviewers wanted; I've added the "needs review" label to a number of PRs at https://github.com/slick/slick/pulls
    if you'd looked before but PRs were waiting for rebasing or waiting for CI to run, I think that's all shaken out now, or nearly so
    Seth Tisue
    @SethTisue
    tweet seeking PR reviewers; retweets appreciated https://twitter.com/SethTisue/status/1376599766751084547
    Aleksey Izmailov
    @izmailoff
    Hi there! I hope that’s a good place to ask. What is the status of Slick migration/support of Scala 3/Dotty? I’ve tried to use latest Slick compiled for 2.13 with Scala 3, but getting some errors even after fixing obvious things. I understand implicits and macros would have to take care of. Thanks.
    Rohan Sircar
    @rohan-sircar
    @izmailoff there's a PR in progress for it slick/slick#2187
    Aleksey Izmailov
    @izmailoff
    Thanks @rohan-sircar that's nice to see!
    Rohan Sircar
    @rohan-sircar
    I'm hopeful to see scala3 support for slick myself :)
    Seth Tisue
    @SethTisue
    any assistance you can offer on the PR would be welcome
    Aleksey Izmailov
    @izmailoff
    @SethTisue I'll see if I can contribute in any meaningful way
    Seth Tisue
    @SethTisue
    @izmailoff :+1:
    Rohan Sircar
    @rohan-sircar
    take my energy ༼ つ ◕_◕ ༽つ
    Tim Nielens
    @tnielens
    Hello,
    I bumped into an issue with the combination of slick's distinctOn(_.id) and mysql bit(1) data type for a Boolean scala field.
    The distinct slick clause seems to produce a sql query where all queried fields are aggregated with min(...) like this example select min(field1), min(field2), min(myBit1Field) from ... group by id. Unfortunately, that aggregation doesn't play well with mysql's bit(1) which in my case ends up being truein my scala object when the record field in DB is 0x00 (false).
    Is this a known issue?
    Tim Nielens
    @tnielens
    I'm using slick 3.3.3
    nafg
    @nafg
    @SethTisue builds are failing after a long time due to Docker Hub rate limiting. See e.g. https://travis-ci.com/github/slick/slick/jobs/498593710
    nafg
    @nafg
    also it seems like travis only does one build at a time on the repo
    Seth Tisue
    @SethTisue
    @nafg hmm... I know nothing about Docker. can you open a ticket about it? then I'll try to find somebody at Lightbend who has experience with the Travis-CI+Docker combo. maybe there's a Lightbend account we can use. (plus also maybe somebody watching the repo will know something.)

    also it seems like travis only does one build at a time on the repo

    we can live with that, I think...? especially now that my recent branch protection change cut the number of builds per PR from 2 back down to 1

    nafg
    @nafg
    I don't think it did that, I think it just made PRs not be unmergeable
    I think that setting controls mergeability rules, not what builds get triggered when
    Seth Tisue
    @SethTisue
    2 before, 1 after is what I observed
    before I set up the branch protection rules at all, there was only 1, so it only restored the previous status quo
    nafg
    @nafg
    Ok I'm confused. Which builds became triggered or not triggered and why?
    Seth Tisue
    @SethTisue
    Travis-CI lets you build the head commit of the PR, or the result of merging that head commit with the head of the target branch, or both
    for a brief time we were doing both, but not anymore. now we're back to just building the head commit of the PR
    nafg
    @nafg
    but what caused it not to build the merged version?
    Seth Tisue
    @SethTisue
    I unchecked the "branch" checkboxes in the branch protection config, see https://github.com/slick/slick/pull/2210#issuecomment-819837259
    there wasn't really any reason I had checked them to begin with
    nafg
    @nafg
    I know
    Seth Tisue
    @SethTisue
    it surprises me as well that the branch protection rules control the behavior of Travis-CI
    nafg
    @nafg
    But that shouldn't affect which builds are run, only which statuses are required to merge
    When it was checked it wasn't running
    Seth Tisue
    @SethTisue
    ohhhhh
    nafg
    @nafg
    That's why I asked you to uncheck it, because then PRs would be impossible to merge
    Seth Tisue
    @SethTisue
    ah, I see. okay, that sounds right. sorry for my confusion
    nafg
    @nafg
    np
    mjabari
    @mjabari
    I have an id colum with O.AutoInc on it to ignore the value and use the default which is specified in database but unfortunately insertOrUpdate doesn't respect O.AutoInc and I get following error when the id is None
    PSQLException: ERROR: null value in column "id" violates not-null constraint