<commit_before><?php

namespace Jasny\DB;

/**
 * Indicates that an entity is part of a set, like a table or collection.
 * 
 * @author  <NAME> <<EMAIL>>
 * @license https://raw.github.com/jasny/db/master/LICENSE MIT
 * @link    https://jasny.github.com/db
 */
interface Recordset
{
    /**
     * Fetch a single entity.
     * 
     * @param mixed|array $id  ID or filter
     * @return static
     */
    public static function fetch($id);
    
    /**
     * Fetch all entities from the set.
     * 
     * @param array $filter
     * @param array $sort
     * @return static[]
     */
    public static function fetchAll(array $filter=[], $sort=null);

    /**
     * Fetch all descriptions from the set.
     * 
     * @param array $filter
     * @param array $sort
     * @return static[]
     */
    public static function fetchList(array $filter=[], $sort=null);
    
    /**
     * Fetch the number of entities in the set.
     * 
     * @param array $filter
     * @return int
     */
    public static function count(array $filter);
}<commit_msg>FetchAll / FetchList must accept a $limit parameter<commit_after><?php

namespace Jasny\DB;

/**
 * Indicates that an entity is part of a set, like a table or collection.
 * 
 * @author  <NAME> <<EMAIL>>
 * @license https://raw.github.com/jasny/db/master/LICENSE MIT
 * @link    https://jasny.github.com/db
 */
interface Recordset
{
    /**
     * Fetch a single entity.
     * 
     * @param mixed|array $id  ID or filter
     * @return static
     */
    public static function fetch($id);
    
    /**
     * Fetch all entities from the set.
     * 
     * @param array     $filter
     * @param array     $sort
     * @param int|array $limit   limit or [limit, offset]
     * @return static[]
     */
    public static function fetchAll(array $filter = [], $sort = null, $limit = null);

    /**
     * Fetch all descriptions from the set.
     * 
     * @param array $filter
     * @param array $sort
     * @param int|array $limit   limit or [limit, offset]
     * @return array
     */
    public static function fetchList(array $filter = [], $sort = null, $limit = null);
    
    /**
     * Fetch the number of entities in the set.
     * 
     * @param array $filter
     * @return int
     */
    public static function count(array $filter);
}
{'fraction_non_alphanumeric': 0.12635222847252273, 'fraction_numerical': 0.0, 'mean_word_length': 2.1627906976744184, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 4, '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': '3798572', 'n_tokens_mistral': 711, 'n_tokens_neox': 699, 'n_words': 228}