From 4fd8c42515a874a8168d5ec0cd2a8284af5439ed Mon Sep 17 00:00:00 2001 From: rightfold Date: Sat, 3 Jun 2017 14:00:23 +0200 Subject: [PATCH] Update readme --- README.md | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/README.md b/README.md index b6e6d6e..c863a6c 100644 --- a/README.md +++ b/README.md @@ -3,42 +3,3 @@ purescript-postgresql-client is a PostgreSQL client library for PureScript. To use this library, you need to add `pg` as an npm dependency. - -Included is an optional preprocessor, purspgpp, which finds embedded SQL -queries in PureScript source files and infers their types. Such queries can be -written as follows: - -```purescript -userName = [query| - SELECT first_name, last_name - FROM users - WHERE id = $1 -|] -``` - -purspgpp will replace this by something like the following: - -```purescript -(Query """ - SELECT first_name, last_name - FROM users - WHERE id = $1 -""" :: Query (Tuple UUID Unit) (Tuple String (Tuple String Unit)) -``` - -You can integrate purspgpp into your build system. For example, here is a -PowerShell script that executes it for all `.purspg` files: - -```powershell -Get-ChildItem src -Recurse -Filter *.purspg ` -| ForEach-Object { - perl6 ` - bower_components/purescript-postgresql-client/purspgpp ` - "user=postgres password=lol123 dbname=nn" ` - "$($_.FullName)" ` - "$([IO.Path]::ChangeExtension($_.FullName, "purs"))" - if (!$?) { - Write-Error "Unable to preprocess $_" - } -} -```