Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend ToRow and FromRow to tuples of size 18 #229

Merged
merged 2 commits into from Nov 9, 2017

Conversation

Projects
None yet
2 participants
@BardurArantsson
Copy link
Contributor

commented Nov 8, 2017

(I've taken the liberty of including the GHC 7.6.x commit in this just to avoid the spurious Travis CI error. Feel free to drop that commit if you want to.)

I realize that tuples of this size aren't exactly ideal, but I'm actually hitting the rather low limit in UPSERT-style scenarios where the number of query parameters are usually about double that of normal queries. I'd rather not have to write newtypes for single queries :).

Remove Travis CI for GHC 7.6.x
The latest GHC 7.6.x was in Apr 2013 and it seems that trying to build
with it on Travis fails because one or more of the dependencies fail
to compile.
@lpsmith

This comment has been minimized.

Copy link
Owner

commented Nov 8, 2017

Not opposed, though you can use :. or the generic instances in your own records/newtypes. Also, 18 is a slightly odd limit, maybe 20?

@BardurArantsson

This comment has been minimized.

Copy link
Contributor Author

commented Nov 8, 2017

Sure, we can do 20 :). I actually just chose 18 just for the aesthetics of the last entry :).

I'll do a follow-up with 20 in a bit.

(Hadn't noticed the :. thing, perhaps I should actually be using that...)

@lpsmith

This comment has been minimized.

Copy link
Owner

commented Nov 8, 2017

Well, if you like the aesthetics, maybe we could go to 24 or 30, which are very round numbers (IMO). But maybe we would be getting carried away at that point?

@BardurArantsson

This comment has been minimized.

Copy link
Contributor Author

commented Nov 8, 2017

20 it is :).

@BardurArantsson BardurArantsson force-pushed the BardurArantsson:bigger-tuples branch from b2d657d to 0ce5ba4 Nov 8, 2017

@BardurArantsson

This comment has been minimized.

Copy link
Contributor Author

commented Nov 8, 2017

Branch updated, incidentally also discovered that I'd missed an 'intermediat-sized' instance of FromRow.

instance (FromField a, FromField b, FromField c, FromField d, FromField e,
FromField f, FromField g, FromField h, FromField i, FromField j,
FromField k, FromField l, FromField m, FromField n, FromField o,
FromField p, FromField q, FromField q, FromField r, FromField s,

This comment has been minimized.

Copy link
@lpsmith

lpsmith Nov 9, 2017

Owner

FromField q, FromField q? Should be harmless, but superfluous.

instance (FromField a, FromField b, FromField c, FromField d, FromField e,
FromField f, FromField g, FromField h, FromField i, FromField j,
FromField k, FromField l, FromField m, FromField n, FromField o,
FromField p, FromField q, FromField q, FromField r, FromField s) =>

This comment has been minimized.

Copy link
@lpsmith

lpsmith Nov 9, 2017

Owner

And here as well (see comment for line 423)

This comment has been minimized.

Copy link
@BardurArantsson

BardurArantsson Nov 9, 2017

Author Contributor

Nice catch! It's pretty hellish to do this manually. Will fix later today and update the PR :).

@BardurArantsson BardurArantsson force-pushed the BardurArantsson:bigger-tuples branch from 0ce5ba4 to bd8a12b Nov 9, 2017

@BardurArantsson

This comment has been minimized.

Copy link
Contributor Author

commented Nov 9, 2017

Should be fixed now, thanks :).

@lpsmith lpsmith merged commit e266489 into lpsmith:master Nov 9, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.