-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from rickowens/pr
Basic select statements
- Loading branch information
Showing
10 changed files
with
649 additions
and
173 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
on: [push] | ||
name: Haskell Builds | ||
jobs: | ||
build: | ||
name: Haskell Build | ||
runs-on: ubuntu-latest # or macOS-latest, or windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ghc-version: | ||
- '9.8' | ||
cabal-version: ['3.10.2.0'] | ||
steps: | ||
# Checkout | ||
- uses: actions/checkout@v3 | ||
|
||
# Setup | ||
- name: Setup Haskell | ||
uses: haskell-actions/setup@v2 | ||
id: setup | ||
if: steps.tooling-cache.outputs.cache-hit != 'true' | ||
with: | ||
ghc-version: ${{ matrix.ghc-version }} | ||
cabal-version: ${{ matrix.cabal-version }} | ||
|
||
# Generate Plan | ||
- name: Configure the Build | ||
run: | | ||
rm cabal.project.freeze | ||
cabal configure | ||
cabal build --dry-run | ||
# Restore cache | ||
- name: Restore cached dependencies | ||
uses: actions/cache/restore@v3 | ||
id: cache | ||
env: | ||
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }} | ||
with: | ||
path: ${{ steps.setup.outputs.cabal-store }} | ||
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} | ||
|
||
# Build deps (for caching) | ||
- name: Cabal build dependencies | ||
run: cabal build all --only-dependencies | ||
|
||
# Save dependency cache | ||
- name: Save cache | ||
uses: actions/cache/save@v3 | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ${{ steps.setup.outputs.cabal-store }} | ||
key: ${{ steps.cache.outputs.cache-primary-key }} | ||
|
||
# Cabal build | ||
- name: Cabal Bulid | ||
run: | | ||
project="$(cat cabal.project | grep -v -- '-Werror')" | ||
echo "$project" > cabal.project | ||
cabal build all | ||
# build-lower-bounds: | ||
# name: Haskell Build (lower bounds) | ||
# runs-on: ubuntu-latest # or macOS-latest, or windows-latest | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# ghc-version: ['9.8.1'] | ||
# cabal-version: ['3.10.2.0'] | ||
# steps: | ||
# # Checkout | ||
# - uses: actions/checkout@v3 | ||
# | ||
# # Setup | ||
# - name: Setup Haskell | ||
# uses: haskell-actions/setup@v2 | ||
# id: setup | ||
# if: steps.tooling-cache.outputs.cache-hit != 'true' | ||
# with: | ||
# ghc-version: ${{ matrix.ghc-version }} | ||
# cabal-version: ${{ matrix.cabal-version }} | ||
|
||
# # Generate Plan | ||
# - name: Configure the Build | ||
# run: | | ||
# (cat << EOF | ||
# packages: . | ||
# constraints: | ||
# base == 4.19.0.0, | ||
# generics-sop == 0.5.1.4, | ||
# hspec == 2.11.7, | ||
# simple-sql-parser == 0.6.0, | ||
# squeal-postgresql == 0.9.1.3, | ||
# template-haskell == 2.21.0.0, | ||
# text == 2.1, | ||
# uuid == 1.3.15 | ||
# EOF | ||
# ) > cabal.project | ||
# rm cabal.project.freeze | ||
# cabal configure | ||
# cabal build --dry-run | ||
|
||
# # Restore cache | ||
# - name: Restore cached dependencies | ||
# uses: actions/cache/restore@v3 | ||
# id: cache | ||
# env: | ||
# key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }} | ||
# with: | ||
# path: ${{ steps.setup.outputs.cabal-store }} | ||
# key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} | ||
|
||
# # Build deps (for caching) | ||
# - name: Cabal build dependencies | ||
# run: cabal build all --only-dependencies | ||
|
||
# # Save dependency cache | ||
# - name: Save cache | ||
# uses: actions/cache/save@v3 | ||
# if: steps.cache.outputs.cache-hit != 'true' | ||
# with: | ||
# path: ${{ steps.setup.outputs.cabal-store }} | ||
# key: ${{ steps.cache.outputs.cache-primary-key }} | ||
|
||
# # Cabal build | ||
# - name: Cabal Bulid | ||
# run: cabal build all | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/.stack-work | ||
/dist-newstyle | ||
/cabal.project.local | ||
/.tags.lock | ||
/tags |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
# squeal-postgresql-qq | ||
|
||
Write me. | ||
This library provides a Template Haskell quasiquoter | ||
parsing SQL as the quoted language and producing corresponding | ||
[`squeal-postgresql`](https://hackage.haskell.org/package/squeal-postgresql) | ||
expressing. The goal is to provide an easier way to use the | ||
[`squeal-postgresql`](https://hackage.haskell.org/package/squeal-postgresql) | ||
library, by eliminating (or at least reducing) the need for the user to | ||
learn the squeal "DSL" and allowing her to write regular SQL instead. | ||
|
||
## Development Notes: | ||
|
||
Some random notes: | ||
|
||
* The status of this library is "very experimental". | ||
|
||
* I'm developing against ghc-9.8 currently, so the lower bounds of the | ||
dependencies reflects that fact. There is no reason why the lower bounds | ||
can't be relaxed at least back to ghc-9.0.2, but I'm not going to worry that | ||
until I get a little farther along with this library. | ||
|
||
* It is highly unlikely that I'll ever have time to really get 100% complete | ||
coverage of all possible SQL statements, but I plan to cover at least the | ||
basics before the first release. However! the plan is to be a little bit lazy | ||
about it. It isn't particularly difficult to add new supported statement | ||
structures. If there is something missing you would like to see just add a | ||
[test](test/test.hs) with the SQL you would like to see work and I'll do my | ||
best to make it pass. |
This file contains 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
This file contains 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
Oops, something went wrong.