Documentation ¶
Overview ¶
Package db provides the first layer interfaces to database storage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UnaccentCompare = unicodeCollate.CompareString
UnaccentCompare performs a string comparison after removing accents.
Functions ¶
func Init ¶
func Init() error
Init creates the database schema by running all the needed migrations.
func InsertWithID ¶
InsertWithID executes an insert statement and returns the value of the field given by "r". Depending on the database, it uses different ways to do just that.
Types ¶
type Connector ¶
type Connector interface { // Name returns the connector's name Name() string // Dialect returns the connector's dialect Dialect() string // Open creates a new db connection. Open(*url.URL) (*sql.DB, error) // HasTable checks if a given table exists in the // database. It's used by the migration system. HasTable(string) (bool, error) }
Connector is an interface for a database connector.
Directories ¶
Path | Synopsis |
---|---|
Package filters provides query filters for specific operations.
|
Package filters provides query filters for specific operations. |
Package types provides some shared database types.
|
Package types provides some shared database types. |
Click to show internal directories.
Click to hide internal directories.