Split _compile method in query_builder class
This commit is contained in:
parent
f1c19acd86
commit
56c061a7d1
@ -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 $type
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @return $string
|
* @return $string
|
||||||
*/
|
*/
|
||||||
protected function _compile($type='', $table='')
|
protected function _compile_type($type='', $table='')
|
||||||
{
|
{
|
||||||
$table = $this->db->quote_table($table);
|
$table = $this->db->quote_table($table);
|
||||||
|
|
||||||
@ -1380,6 +1380,23 @@ class Query_Builder implements iQuery_Builder {
|
|||||||
break;
|
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
|
// Set the where clause
|
||||||
if ( ! empty($this->query_map))
|
if ( ! empty($this->query_map))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user