protected override bool ReleaseHandle()
        {
            var rc = VersionedMethods.Close(handle);

            handle = IntPtr.Zero;

            return(rc == SQLITE_OK);
        }
        public static void ThrowExceptionForRC(int rc, Sqlite3Handle db)
        {
            if (rc == SQLITE_OK ||
                rc == SQLITE_ROW ||
                rc == SQLITE_DONE)
            {
                return;
            }

            var message = db == null || db.IsInvalid
                ? VersionedMethods.GetErrorString(rc)
                : NativeMethods.sqlite3_errmsg(db);

            throw new SqliteException(Strings.SqliteNativeError(rc, message), rc);
        }