<commit_before><?php namespace Stillat\Common\Database\Repositories;

interface RepositoryInterface {

	/**
	 * Get the table name for the repository.
	 *
	 * @return string
	 */
	public function getTable();

	public function table();

	/**
	 * Retrieve safe delete setting.
	 *
	 * @return boolean
	 */
	public function getSafeDeleteEnabled();

	/**
	 * Retrieve the maximum value of a given column.
	 *
	 * @param  string  $column
	 * @return mixed
	 */
	public function max($column);

	/**
	 * Retrieve the minimum value of a given column.
	 *
	 * @param  string  $column
	 * @return mixed
	 */
	public function min($column);

	/**
	 * Retrieve the average of the values of a given column.
	 *
	 * @param  string  $column
	 * @return mixed
	 */
	public function avg($column);

	/**
	 * Retrieve the sum of the values of a given column.
	 *
	 * @param  string  $column
	 * @return mixed
	 */
	public function sum($column);

	/**
	 * Increment a column's value by a given amount.
	 *
	 * @param  string  $column
	 * @param  int     $amount
	 * @param  array   $extra
	 * @return int
	 */
	public function increment($column, $interval = 1, $additional = array());

	/**
	 * Decrement a column's value by a given amount.
	 *
	 * @param  string  $column
	 * @param  int     $amount
	 * @param  array   $extra
	 * @return int
	 */
	public function decrement($column, $interval = 1, $additional = array());

	/**
	 * Insert a new record into the database.
	 *
	 * @param  array  $values
	 * @return bool
	 */
	public function insert(array $values);

	/**
	 * Delete a record from the database.
	 *
	 * @param  mixed  $id
	 * @return int
	 */
	public function delete();

	/**
	 * Returns an array of primary keys.
	 *
	 * @return array<commit_msg>Added count() function to repository contract.<commit_after><?php namespace Stillat\Common\Database\Repositories;

interface RepositoryInterface {

	/**
	 * Get the table name for the repository.
	 *
	 * @return string
	 */
	public function getTable();

	public function table();

	/**
	 * Retrieve safe delete setting.
	 *
	 * @return boolean
	 */
	public function getSafeDeleteEnabled();

	/**
	 * Retrieve the maximum value of a given column.
	 *
	 * @param  string  $column
	 * @return mixed
	 */
	public function max($column);

	/**
	 * Retrieve the minimum value of a given column.
	 *
	 * @param  string  $column
	 * @return mixed
	 */
	public function min($column);

	/**
	 * Retrieve the average of the values of a given column.
	 *
	 * @param  string  $column
	 * @return mixed
	 */
	public function avg($column);

	/**
	 * Retrieve the sum of the values of a given column.
	 *
	 * @param  string  $column
	 * @return mixed
	 */
	public function sum($column);

	/**
	 * Increment a column's value by a given amount.
	 *
	 * @param  string  $column
	 * @param  int     $amount
	 * @param  array   $extra
	 * @return int
	 */
	public function increment($column, $interval = 1, $additional = array());

	/**
	 * Decrement a column's value by a given amount.
	 *
	 * @param  string  $column
	 * @param  int     $amount
	 * @param  array   $extra
	 * @return int
	 */
	public function decrement($column, $interval = 1, $additional = array());

	/**
	 * Insert a new record into the database.
	 *
	 * @param  array  $values
	 * @return bool
	 */
	public function insert(array $values);

	/**
	 * Delete a record from the database.
	 *
	 * @param  mixed  $id
	 * @return int
	 */
	public function delete();

	/**
	 * Returns the total number of records.
	 *
	 * @return int
	 */
	public function count();

	/**
	 * Returns an array of primary keys.
	 *
	 * @return array
{'fraction_non_alphanumeric': 0.12171507607192254, 'fraction_numerical': 0.0011065006915629322, 'mean_word_length': 2.7087179487179487, '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': '4739998', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1031, 'n_words': 389}