<commit_before><?php

/**
 * This file is part of the miBadger package.
 *
 * @author <NAME> <<EMAIL>>
 * @license http://opensource.org/licenses/Apache-2.0 Apache v2 License
 */

namespace miBadger\Query;

/**
 * The query builder class.
 *
 * @since 1.0.0
 */
class QueryBuilder implements QueryInterface
{
	/* @var string The modifier. SELECT, INSERT INTO, UPDATE or DELETE */
	private $modifier;

	/* @var string The table name. */
	private $table;

	/* @var array The columns. */
	private $columns;

	/* @var array The values. */
	private $values;

	/* @var array The join conditions. */
	private $join;

	/* @var QueryExpression The where clause. */
	private $where;

	/* @var array The group by conditions. */
	private $groupBy;

	/* @var array The order by conditions. */
	private $orderBy;

	/* @var string The limit. */
	private $limit;

	/* @var string The offset. */
	private $offset;

	/**
	 * Construct a query builder object with the given table.
	 *
	 * @param string $table
	 */
	public function __construct($table)
	{
		$this->table = $table;
		$this->join = [];
		$this->where = '';
		$this->groupBy = [];
		$this->orderBy = [];
	}

	/**
	 * Returns a string representation of the query object.
	 *
	 * @return string a string representation of the query object.
	 */
	public function __toString()
	{
		switch ($this->modifier) {
			case self::SELECT:<commit_msg>Fixing issue<commit_after><?php

/**
 * This file is part of the miBadger package.
 *
 * @author <NAME> <<EMAIL>>
 * @license http://opensource.org/licenses/Apache-2.0 Apache v2 License
 */

namespace miBadger\Query;

/**
 * The query builder class.
 *
 * @since 1.0.0
 */
class QueryBuilder implements QueryInterface
{
	/* @var string The modifier. SELECT, INSERT INTO, UPDATE or DELETE */
	private $modifier;

	/* @var string The table name. */
	private $table;

	/* @var array The columns. */
	private $columns;

	/* @var array The values. */
	private $values;

	/* @var array The join conditions. */
	private $join;

	/* @var QueryExpression The where clause. */
	private $where;

	/* @var array The group by conditions. */
	private $groupBy;

	/* @var array The order by conditions. */
	private $orderBy;

	/* @var string The limit. */
	private $limit;

	/* @var string The offset. */
	private $offset;

	/**
	 * Construct a query builder object with the given table.
	 *
	 * @param string $table
	 */
	public function __construct($table)
	{
		$this->table = $table;
		$this->join = [];
		$this->where = null;
		$this->groupBy = [];
		$this->orderBy = [];
	}

	/**
	 * Returns a string representation of the query object.
	 *
	 * @return string a string representation of the query object.
	 */
	public function __toString()
	{
		switch ($this->modifier) {
			case self::SELECT:
{'fraction_non_alphanumeric': 0.14466546112115733, 'fraction_numerical': 0.00433996383363472, 'mean_word_length': 3.043859649122807, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6018662', 'n_tokens_mistral': 928, 'n_tokens_neox': 859, 'n_words': 295}