<commit_before><?php

namespace mii\search;

use mii\db\DatabaseException;
use mii\db\Expression;

/**
 * SphinxQL Query Builder
 *
 */
class Query
{

    // Query type
    protected $_type;

    // SQL statement
    protected $_sql;


    protected $_index;

    // (...)
    protected $_columns = [];

    // VALUES (...)
    protected $_values = [];

    // SET ...
    protected $_set = [];

    // SELECT ...
    protected $_select = [];

    // FROM ...
    protected $_from = [];

    // GROUP BY ...
    protected $_group_by = [];

    // HAVING ...
    protected $_having = [];

    // OFFSET ...
    protected $_offset;

    // OPTION ...
    protected $_option = [];

    // WHERE ...
    protected $_where = [];

    // MATCH
    protected $_match = [];

    // ORDER BY ...
    protected $_order_by = [];

    // LIMIT ...
    protected $_limit;


    /**
     * Creates a new SQL query of the specified type.
     *<commit_msg>fix bug with where() queries for sphinx<commit_after><?php

namespace mii\search;

use mii\db\DatabaseException;
use mii\db\Expression;

/**
 * SphinxQL Query Builder
 *
 */
class Query
{

    // Query type
    protected $_type;

    // SQL statement
    protected $_sql;


    protected $_index;

    // (...)
    protected $_columns = [];

    // VALUES (...)
    protected $_values = [];

    // SET ...
    protected $_set = [];

    // SELECT ...
    protected $_select = [];

    // FROM ...
    protected $_from = [];

    // GROUP BY ...
    protected $_group_by = [];

    // HAVING ...
    protected $_having = [];

    // OFFSET ...
    protected $_offset;

    // OPTION ...
    protected $_option = [];

    // WHERE ...
    protected $_where = [];

    // MATCH
    protected $_match = [];

    // ORDER BY ...
    protected $_order_by = [];

    // LIMIT ...
    protected $_limit;

    // Quoted query parameters
    protected $_parameters = [];


    /**
     * Creates a new SQL query of the specified type.
     *
{'fraction_non_alphanumeric': 0.16877850988342624, 'fraction_numerical': 0.0, 'mean_word_length': 1.6111111111111112, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6678271', 'n_tokens_mistral': 613, 'n_tokens_neox': 564, 'n_words': 153}