SQLBoiler is a tool to generate a Go ORM tailored to your database schema.
Find a file
Aaron L f46c2c5337 Add relationship "to_one" template.
- Temporarily add some new helper functions, going to clean these all
  up in favor of pipes
- Annotate a couple of super weird methods
- Fix a printf verb for err
2016-06-19 16:01:22 -07:00
boil Finish Bind test, renamed querymods package 2016-06-15 00:01:28 +10:00
dbdrivers Foreign keys were not being pulled properly 2016-06-19 14:46:10 -07:00
strmangle Add relationship "to_one" template. 2016-06-19 16:01:22 -07:00
templates Add relationship "to_one" template. 2016-06-19 16:01:22 -07:00
templates_test Finished Bind template test (added slice route) 2016-06-15 02:15:58 +10:00
.gitignore Fix main 2016-06-11 18:37:36 -07:00
config.go Fix some problems with viper setup. 2016-06-12 15:35:38 -07:00
imports.go Finish Bind test, renamed querymods package 2016-06-15 00:01:28 +10:00
imports_test.go Move main back to root folder. 2016-06-12 11:19:23 -07:00
LICENSE Initial commit 2016-02-21 16:18:25 +10:00
main.go Improve command error reporting & validation 2016-06-19 14:47:50 -07:00
output.go Move main back to root folder. 2016-06-12 11:19:23 -07:00
output_test.go Move main back to root folder. 2016-06-12 11:19:23 -07:00
README.md Update README.md 2016-06-10 15:23:47 +10:00
sqlboiler.go Fix some problems with viper setup. 2016-06-12 15:35:38 -07:00
sqlboiler_test.go Move main back to root folder. 2016-06-12 11:19:23 -07:00
templates.go Add relationship "to_one" template. 2016-06-19 16:01:22 -07:00
templates_test.go Move main back to root folder. 2016-06-12 11:19:23 -07: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)