Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

Roadmap

momomimachli edited this page Aug 19, 2016 · 11 revisions

Current improvements

  • Finalize the test-suite to remove as many bugs as possible.

Next steps

  • Improve quick-start tutorial.
  • Perform additional tests against injection.

Ideas for the future

  • Adding new functions (support of dates, etc.)

Achieved

19 August 2016

New syntax implementation insuring the grammatical correctness of statements. For example, it is not possible to write anymore a statement such as (as a FROM clause cannot be preceded by a another FROM clause):

bad =
       select (//*)
    |> from (table "films")
    |> from (table "actors")
    |> end

21 July 2015

Pretty print implementation using parseP function.

16 June 2015

Replaced composition function (/++) by a State monad for composing the different clauses of a query. Concretely:

myQuery :: Select [[Undefined]] a
myQuery = select (//*) /++ from (table "People")

is now:

myQuery :: Query [[Undefined]] a
myQuery = do
    select (//*)
    from $ table "People"

5 March 2015

Use of GADTs

GADTs define an extra phantom type which is the SQL type of a columns or a value. It allows to perform static type checks of the SQL statements.

Ext module

Functions relying on columns/values of unspecified type are now grouped in the Ext module. It allows the user to choose or not to stay with queries for which all values / columns have a type or not.

16 January 2015

Better way to organize the parsers.

The data structure has been re-worked to use phantom type. The driver (MariaDb, PostgreSQL, SqLite) is defined as the phantom type.

With this data-structure the parser class can detect which parser to use. Instead of multi-parameters type classes, parsers are now defined as records types.

Closer syntax

When a SQL keyword is also used in Haskell, it's now followed by "", so for example: "where".

Abandoned

16 January 2015

Using of lens for the construction of the queries

Have the association of the different parts of the SQL query using lenses, so one can write the following:

select ["id", "name"] & from "table1" & where_ ("id" > (1::Int))

Where "&" is the backward function application.

This was an all nice idea, but the problem is the types when you try to compose the result of orderBy with a limit, because now orderBy function is a partially applied lens!!!

[Note 15 June 2015: finally a State monad has been used for the composition]

Closer syntax

Functions part of the prelude overwritten, so one can write directly in the natural way ">", "<", etc.

This was a bit of a crazy idea...