<commit_before>-module(imem_adapter).
-author('<NAME> <<EMAIL>>').

-include("dderl.hrl").
-include("gres.hrl").

-include_lib("imem/include/imem_sql.hrl").

-export([ init/0
        , process_cmd/5
        , disconnect/1
        ]).

-record(priv, {connections = []}).

init() ->
    dderl_dal:add_adapter(imem, <<"IMEM DB">>),
    dderl_dal:add_connect(undefined,
                          #ddConn{ id = undefined
                                 , name = <<"local imem">>
                                 , owner = system
                                 , adapter = imem
                                 , access = [{ip, <<"local">>},
                                             {user, <<"admin">>},
                                             {port, <<>>},
                                             {type, local}]
                                 }),
    gen_adapter:add_cmds_views(undefined, system, imem, [
        { <<"All Tables">>
        , <<"select name(qname), size rows, memory from all_tables, ddSize where name = element(2, qname) order by qname asc">>
        , remote},
        { <<"All Views">>
        , <<"select
                c.owner,
                v.name
            from
                ddView as v,<commit_msg>Updated the all views view.<commit_after>-module(imem_adapter).
-author('<NAME> <<EMAIL>>').

-include("dderl.hrl").
-include("gres.hrl").

-include_lib("imem/include/imem_sql.hrl").

-export([ init/0
        , process_cmd/5
        , disconnect/1
        ]).

-record(priv, {connections = []}).

init() ->
    dderl_dal:add_adapter(imem, <<"IMEM DB">>),
    dderl_dal:add_connect(undefined,
                          #ddConn{ id = undefined
                                 , name = <<"local imem">>
                                 , owner = system
                                 , adapter = imem
                                 , access = [{ip, <<"local">>},
                                             {user, <<"admin">>},
                                             {port, <<>>},
                                             {type, local}]
                                 }),
    gen_adapter:add_cmds_views(undefined, system, imem, [
        { <<"All Tables">>
        , <<"select name(qname),size as rows, memory, nodef(expiry), nodef(ttl) from all_tables, ddSize where name = element(2,qname) and size <> undefined order by qname asc">>
        , remote},
        { <<"All Views">>
        , <<"select
                c.owner,
                v.name
            from
                ddView as v,
{'fraction_non_alphanumeric': 0.14537617554858934, 'fraction_numerical': 0.003134796238244514, 'mean_word_length': 1.1764705882352942, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3604464', 'n_tokens_mistral': 719, 'n_tokens_neox': 694, 'n_words': 139}