wordpress/wp-content/plugins/sqlite-integration/query_create.class.php
/**
	 * Method to add IF NOT EXISTS to query string.
	 *
	 * This adds IF NOT EXISTS to every query string, which prevent the exception
	 * from being thrown.
	 *
	 * @access private
	 */
Method to add IF NOT EXISTS to query string.
This adds IF NOT EXISTS to every query string, which prevent the exception
from being thrown.

@access private
Method to add IF NOT EXISTS to query string . This adds IF NOT EXISTS to every query string which prevent the exception from being thrown . @access private
private function add_if_not_exists(){
		$pattern_table = '/^\\s*CREATE\\s*(TEMP|TEMPORARY)?\\s*TABLE\\s*(IF NOT EXISTS)?\\s*/ims';
		$this->_query  = preg_replace($pattern_table, 'CREATE $1 TABLE IF NOT EXISTS ', $this->_query);
		$pattern_index = '/^\\s*CREATE\\s*(UNIQUE)?\\s*INDEX\\s*(IF NOT EXISTS)?\\s*/ims';
		for ($i = 0; $i < count($this->index_queries); $i++) {
			$this->index_queries[$i] = preg_replace($pattern_index, 'CREATE $1 INDEX IF NOT EXISTS ', $this->index_queries[$i]);
		}
	}
private function add_if_not_exists ( ) { $ pattern_table = '/^\\s*CREATE\\s*(TEMP|TEMPORARY)?\\s*TABLE\\s*(IF NOT EXISTS)?\\s*/ims' ; $ this -> _query = preg_replace ( $ pattern_table , 'CREATE $1 TABLE IF NOT EXISTS ' , $ this -> _query ) ; $ pattern_index = '/^\\s*CREATE\\s*(UNIQUE)?\\s*INDEX\\s*(IF NOT EXISTS)?\\s*/ims' ; for ( $ i = 0 ; $ i < count ( $ this -> index_queries ) ; $ i ++ ) { $ this -> index_queries [ $ i ] = preg_replace ( $ pattern_index , 'CREATE $1 INDEX IF NOT EXISTS ' , $ this -> index_queries [ $ i ] ) ; } }
Method to add IF NOT EXISTS to query string.
Method to add IF NOT EXISTS to query string .