packages feed

yeshql 3.0.0.0 → 3.0.0.1

raw patch · 2 files changed

+60/−2 lines, 2 files

Files

+ README.md view
@@ -0,0 +1,58 @@+# YeshQL++[YesQL](https://github.com/krisajenkins/yesql)-style SQL database abstraction.++YeshQL implements quasiquoters that allow the programmer to write SQL queries+in SQL, and embed these into Haskell programs using quasi-quotation. YeshQL+takes care of generating suitable functions that will run the SQL queries+against a HDBC database driver, and marshal values between Haskell and SQL.++In order to do this properly, YeshQL extends SQL syntax with type annotations+and function names; other than that, it is perfectly ignorant about the SQL+syntax itself. See the [YesQL+Readme](https://github.com/krisajenkins/yesql/blob/master/README.md) for the+full rationale - Haskell and Clojure are sufficiently different languages, but+the reasoning behind YesQL applies to YeshQL almost unchanged.++## Installation++Use [stack](http://haskellstack.org/) or [cabal](http://haskell.org/cabal/) to+install. Nothing extraordinary here.++## Usage++In short:++    {-#LANGUAGE QuasiQuotes #-}+    import MyProject.DatabaseConnection (withDB)+    import Database.HDBC+    import Database.YeshQL++    [yesh|+      -- name:getUser :: (String)+      -- :userID :: Int+      SELECT username FROM users WHERE id = :userID+    |] ++    main = withDB $ \conn -> do+      username <- getUser 1 conn+      putStrLn username++Please refer to the Haddock documentation for further usage details.++## Bugs++Probably. The project is hosted at https://bitbucket.org/tdammers/yeshql, feel+free to comment there or send a message to tdammers@gmail.com if you find any.++## Something about the name++YeshQL is rather heavily inspired by YesQL, so it makes sense to blatantly+steal most of the name. Throwing in an "H" for good measure (this being Haskell+and all) makes it sound like Sean Connery, which automatically increases+aweshomenesh, so that'sh what we'll roll with.++## License / Copying++YeshQL is Free Software and provided as-is. Please see the enclosed LICENSE+file for details.
yeshql.cabal view
@@ -1,5 +1,5 @@ name: yeshql-version: 3.0.0.0+version: 3.0.0.1 synopsis: YesQL-style SQL database abstraction description: Use quasi-quotations or TemplateHaskell to write SQL in SQL, while              adding type annotations to turn SQL into well-typed Haskell@@ -11,7 +11,7 @@ copyright: 2015-2016 Tobias Dammers category: Database build-type: Simple--- extra-source-files:+extra-source-files: README.md cabal-version: >=1.10  library