Skip to content

This is a parser combinator written in Scala that will process a .sql DDL file and create the associated Lift ORM classes. Currently the parser is very specific but my hope is someone else or I can make it more general.

Notifications You must be signed in to change notification settings

jlcanela/sbtdlo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This script will allow a user to create a scala Lift Mapper ORM from the given a .sql file containing ddl statements.

Currently this script does not work with a lot of different grammars.  Basically it looks for insert statements and creates the appropriate classes.  As time and needs dictate this will be expanded.

Currently take a look at the test folder for a schema that will go through the script fine.

There are a lot of improvements I would like to make...
* Handle all ddl grammars and do something better than error out
* Improve the command-line handling and error reporting.
* Separate out the writing of classes into its own file and maybe even abstract it so you can plug-in your own writer easily. 
* Clean-up code
* Improve compilation scenario

To compile/run you do the following in the src directory...
scalac DDLParser.scala
scala -classpath . ParseExpr ../test/testSchema1.sql [outputOfOrmFiles]

About

This is a parser combinator written in Scala that will process a .sql DDL file and create the associated Lift ORM classes. Currently the parser is very specific but my hope is someone else or I can make it more general.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages