/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

  1. A parser, pretty printer, and type checker for SQL written in
  2. Haskell. Supports PostgreSQL SQL and PL/pgSQL syntax. BSD licensed.
  3. Purpose
  4. =======
  5. Possible uses of this library include:
  6. * type-checker can help with SQL development and catch bugs which
  7. aren't statically detected by Postgres
  8. * generating SQL code programmatically/ generating SQL from some other
  9. source
  10. * transforming SQL code, possibly using quasiquoting, e.g. writing
  11. PL/pgSQL with less boilerplate, or optimisation rewrites
  12. * viewing the catalog produced by some SQL code
  13. With some extra work:
  14. * generating documentation for SQL code
  15. * support running one dialect of SQL on a different DBMS using
  16. automatic translation - portable SQL
  17. * typesafe database access from Haskell
  18. * lint or semantic analysis for SQL or PL/pgSQL
  19. Status
  20. ======
  21. Pre-alpha. Support for parsing SQL is patchy, but not too
  22. bad. Supports queries/DML and DDL. Here is an extract from the parsing
  23. tests which gives some examples of what can currently be parsed:
  24. * [Parsing examples](ParserTests.html)
  25. The type checker is currently still being fixed after some reworking
  26. of parsing and ast types. It should handle a lot of queries and dml
  27. fine though.
  28. Extract from the type checking tests:
  29. * [Type-checking examples](TypeCheckTests.html)
  30. Currently limited support for quasiquoting, here are the extracts from
  31. the tests:
  32. * [Quasiquotation examples](QuasiQuoteTests.html)
  33. The pretty printer should support everything the parser supports
  34. (i.e. it pretty prints code which both the parser and Postgres
  35. understand).
  36. Catalog information is limited, supports the type checking. Some
  37. information is collected on scalar types, domains, composite types,
  38. casts, tables, views and functions.
  39. Installation
  40. ============
  41. This project is currently developed on GHC 7.2.1. 7.0.x should be
  42. fine, 6.12.x might take a small amount of work.
  43. To install use
  44. ~~~~~{.sh}
  45. cabal install hssqlppp
  46. ~~~~~
  47. Documentation
  48. =============
  49. [Haddock docs](haddock/index.html)
  50. [Examples](examples.txt.html)
  51. [Some notes on hacking on hssqlppp itself](devel.txt.html)
  52. Links
  53. =====
  54. Homepage: <http://jakewheat.github.com/hssqlppp/>
  55. Hackage: <http://hackage.haskell.org/package/hssqlppp>
  56. Repository: <https://github.com/JakeWheat/hssqlppp>
  57. Changes: <https://github.com/JakeWheat/hssqlppp/blob/master/CHANGES>
  58. Reporting issues and feature requests
  59. =====================================
  60. Use the github issue tracker. Please supply an example of SQL which
  61. doesn't parse/typecheck correctly where relevant.
  62. <https://github.com/JakeWheat/hssqlppp/issues>
  63. Provisional future plans
  64. ========================
  65. * parameterized statements/typesafe haskell access
  66. * some simple syntax extension support for SQL
  67. * a 'compiler' command to help developing SQL
  68. * parse most Postgres syntax, possibly other SQL dialects as well
  69. * improve the typechecker - fix current regressions, get more sql type
  70. checking correctly
  71. * improve the catalog - add more checking, more item types
  72. * improve the quasi-quoting - is a bit ad hoc and limited at the moment
  73. * documentation generator for SQL codebases
  74. Contact
  75. =======
  76. Let me know if you're using/ interested in using the library, if you
  77. have any problems, bug reports, or suggestions, etc.. All
  78. contributions, comments and criticism welcome:
  79. jakewheatmail@gmail.com