Split _compile method in query_builder class

This commit is contained in:
Timothy Warren 2014-03-20 11:57:50 -04:00
parent f1c19acd86
commit 56c061a7d1

View File

@ -1339,13 +1339,13 @@ class Query_Builder implements iQuery_Builder {
// --------------------------------------------------------------------------
/**
* String together the sql statements for sending to the db
* Sub-method for generating sql strings
*
* @param string $type
* @param string $table
* @return $string
*/
protected function _compile($type='', $table='')
protected function _compile_type($type='', $table='')
{
$table = $this->db->quote_table($table);
@ -1380,6 +1380,23 @@ class Query_Builder implements iQuery_Builder {
break;
}
return $sql;
}
// --------------------------------------------------------------------------
/**
* String together the sql statements for sending to the db
*
* @param string $type
* @param string $table
* @return $string
*/
protected function _compile($type='', $table='')
{
// Get the base clause for the query
$sql = $this->_compile_type($type, $table);
// Set the where clause
if ( ! empty($this->query_map))
{