Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConnection ¶
GetConnection returns the global database connection pool. Creates a new connection pool if no connection is available.
The connections will be closed automatically on server shutdown so you don't need to call "Close()" when you're done with the database.
func RegisterModel ¶
func RegisterModel(model interface{})
RegisterModel registers a model for auto-migration. When writing a model file, you should always register it in the init() function.
func init() { database.RegisterModel(&MyModel{}) }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.