<commit_before><?php

namespace Ali\DatatableBundle\Util\Factory\Query;

interface QueryInterface
{

    /**
     * get total records
     * 
     * @return integer 
     */
    function getTotalRecords();

    /**
     * get data
     * 
     * @param int $hydration_mode
     * 
     * @return array
     */
    function getData($hydration_mode);

    /**
     * set entity
     * 
     * @param string $entity_name
     * @param string $entity_alias
     * 
     * @return Datatable 
     */
    function setEntity($entity_name, $entity_alias);

    /**
     * set fields
     * 
     * @param array $fields
     * 
     * @return Datatable 
     */
    function setFields(array $fields);

    /**
     * get entity name
     * 
     * @return string
     */
    function getEntityName();

    /**
     * get entity alias
     * 
     * @return string
     */
    function getEntityAlias();

    /**
     * get fields
     * 
     * @return array
     */
    function getFields();

    /**
     * get order field
     *
     * @return string
     */
    function getOrderField();

    /**
     * get order type
     * 
     * @return string
     */
    function getOrderType();

    /**
     * set order
     * 
     * @param string $order_field
     * @param string $order_type
     * 
     * @return Datatable 
     */
    function setOrder($order_field, $order_type);

    /**
     * set fixed data
     * 
     * @param type $data
     * 
     * @return Datatable 
     */
    function setFixedData($data);

    /**
     * set query where
     * 
     * @param string $where
     * @param array  $params
     * 
     * @return Datatable 
     */
    function setWhere($where, array $params = array());

    /**
     * add join
     * 
     * @example:
     *      ->setJoin( 
     *              'r.event', 
     *              'e', 
     *              \Doctrine\ORM\Query\Expr\Join::INNER_JOIN, 
     *              'e.name like %test%') 
     * 
     * @param string $join_field<commit_msg>add missing requirement for search call in query interface<commit_after><?php

namespace Ali\DatatableBundle\Util\Factory\Query;

interface QueryInterface
{

    /**
     * get total records
     * 
     * @return integer 
     */
    function getTotalRecords();

    /**
     * get data
     * 
     * @param int $hydration_mode
     * 
     * @return array
     */
    function getData($hydration_mode);

    /**
     * set entity
     * 
     * @param string $entity_name
     * @param string $entity_alias
     * 
     * @return Datatable 
     */
    function setEntity($entity_name, $entity_alias);

    /**
     * set fields
     * 
     * @param array $fields
     * 
     * @return Datatable 
     */
    function setFields(array $fields);

    /**
     * get entity name
     * 
     * @return string
     */
    function getEntityName();

    /**
     * get entity alias
     * 
     * @return string
     */
    function getEntityAlias();

    /**
     * get fields
     * 
     * @return array
     */
    function getFields();

    /**
     * get order field
     *
     * @return string
     */
    function getOrderField();

    /**
     * get order type
     * 
     * @return string
     */
    function getOrderType();

    /**
     * set order
     * 
     * @param string $order_field
     * @param string $order_type
     * 
     * @return Datatable 
     */
    function setOrder($order_field, $order_type);

    /**
     * set fixed data
     * 
     * @param type $data
     * 
     * @return Datatable 
     */
    function setFixedData($data);

    /**
     * set query where
     * 
     * @param string $where
     * @param array  $params
     * 
     * @return Datatable 
     */
    function setWhere($where, array $params = array());

    /**
     * set search
     *
     * @param bool $search
     *
     * @return Datatable
     */
    function setSearch($search); 

    /**
     * add join
     * 
     * @example:
     *      ->setJoin( 
     *              'r.event', 
     *              'e', 
     *              \Doctrine\ORM\Query\Expr\Join::INNER_JOIN, 
     *              'e.name like %test%') 
     * 
     * @param string $join_field
{'fraction_non_alphanumeric': 0.12081339712918661, 'fraction_numerical': 0.0, 'mean_word_length': 1.4436002337814144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6871496', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1224, 'n_words': 276}