Skip to content

Instantly share code, notes, and snippets.

@dclarke
Created April 2, 2013 21:13
Show Gist options
  • Save dclarke/5296247 to your computer and use it in GitHub Desktop.
Save dclarke/5296247 to your computer and use it in GitHub Desktop.
ummm all ops = async
// make operations on the table asynchronous, for performance
mDBConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING("PRAGMA synchronous = OFF"));
// cache frequently used statements (for insertion, deletion, and updating)
rv = mDBConn->CreateAsyncStatement(NS_LITERAL_CSTRING(
"INSERT INTO moz_hosts "
"(id, host, type, permission, expireType, expireTime, appId, isInBrowserElement) "
"VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)"), getter_AddRefs(mStmtInsert));
NS_ENSURE_SUCCESS(rv, rv);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment