SetFileControlInt64 invokes the xFileControl method on a given database. The dbName is the name of the database. It will default to "main" if left blank. The op is one of the opcodes prefixed by "SQLITE_FCNTL_". The arg argument and return code are both opcode-specific. Please see the SQLite documen
(dbName string, op int, arg int64)
| 2129 | // |
| 2130 | // See: sqlite3_file_control, https://www.sqlite.org/c3ref/file_control.html |
| 2131 | func (c *SQLiteConn) SetFileControlInt64(dbName string, op int, arg int64) error { |
| 2132 | if dbName == "" { |
| 2133 | dbName = "main" |
| 2134 | } |
| 2135 | |
| 2136 | cDBName := C.CString(dbName) |
| 2137 | defer C.free(unsafe.Pointer(cDBName)) |
| 2138 | |
| 2139 | cArg := C.sqlite3_int64(arg) |
| 2140 | rv := C.sqlite3_file_control(c.db, cDBName, C.int(op), unsafe.Pointer(&cArg)) |
| 2141 | if rv != C.SQLITE_OK { |
| 2142 | return c.lastError() |
| 2143 | } |
| 2144 | return nil |
| 2145 | } |
| 2146 | |
| 2147 | // Close the statement. |
| 2148 | func (s *SQLiteStmt) Close() error { |