mirror of
https://github.com/ilyakooo0/squeal.git
synced 2024-09-11 13:57:29 +03:00
squeel ~> squeal
This commit is contained in:
parent
a2a55becd0
commit
5b7868580e
@ -1,7 +1,7 @@
|
||||
# squeel
|
||||
# squeal
|
||||
|
||||
![squeel-icon](http://www.emoticonswallpapers.com/emotion/cute-big-pig/cute-pig-smiley-046.gif)
|
||||
![squeal-icon](http://www.emoticonswallpapers.com/emotion/cute-big-pig/cute-pig-smiley-046.gif)
|
||||
|
||||
[![CircleCI](https://circleci.com/gh/echatav/squeel.svg?style=svg&circle-token=a699a654ef50db2c3744fb039cf2087c484d1226)](https://circleci.com/gh/echatav/squeel)
|
||||
[![CircleCI](https://circleci.com/gh/echatav/squeal.svg?style=svg&circle-token=a699a654ef50db2c3744fb039cf2087c484d1226)](https://circleci.com/gh/echatav/squeal)
|
||||
|
||||
Main repository for the squeel database library.
|
||||
Main repository for the squeal database library.
|
||||
|
@ -18,7 +18,7 @@ import Data.Function ((&))
|
||||
import Data.Int
|
||||
import Data.Monoid
|
||||
import Generics.SOP hiding (from)
|
||||
import Squeel.PostgreSQL
|
||||
import Squeal.PostgreSQL
|
||||
|
||||
import qualified Data.ByteString.Char8 as Char8
|
||||
import qualified GHC.Generics as GHC
|
||||
@ -38,7 +38,7 @@ instance HasDatatypeInfo Table1Row
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
Char8.putStrLn "squeel"
|
||||
Char8.putStrLn "squeal"
|
||||
connectionString <- pure
|
||||
"host=localhost port=5432 dbname=exampledb"
|
||||
Char8.putStrLn $ "connecting to " <> connectionString
|
@ -1,8 +1,8 @@
|
||||
name: squeel-postgresql
|
||||
name: squeal-postgresql
|
||||
version: 0.0.0.1
|
||||
synopsis: Squeel PostgreSQL Library
|
||||
description: Squeel is a type-safe embedding of PostgreSQL and libpq in Haskell
|
||||
homepage: https://github.com/echatav/squeel
|
||||
synopsis: Squeal PostgreSQL Library
|
||||
description: Squeal is a type-safe embedding of PostgreSQL and libpq in Haskell
|
||||
homepage: https://github.com/echatav/squeal
|
||||
author: Eitan Chatav
|
||||
maintainer: eitan.chatav@gmail.com
|
||||
copyright: 2017 Morphism, LLC
|
||||
@ -13,11 +13,11 @@ cabal-version: >=1.10
|
||||
library
|
||||
hs-source-dirs: src
|
||||
exposed-modules:
|
||||
Squeel.PostgreSQL
|
||||
Squeel.PostgreSQL.Binary
|
||||
Squeel.PostgreSQL.PQ
|
||||
Squeel.PostgreSQL.Statement
|
||||
Squeel.PostgreSQL.Schema
|
||||
Squeal.PostgreSQL
|
||||
Squeal.PostgreSQL.Binary
|
||||
Squeal.PostgreSQL.PQ
|
||||
Squeal.PostgreSQL.Statement
|
||||
Squeal.PostgreSQL.Schema
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -Werror -fprint-explicit-kinds
|
||||
build-depends:
|
||||
@ -38,21 +38,21 @@ library
|
||||
, transformers-base
|
||||
, uuid
|
||||
|
||||
test-suite squeel-postgresql-test
|
||||
test-suite squeal-postgresql-test
|
||||
default-language: Haskell2010
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: test
|
||||
ghc-options: -Wall -Werror
|
||||
main-is: Spec.hs
|
||||
other-modules:
|
||||
Squeel.PostgreSQL.StatementSpec
|
||||
Squeal.PostgreSQL.StatementSpec
|
||||
build-depends:
|
||||
base
|
||||
, generics-sop
|
||||
, hspec
|
||||
, squeel-postgresql
|
||||
, squeal-postgresql
|
||||
|
||||
executable squeel-postgresql-example
|
||||
executable squeal-postgresql-example
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: exe
|
||||
ghc-options: -Wall -Werror
|
||||
@ -62,10 +62,10 @@ executable squeel-postgresql-example
|
||||
, bytestring
|
||||
, generics-sop
|
||||
, mtl
|
||||
, squeel-postgresql
|
||||
, squeal-postgresql
|
||||
, transformers
|
||||
, transformers-base
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/echatav/squeel
|
||||
location: https://github.com/echatav/squeal
|
11
squeal-postgresql/src/Squeal/PostgreSQL.hs
Normal file
11
squeal-postgresql/src/Squeal/PostgreSQL.hs
Normal file
@ -0,0 +1,11 @@
|
||||
module Squeal.PostgreSQL
|
||||
( module Squeal.PostgreSQL.Binary
|
||||
, module Squeal.PostgreSQL.PQ
|
||||
, module Squeal.PostgreSQL.Schema
|
||||
, module Squeal.PostgreSQL.Statement
|
||||
) where
|
||||
|
||||
import Squeal.PostgreSQL.Binary
|
||||
import Squeal.PostgreSQL.PQ
|
||||
import Squeal.PostgreSQL.Schema
|
||||
import Squeal.PostgreSQL.Statement
|
@ -18,7 +18,7 @@
|
||||
, UndecidableInstances
|
||||
#-}
|
||||
|
||||
module Squeel.PostgreSQL.Binary where
|
||||
module Squeal.PostgreSQL.Binary where
|
||||
|
||||
import Data.Aeson hiding (Null)
|
||||
import Data.Bits
|
||||
@ -39,7 +39,7 @@ import qualified GHC.Generics as GHC
|
||||
import qualified PostgreSQL.Binary.Decoding as Decoding
|
||||
import qualified PostgreSQL.Binary.Encoding as Encoding
|
||||
|
||||
import Squeel.PostgreSQL.Schema
|
||||
import Squeal.PostgreSQL.Schema
|
||||
|
||||
class ToParam x (pg :: PGType) where toParam :: x -> K Encoding.Encoding pg
|
||||
instance ToParam Bool 'PGbool where toParam = K . Encoding.bool
|
@ -17,7 +17,7 @@
|
||||
, UndecidableInstances
|
||||
#-}
|
||||
|
||||
module Squeel.PostgreSQL.PQ where
|
||||
module Squeal.PostgreSQL.PQ where
|
||||
|
||||
import Control.Exception.Lifted
|
||||
import Control.Monad.Base
|
||||
@ -31,9 +31,9 @@ import GHC.TypeLits
|
||||
|
||||
import qualified Database.PostgreSQL.LibPQ as LibPQ
|
||||
|
||||
import Squeel.PostgreSQL.Binary
|
||||
import Squeel.PostgreSQL.Statement
|
||||
import Squeel.PostgreSQL.Schema
|
||||
import Squeal.PostgreSQL.Binary
|
||||
import Squeal.PostgreSQL.Statement
|
||||
import Squeal.PostgreSQL.Schema
|
||||
|
||||
newtype Connection (schema :: [(Symbol,[(Symbol,ColumnType)])]) =
|
||||
Connection { unConnection :: LibPQ.Connection }
|
@ -13,7 +13,7 @@
|
||||
, TypeOperators
|
||||
#-}
|
||||
|
||||
module Squeel.PostgreSQL.Schema
|
||||
module Squeal.PostgreSQL.Schema
|
||||
( PGType (..)
|
||||
, PGNum (..)
|
||||
, PGIntegral
|
@ -17,7 +17,7 @@
|
||||
, UndecidableInstances
|
||||
#-}
|
||||
|
||||
module Squeel.PostgreSQL.Statement where
|
||||
module Squeal.PostgreSQL.Statement where
|
||||
|
||||
import Control.Category
|
||||
import Data.ByteString (ByteString)
|
||||
@ -35,7 +35,7 @@ import Prelude hiding (RealFrac(..), id, (.))
|
||||
|
||||
import qualified Data.ByteString as ByteString
|
||||
|
||||
import Squeel.PostgreSQL.Schema
|
||||
import Squeal.PostgreSQL.Schema
|
||||
|
||||
{-----------------------------------------
|
||||
column expressions
|
@ -7,15 +7,15 @@
|
||||
, TypeOperators
|
||||
#-}
|
||||
|
||||
module Squeel.PostgreSQL.StatementSpec where
|
||||
module Squeal.PostgreSQL.StatementSpec where
|
||||
|
||||
import Control.Category ((>>>))
|
||||
import Data.Function
|
||||
import Generics.SOP hiding (from)
|
||||
import Test.Hspec
|
||||
|
||||
import Squeel.PostgreSQL.Statement
|
||||
import Squeel.PostgreSQL.Schema
|
||||
import Squeal.PostgreSQL.Statement
|
||||
import Squeal.PostgreSQL.Schema
|
||||
|
||||
spec :: Spec
|
||||
spec = do
|
@ -1,11 +0,0 @@
|
||||
module Squeel.PostgreSQL
|
||||
( module Squeel.PostgreSQL.Binary
|
||||
, module Squeel.PostgreSQL.PQ
|
||||
, module Squeel.PostgreSQL.Schema
|
||||
, module Squeel.PostgreSQL.Statement
|
||||
) where
|
||||
|
||||
import Squeel.PostgreSQL.Binary
|
||||
import Squeel.PostgreSQL.PQ
|
||||
import Squeel.PostgreSQL.Schema
|
||||
import Squeel.PostgreSQL.Statement
|
@ -1,3 +1,3 @@
|
||||
resolver: nightly-2017-06-26
|
||||
packages:
|
||||
- squeel-postgresql
|
||||
- squeal-postgresql
|
||||
|
Loading…
Reference in New Issue
Block a user