Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSQL ¶
func GenerateSQL(inputType interface{}, pkg string, opt Options, schemaTarget SchemaTarget) string
GenerateSQL takes in a "table type", that is a table whose fields are slices. Each field will be interpreted as a table. The sql struct tags will be used to generate the SQL schema. A package name is taken in to be included in the returned string. If a malformed type is passed in, this function will panic.
Types ¶
type SchemaTarget ¶
type SchemaTarget int
SchemaTarget defines the target db to generate the schema for.
const ( CockroachDB SchemaTarget = iota Spanner )
Click to show internal directories.
Click to hide internal directories.