func init() { // Initialize SQLite (required with SQLITE_OMIT_AUTOINIT). // [http://www.sqlite.org/c3ref/initialize.html] if rc := C.sqlite3_initialize(); rc != OK { initErr = libErr(rc, nil) return } // Use the same temporary directory as Go. // [http://www.sqlite.org/c3ref/temp_directory.html] tmp := os.TempDir() + "\x00" C.set_temp_dir(cStr(tmp)) // Register database/sql driver. register("sqlite3") }
func Initialize() { C.sqlite3_initialize() }