.=title: README
.?release: $Release: 0.3.0 $


.$ About

Kwatable is a command to generate SQL script which create tables from
table definition file (*.yaml).
See `examples' for details.

NOTICE: Kwatable is now alpha version. Spec may change in the future.



.$ Installation

.* If you have installed RubyGems, just type 'gem install --remote kwatable'.
.====================
$ su -
# gem install --remote kwatable
.====================

.* If you can be root user, use setup.rb script.
.====================
$ ruby setup.rb config
$ ruby setup.rb setup
$ su -
# ruby setup.rb install
.====================

.* If you cannot be root user, just copy 'bin/kwatable' and 'lib/*'
into a proper directory.
.====================
### copy 'bin/kwatable'
$ mkdir -p $HOME/bin
$ cp bin/kwatable $HOME/bin
$ export PAHT=$PATH:$HOME/bin
### copy 'lib/*'
$ mkdir -p $HOME/lib/ruby
$ cp -r lib $HOME/lib/ruby
$ export RUBYLIB=$HOME/lib/ruby
.====================

Or try 'contrib/inline-require' script which concatenates 'bin/kwatable'
and 'lib/**/*.rb' into a file.
.====================
### conatenate 'bin/kwatable' and 'lib/**/*.rb'
$ mkdir -p $HOME/bin
$ ruby contrib/inline-require -I lib bin/kwatable > $HOME/bin/kwatable
$ chmod 755 $HOME/bin/kwatable
### copy 'templates/*'
$ mkdir -p $HOME/lib/kwatable
$ cp -r lib/kwatable/templates $HOME/lib/kwatable
$ export KWATABLE_PATH=$HOME/lib/kwatable/templates
.====================



.$ Usage

Type 'kwatable -h' for usage.

.? Example1: generate SQL script for MySQL
.====================
$ kwatable -f ddl-mysql.eruby datafile.yaml > create-table.sql
.====================

.? Example2: generate DTO class for Java
.====================
$ kwatable -f dto-java.eruby -m datafile.yaml
.====================



.$ Copyright

copyright(c) 2005 kuwata-lab.com all rights reserved.



.$ License

MIT-LICENSE