SQLBoiler is a tool to generate a Go ORM tailored to your database schema.
Find a file
2016-07-17 00:15:14 +10:00
bdb Added unique constraint to table state 2016-07-16 05:09:32 +10:00
boil Added panic functions 2016-07-16 21:22:57 +10:00
strmangle Got insert testing in a better state 2016-07-14 02:51:40 +10:00
templates Change objectSlice to be exported (ObjectSlice) 2016-07-17 00:15:14 +10:00
templates_test Change objectSlice to be exported (ObjectSlice) 2016-07-17 00:15:14 +10:00
.gitignore Got insert testing in a better state 2016-07-14 02:51:40 +10:00
config.go Add postgres sslmode to configuration. 2016-07-11 15:17:49 -07:00
imports.go Allow debug to be toggled by a flag. 2016-07-14 22:45:43 -07:00
imports_test.go Refactor dbdrivers into two packages 2016-06-22 23:11:32 -07:00
LICENSE Initial commit 2016-02-21 16:18:25 +10:00
main.go Got insert testing in a better state 2016-07-14 02:51:40 +10:00
output.go Remove debug output 2016-06-27 00:00:19 -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-07-11 15:43:59 +10:00
sqlboiler.go Add postgres sslmode to configuration. 2016-07-11 15:17:49 -07:00
sqlboiler_test.go Failed test runs of sqlboiler are left around 2016-07-12 20:00:13 -07:00
templates.go Finish insert tests 2016-07-15 22:26:45 +10:00
templates_test.go Move main back to root folder. 2016-06-12 11:19:23 -07:00
text_helpers.go Change objectSlice to be exported (ObjectSlice) 2016-07-17 00:15:14 +10:00
text_helpers_test.go Add Texthelpers from foreign keys 2016-07-14 21:18:49 -07:00

SQLBoiler

GoDoc

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

Config

config.toml

[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.

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)