protected function _composeInsertQuery(SQL $SQL){

		$query_pre = "INSERT INTO `$this->_table`";

		if(empty($this->_fields)){

			throw new QueryBuilderException(
				'No fields specified for SQL query'
			);
		}

		$fields = [];
		$updates = [];

		foreach($this->_fields as $field => $value){

			$prepared = $this->_prepareValue($value, $SQL);

			$fields[$field] = $prepared;
			$updates[] = "$field = $prepared";
		}

		$query_fields = '(' . implode(', ', array_keys($fields)) . ')';
		$query_values = '(' . implode(', ', $fields) . ')';
		$query_updates = implode(', ', $updates);

		return "{$query_pre}
			{$query_fields} VALUES {$query_values}
			ON DUPLICATE KEY UPDATE {$query_updates}
		";
	}