<commit_before><?php
/*
 * This file is part of the Indigo Dump package.
 *
 * (c) IndigoPHP Development Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Indigo\Dumper\Connector;

use Indigo\Dumper\Store\StoreInterface;

interface ConnectorInterface
{
    public function getHeader();

    public function getFooter();

    public function getTables();

    public function getViews();

    public function dumpTableSchema($table);

    public function dumpViewSchema($view);

    /**
     * Read all data from table if any
     *
     * This function should check for data and return false if empty
     *
     * @param  string $table
     * @return mixed Table data
     */
    public function readTableData($table);
    public function preDumpTableData($table);
    public function dumpTableData($table, $data, StoreInterface $store);
    public function postDumpTableData($table);
}<commit_msg>ConnectorInterface improved<commit_after><?php
/*
 * This file is part of the Indigo Dumper package.
 *
 * (c) IndigoPHP Development Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Indigo\Dumper\Connector;

use Indigo\Dumper\Store\StoreInterface;

/**
 * Database ConnectorInterface
 *
 * Handles connection to database and creates dump content
 *
 * @author <NAME> <<EMAIL>>
 */
interface ConnectorInterface
{
    /**
     * Get dump header
     *
     * @return string Dump
     */
    public function getHeader();

    /**
     * Get dump footer
     *
     * @return string Dump
     */
    public function getFooter();

    /**
     * Get list of tables
     *
     * @return array
     */
    public function getTables();

    /**
     * Get list of views
     *
     * @return array
     */
    public function getViews();

    /**
     * Dump table schema
     *
     * @param  string $table Table name
     * @return string Table schema
     */
    public function dumpTableSchema($table);

    /**
     * Dump view schema
     *
     * @param  string $view View name
     * @return string View schema
     */
    public function dumpViewSchema($view);

    /**
     * Read all data from table if any
     *
     * This function should check for data and return false if empty
     *
     * @param  string $table
     * @return mixed Table data
     */
    public function readTableData($table);

    /**
     * Run code before dumping data (locking table, etc)
     *
     * @param  string $table Table name
     * @return string Dump
     */
    public function preDumpTableData($table);

    /**
     * Dump table data
     *
     * @param  string         $table Table name
     * @param  mixed          $data  Data
     * @param  StoreInterface $store Store only passed here to ensure data is written
     */
    public function dumpTableData($table, $data, StoreInterface $store);

    /**
     * Run code after dumping data (unlocking table, etc)
     *
     * @param  string $table Table name
     * @return string Dump
     */
    public function postDumpTableData($table);
}
{'fraction_non_alphanumeric': 0.09051049170059505, 'fraction_numerical': 0.0, 'mean_word_length': 2.4755168661588685, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '929394', 'n_tokens_mistral': 872, 'n_tokens_neox': 856, 'n_words': 312}