Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DB *gorm.DB
DB is the global database instance
var SQLiteMaxConns = 4
SQLiteMaxConns caps the connections to a SQLite file.
Functions ¶
func InitDatabase ¶
InitDatabase initializes the database connection
func SQLiteDSN ¶ added in v0.6.0
SQLiteDSN turns the path of a sqlite:// URL into a DSN of the pure-Go SQLite driver: WAL journal (readers do not wait for the writer), a busy timeout and immediate transactions instead of "database is locked" errors, foreign keys not enforced, and the time format. Settings given in the URL (_pragma=…, _txlock, _timefmt) win over these defaults.
Types ¶
This section is empty.