hphp/hack/src/heap/hh_shared.c
// Expects the database to be open
Expects the database to be open
Expects the database to be open
static void verify_sqlite_header(sqlite3 *db) {
  sqlite3_stmt *select_stmt = NULL;
  const char *sql = "SELECT * FROM HEADER;";
  assert_sql(sqlite3_prepare_v2(db, sql, -1, &select_stmt, NULL), SQLITE_OK);
  if (sqlite3_step(select_stmt) == SQLITE_ROW) {
      assert(sqlite3_column_int64(select_stmt, 0) == MAGIC_CONSTANT);
      assert(strcmp((char *)sqlite3_column_text(select_stmt, 1),
                    BuildInfo_kRevision) == 0);
  }
  assert_sql(sqlite3_finalize(select_stmt), SQLITE_OK);
}
static void verify_sqlite_header ( sqlite3 * db ) { sqlite3_stmt * select_stmt = NULL ; const char * sql = " " ; assert_sql ( sqlite3_prepare_v2 ( db , sql , -1 , & select_stmt , NULL ) , SQLITE_OK ) ; if ( sqlite3_step ( select_stmt ) == SQLITE_ROW ) { assert ( sqlite3_column_int64 ( select_stmt , 0 ) == MAGIC_CONSTANT ) ; assert ( strcmp ( ( char * ) sqlite3_column_text ( select_stmt , 1 ) , BuildInfo_kRevision ) == 0 ) ; } assert_sql ( sqlite3_finalize ( select_stmt ) , SQLITE_OK ) ; }
Expects the database to be open
Expects the database to be open
// Columns are 0 indexed