gen

package
v0.0.0-...-64e2a4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelCase

func CamelCase(s string) string

CamelCase returns the CamelCased name. If there is an interior underscore followed by a lower case letter, drop the underscore and convert the letter to upper case. There is a remote possibility of this rewrite causing a name collision, but it's so remote we're prepared to pretend it's nonexistent - since the C++ generator lowercases names, it's extremely unlikely to have two fields with different capitalizations. In short, _my_field_name_2 becomes XMyFieldName_2.

func DiscoverTables

func DiscoverTables(db *sqlx.DB, schema string) ([]*table, error)

func Generate

func Generate(db *sqlx.DB, schema string, packageName string, dirname string) error

func GenerateTestMain

func GenerateTestMain(packageName string, schemaDir string) error

func NewTable

func NewTable(name string) *table

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL