Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebort committed Jan 17, 2013
1 parent ffa9202 commit 10217f7
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,23 @@ What if Play could:
- Validate the structure of your SQL statements over the real database schema?
- Extract the type informations from this schema and use them to enrich the Scala types?

Now, with Scala 2.10 and macro __it is possible__. This demo project is a demonstration of what a typed version of Anorm would look like.
Now, with Scala 2.10 and macro __it is possible__.

Using a Scala macro, it finds your SQL statements in your application code, send them to the database for compilation, analysis and validation, and use the analysis result to compute a Scala type for your SQL statement.

So the basic idea is to transform:

```sql
SELECT name, age from people where id = ?
```

To something like:

```scala
Int => List[(String,Int)]
```

This demo project is a demonstration of what a typed version of Anorm would look like.

## Prerequisites

Expand Down

0 comments on commit 10217f7

Please sign in to comment.