LauJensen / clojureql

ClojureQL is superior SQL integration for Clojure
https://clojureql.sabrecms.com
Eclipse Public License 1.0
285 stars 39 forks source link

First step to a more modular compiler #57

Closed budu closed 12 years ago

budu commented 13 years ago

I've just completed the first step to a clean up of the compiler. I move the compile multi-method to its own namespace.

In the process I've clean-up a hack where tcols was used to pass a subtable (a query in the from clause) to the compiler. I've changed the code to use a new key called :subtable. The other change is that it's the apply-on Relation method that is now in charge of printing debug output, this too should be cleaner as now the print-method will not print the compiled output twice if debug is true.

There's a few other minor modifications like using upper-case instead of .toUpperCase and correction to the indentation when setting the tables local variable.

bendlas commented 12 years ago

Tried to merge this, but it's been out of sync for too long. Too many places where it's not clear which side of the diff to apply. Sorry!

Actually, we do want to overhaul the compiler but there needs to be a release in the meanwhile, to get out all those fixes. So: Closed for now, but feel free to add ideas to https://github.com/LauJensen/clojureql/wiki/Compiler-overhaul