Skip to content

Instantly share code, notes, and snippets.

@guillaumebort
Last active December 11, 2015 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guillaumebort/4546727 to your computer and use it in GitHub Desktop.
Save guillaumebort/4546727 to your computer and use it in GitHub Desktop.
Hoho, I've something that will allow to write an awesome Scala Macro for #playframework
> compile
[info] Compiling 1 Scala source to /private/tmp/my/target/scala-2.10/classes...
> Analysing SQL: select name, age from people where age > ?
-- Parameters:
java.lang.Integer
-- Returns:
java.lang.String
java.lang.Integer
-------------
> Analysing SQL: select 1
-- Returns:
java.lang.Integer
-------------
> Analysing SQL: slect * from people
ERROR: syntax error at or near "slect"
Position: 1
-------------
> Analysing SQL: select * from people
-- Returns:
java.lang.Integer
java.lang.String
java.lang.Integer
-------------
> Analysing SQL: insert into people values (?,?,?)
-- Parameters:
java.lang.Integer
java.lang.String
java.lang.Integer
-------------
> Analysing SQL: delete from people where age < ?
-- Parameters:
java.lang.Integer
-------------
> Analysing SQL: select address.city from address join people on people.id = address.people_id where people.age > ?
-- Parameters:
java.lang.Integer
-- Returns:
java.lang.String
-------------
[success] Total time: 1 s, completed Jan 16, 2013 1:07:53 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment