Created
September 1, 2015 06:15
-
-
Save benkolera/ce98341861791d1399de to your computer and use it in GitHub Desktop.
Easily extended if something isn't there. Also see https://raw.githubusercontent.com/benkolera/haskell-opaleye-pgcrypto/master/src/Opaleye/PgCrypto.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PGHasTimestamp a where | |
| instance PGHasTimestamp PGDate | |
| instance PGHasTimestamp PGTimestamp | |
| instance PGHasTimestamp PGTimestamptz | |
| class PGHasDate a where | |
| instance PGHasDate PGDate | |
| instance PGHasDate PGTimestamp | |
| instance PGHasDate PGTimestamptz | |
| now :: PGHasTimestamp a => Column a | |
| now = C.Column (HPQ.FunExpr "now" []) | |
| date :: PGHasDate a => Column a -> Column PGDate | |
| date a = C.Column (HPQ.FunExpr "date" [C.unColumn a]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment