<commit_before><?php namespace App\Lib\Database;
include('_inc.php');

use Oppa\Database;

$cfg = [
    'agent'    => 'pgsql',
    'database' => [
        'host'     => 'localhost',  'name'     => 'test',
        'username' => 'test',       'password' => '********',
        'charset'  => 'utf8',       'timezone' => '+00:00',
    ],
    'fetch_type' => User::class,
    'fetch_limit' => 1,
    'map_result' => true,
    'map_result_bool' => true,
];

$db = new Database($cfg);
$db->connect();

$agent = $db->getLink()->getAgent();

class User {}

$result = $agent->query("select * from users");
// $result = $agent->query("select * from users", null, null, User::class);
prd($result->getData());

<commit_msg>Tests..<commit_after><?php namespace App\Lib\Database;
include('_inc.php');

use Oppa\Database;

$cfg = [
    'agent'    => 'pgsql',
    'database' => [
        'host'     => 'localhost',  'name'     => 'test',
        'username' => 'test',       'password' => '********',
        'charset'  => 'utf8',       'timezone' => '+00:00',
    ],
    // 'fetch_type' => User::class,
    // 'fetch_limit' => 1,
    'map_result' => true,
    'map_result_bool' => true,
];

$db = new Database($cfg);
$db->connect();

$agent = $db->getLink()->getAgent();

class User {}

$result = $agent->query("select * from users");
// $result = $agent->query("select * from users", null, 1, User::class);
prd($result->getData());


{'fraction_non_alphanumeric': 0.24700070571630206, 'fraction_numerical': 0.009174311926605505, 'mean_word_length': 3.03988603988604, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, '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': '2169506', 'n_tokens_mistral': 509, 'n_tokens_neox': 502, 'n_words': 98}