return false;
}
- public function selectDB( $db ) {
- return false; // doesn't make sense
- }
-
/**
* @return string SQLite DB file path
* @since 1.25
return $this->lastAffectedRowCount;
}
+ function tableExists( $table, $fname = __METHOD__ ) {
+ $tableRaw = $this->tableName( $table, 'raw' );
+ if ( isset( $this->sessionTempTables[$tableRaw] ) ) {
+ return true; // already known to exist
+ }
+
+ $encTable = $this->addQuotes( $tableRaw );
+ $res = $this->query(
+ "SELECT 1 FROM sqlite_master WHERE type='table' AND name=$encTable" );
+
+ return $res->numRows() ? true : false;
+ }
+
/**
* Returns information about an index
* Returns false if the index does not exist
$args = func_get_args();
$function = array_shift( $args );
- return call_user_func_array( $function, $args );
+ return $function( ...$args );
}
/**
/**
* List all tables on the database
*
- * @param string $prefix Only show tables with this prefix, e.g. mw_
+ * @param string|null $prefix Only show tables with this prefix, e.g. mw_
* @param string $fname Calling function name
*
* @return array