SQLBoiler is a tool to generate a Go ORM tailored to your database schema.
Go to file
Patrick O'brien 98e0b1f2ad Fixed unit test comparison bug for Null types
* Set randomized field values to zero value for objects with Valid false
  This ensures the types will match the zero values returned from the
  db.

* Reverted make statements to proper initialization format
2016-06-11 18:30:56 +10:00
boil Fixed unit test comparison bug for Null types 2016-06-11 18:30:56 +10:00
cmds Fixed unit test comparison bug for Null types 2016-06-11 18:30:56 +10:00
dbdrivers Added debug mode, test singles 2016-06-03 07:07:51 +10:00
strmangle Fix null package imports, finish Bind 2016-06-08 15:45:34 +10:00
.gitignore Added binary to gitignore 2016-02-23 18:29:48 +10:00
LICENSE Initial commit 2016-02-21 16:18:25 +10:00
main.go Fix null package imports, finish Bind 2016-06-08 15:45:34 +10:00
README.md Update README.md 2016-06-10 15:23:47 +10:00

SQLBoiler

GoDoc

SQLBoiler is a tool to generate a Go ORM tailored to your database schema.

Config?

To use SQLBoiler you need to create a config.toml in SQLBoiler's root directory. The file format looks like the following:

[postgres]
  host="localhost"
  port=5432
  user="dbusername"
  pass="dbpassword"
  dbname="dbname"

How?

SQLBoiler connects to your database (defined in your config.toml file) to ascertain the structure of your tables, and builds your Go ORM code using the templates defined in the /templates folder.

Running SQLBoiler without the --table flag will result in SQLBoiler building boilerplate code for every table in your database marked as public.

Before you use SQLBoiler make sure you create a config.toml configuration file with your database details, and specify your database by using the --driver flag.

Complete documentation is available at http://github.com/pobri19/sqlboiler

Usage:
  sqlboiler [flags]

Flags:
  -d, --driver string    The name of the driver in your config.toml (mandatory)
  -f, --folder string    The name of the output folder (default "output")
  -p, --pkgname string   The name you wish to assign to your generated package (default "model")
  -t, --table string     A comma seperated list of table names (generates all tables if not provided)