<commit_before><?php
/**
 * Console Controller
 */

namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\Console\Request as ConsoleRequest;
use Zend\Db\Adapter\Adapter;
use RuntimeException;


class ConsoleController extends AbstractActionController
{
    /**
     * Simple console test action
     **/
    public function indexAction()
    {
        $request = $this->getRequest();

        if ( ! $request instanceof ConsoleRequest){
            throw new RuntimeException('FATAL ERROR: Tried to use console action in a non-console context');
        }

        echo "\nYou're console controller is working correctly. Good job.\n\n";

        $db = $this->getServiceLocator()->get('db');

        $sql = "
            SELECT *
            FROM role
        ";

        $statement = $db->query($sql);
        $rows = $statement->execute();

        foreach ($rows as $row) {
            echo implode(", ", $row) . "\n";
        }
    }

    /**
     * 
     **/
    public function loadSqliteAction()
    {<commit_msg>Added data types to debugging action<commit_after><?php
/**
 * Console Controller
 */

namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\Console\Request as ConsoleRequest;
use Zend\Db\Adapter\Adapter;
use RuntimeException;


class ConsoleController extends AbstractActionController
{
    /**
     * Simple console test action
     **/
    public function indexAction()
    {
        $request = $this->getRequest();

        if ( ! $request instanceof ConsoleRequest){
            throw new RuntimeException('FATAL ERROR: Tried to use console action in a non-console context');
        }

        $db = $this->getServiceLocator()->get('db');

        $sql = "
            SELECT *
            FROM role
        ";

        $statement = $db->query($sql);
        $rows = $statement->execute();

        echo "roles\n";
        foreach ($rows as $row) {
            echo implode(", ", $row) . "\n";
        }

        $sql = "
            SELECT *
            FROM data_type
        ";

        $statement = $db->query($sql);
        $rows = $statement->execute();

        echo "data_types\n";
        foreach ($rows as $row) {
            echo implode(", ", $row) . "\n";
        }
    }

    /**
     * 
     **/
    public function loadSqliteAction()
    {
{'fraction_non_alphanumeric': 0.12875900042354935, 'fraction_numerical': 0.0, 'mean_word_length': 2.0359897172236505, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '2653684', 'n_tokens_mistral': 656, 'n_tokens_neox': 631, 'n_words': 166}