SQLBoiler is a tool to generate a Go ORM tailored to your database schema.
Find a file
2016-08-13 16:34:02 -07:00
bdb Properly abstract LastInsertID 2016-08-13 16:34:02 -07:00
boil Move string set operations to strmangle 2016-08-13 16:34:02 -07:00
strmangle Move string set operations to strmangle 2016-08-13 16:34:02 -07:00
templates Fix the last bits of problems with auto inc pkey 2016-08-13 16:34:02 -07:00
templates_test Move string set operations to strmangle 2016-08-13 16:34:02 -07:00
testdata Add circle file and test schema 2016-08-05 15:20:31 +10:00
.gitignore Add .cover to gitignore 2016-08-14 01:00:23 +10:00
circle.yml Remove coveralls support because it sucks 2016-08-08 18:55:03 +10:00
config.go Add postgres sslmode to configuration. 2016-07-11 15:17:49 -07:00
fakedb_test.go Properly abstract LastInsertID 2016-08-13 16:34:02 -07:00
imports.go Fix missing import in generation 2016-08-13 16:34:02 -07:00
imports_test.go Use errors package all over the project 2016-08-13 11:37:16 -07:00
LICENSE.md Add badges, fix license 2016-08-08 17:49:52 +10:00
main.go Update repo to add vattle org paths 2016-08-09 17:59:30 +10:00
output.go Use errors package all over the project 2016-08-13 11:37:16 -07:00
output_test.go Move main back to root folder. 2016-06-12 11:19:23 -07:00
README.md Update repo to add vattle org paths 2016-08-09 17:59:30 +10:00
sqlboiler.go Properly abstract LastInsertID 2016-08-13 16:34:02 -07:00
sqlboiler_test.go Properly abstract LastInsertID 2016-08-13 16:34:02 -07:00
templates.go Properly abstract LastInsertID 2016-08-13 16:34:02 -07:00
templates_test.go Stop dividing templates up, and execute by name 2016-07-16 23:55:15 -07:00
text_helpers.go Update repo to add vattle org paths 2016-08-09 17:59:30 +10:00
text_helpers_test.go Properly abstract LastInsertID 2016-08-13 16:34:02 -07:00

SQLBoiler

License GoDoc CircleCI Go Report Card

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)