/website_source/index.txt
http://github.com/JakeWheat/hssqlppp · Plain Text · 116 lines · 79 code · 37 blank · 0 comment · 0 complexity · 56bb38b2f5bcfff7c555958df8111817 MD5 · raw file
- A parser, pretty printer, and type checker for SQL written in
- Haskell. Supports PostgreSQL SQL and PL/pgSQL syntax. BSD licensed.
- Purpose
- =======
- Possible uses of this library include:
- * type-checker can help with SQL development and catch bugs which
- aren't statically detected by Postgres
- * generating SQL code programmatically/ generating SQL from some other
- source
- * transforming SQL code, possibly using quasiquoting, e.g. writing
- PL/pgSQL with less boilerplate, or optimisation rewrites
- * viewing the catalog produced by some SQL code
- With some extra work:
- * generating documentation for SQL code
- * support running one dialect of SQL on a different DBMS using
- automatic translation - portable SQL
- * typesafe database access from Haskell
- * lint or semantic analysis for SQL or PL/pgSQL
- Status
- ======
- Pre-alpha. Support for parsing SQL is patchy, but not too
- bad. Supports queries/DML and DDL. Here is an extract from the parsing
- tests which gives some examples of what can currently be parsed:
- * [Parsing examples](ParserTests.html)
- The type checker is currently still being fixed after some reworking
- of parsing and ast types. It should handle a lot of queries and dml
- fine though.
- Extract from the type checking tests:
- * [Type-checking examples](TypeCheckTests.html)
- Currently limited support for quasiquoting, here are the extracts from
- the tests:
- * [Quasiquotation examples](QuasiQuoteTests.html)
- The pretty printer should support everything the parser supports
- (i.e. it pretty prints code which both the parser and Postgres
- understand).
- Catalog information is limited, supports the type checking. Some
- information is collected on scalar types, domains, composite types,
- casts, tables, views and functions.
- Installation
- ============
- This project is currently developed on GHC 7.2.1. 7.0.x should be
- fine, 6.12.x might take a small amount of work.
- To install use
- ~~~~~{.sh}
- cabal install hssqlppp
- ~~~~~
- Documentation
- =============
- [Haddock docs](haddock/index.html)
- [Examples](examples.txt.html)
- [Some notes on hacking on hssqlppp itself](devel.txt.html)
- Links
- =====
- Homepage: <http://jakewheat.github.com/hssqlppp/>
- Hackage: <http://hackage.haskell.org/package/hssqlppp>
- Repository: <https://github.com/JakeWheat/hssqlppp>
- Changes: <https://github.com/JakeWheat/hssqlppp/blob/master/CHANGES>
- Reporting issues and feature requests
- =====================================
- Use the github issue tracker. Please supply an example of SQL which
- doesn't parse/typecheck correctly where relevant.
- <https://github.com/JakeWheat/hssqlppp/issues>
- Provisional future plans
- ========================
- * parameterized statements/typesafe haskell access
- * some simple syntax extension support for SQL
- * a 'compiler' command to help developing SQL
- * parse most Postgres syntax, possibly other SQL dialects as well
- * improve the typechecker - fix current regressions, get more sql type
- checking correctly
- * improve the catalog - add more checking, more item types
- * improve the quasi-quoting - is a bit ad hoc and limited at the moment
- * documentation generator for SQL codebases
- Contact
- =======
- Let me know if you're using/ interested in using the library, if you
- have any problems, bug reports, or suggestions, etc.. All
- contributions, comments and criticism welcome:
- jakewheatmail@gmail.com