<commit_before>// Type definitions for mariasql v0.1.22
// Project: https://github.com/mscdex/node-mariasql
// Definitions by: MichaelBennett <https://github.com/bennett000>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace mariasql {
    export interface MariaCallBackError {
        (error:Error):void
    }

    export interface MariaCallBackResult {
        (result:MariaResult):void
    }

    export interface MariaCallBackRow {
        (result:Array<any>):void
    }

    export interface MariaCallBackBoolean {
        (result:boolean):void
    }

    export interface MariaCallBackObject {
        (result:Object):void
    }

    export interface MariaCallBackInfo {
        (result:MariaInfo):void
    }

    export interface MariaCallBackVoid {
        ():void
    }

    export interface Dictionary {
        [index: string]: any;
    }

    export interface MariaInfo {
        affectedRows: number;
        insertId: number;
        numRows: number
    }

    export interface MariaPreparedQuery {
        (values:Dictionary):string;
        (values:Array<any>):string;
    }

    export interface ClientConfig {
        host: string;
        user: string;
        password: string;
        db?: string;
        port?: number;
        unixSocket?: string;
        keepQueries?: boolean;
        multiStatements?: boolean;
        connTimeout?: number;
        pingInterval?: number;
        secureAuth?: boolean;
        compress?: boolean;
        ssl?:any;
        local_infile?: boolean;
        read_default_group?: string;
        charset?: string;
    }

    export interface MariaResult {
        on(signal:'end', cb:MariaCallBackInfo):MariaResult;
        on(signal:'error', cb:MariaCallBackError):MariaResult;
        on(signal:'row', cb:MariaCallBackRow):MariaResult;
        on(signal:'abort', cb:MariaCallBackVoid):MariaResult;
        on(signal:string, cb:MariaCallBackVoid):MariaResult;
        abort():void;
    }

    export interface MariaQuery {
        on(signal:'result', cb:MariaCallBackResult):MariaQuery;
        on(signal:'end', cb:MariaCallBackVoid):MariaQuery;
        on(signal:'abort', cb:MariaCallBackVoid):MariaQuery;
        on(signal:'error', cb:MariaCallBackError):MariaQuery;
        on(signal:string, cb:MariaCallBackVoid):MariaQuery;
        abort():void;
    }

    export interface MariaClient {
        connect(config:ClientConfig):void;
        end():void;
        destroy():void;
        escape(query:string):string;
        query(q:string, placeHolders?:Dictionary, useArray?:boolean):MariaQuery;
        query(q:string, placeHolders?:Array<any>, useArray?:boolean):MariaQuery;
        query(q:string, useArray?:boolean):MariaQuery;
        prepare(query:string): MariaPreparedQuery;
        isMariaDB():boolean;
        on(signal:'error', cb:MariaCallBackError): MariaClient;
        on(signal:'close', cb:MariaCallBackObject): MariaClient;
        on(signal:'connect', cb:MariaCallBackVoid): MariaClient;
        on(signal:string, cb:MariaCallBackVoid): MariaClient;
        connected: boolean;
        threadId: string;
    }

    export interface Client {
        new ():MariaClient;
        ():MariaClient;
        prototype: MariaClient;
    }
}

declare var Client:mariasql.Client;
export = Client;<commit_msg>mariasql: Fix export and namespace (#35149)<commit_after>// Type definitions for mariasql v0.1.23
// Project: https://github.com/mscdex/node-mariasql
// Definitions by: MichaelBennett <https://github.com/bennett000>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare var mariasql: mariasql.Client;

export = mariasql;
export as namespace mariasql;

declare namespace mariasql {
    export interface MariaCallBackError {
        (error:Error):void
    }

    export interface MariaCallBackResult {
        (result:MariaResult):void
    }

    export interface MariaCallBackRow {
        (result:Array<any>):void
    }

    export interface MariaCallBackBoolean {
        (result:boolean):void
    }

    export interface MariaCallBackObject {
        (result:Object):void
    }

    export interface MariaCallBackInfo {
        (result:MariaInfo):void
    }

    export interface MariaCallBackVoid {
        ():void
    }

    export interface Dictionary {
        [index: string]: any;
    }

    export interface MariaInfo {
        affectedRows: number;
        insertId: number;
        numRows: number
    }

    export interface MariaPreparedQuery {
        (values:Dictionary):string;
        (values:Array<any>):string;
    }

    export interface ClientConfig {
        host: string;
        user: string;
        password: string;
        db?: string;
        port?: number;
        unixSocket?: string;
        keepQueries?: boolean;
        multiStatements?: boolean;
        connTimeout?: number;
        pingInterval?: number;
        secureAuth?: boolean;
        compress?: boolean;
        ssl?:any;
        local_infile?: boolean;
        read_default_group?: string;
        charset?: string;
    }

    export interface MariaResult {
        on(signal:'end', cb:MariaCallBackInfo):MariaResult;
        on(signal:'error', cb:MariaCallBackError):MariaResult;
        on(signal:'row', cb:MariaCallBackRow):MariaResult;
        on(signal:'abort', cb:MariaCallBackVoid):MariaResult;
        on(signal:string, cb:MariaCallBackVoid):MariaResult;
        abort():void;
    }

    export interface MariaQuery {
        on(signal:'result', cb:MariaCallBackResult):MariaQuery;
        on(signal:'end', cb:MariaCallBackVoid):MariaQuery;
        on(signal:'abort', cb:MariaCallBackVoid):MariaQuery;
        on(signal:'error', cb:MariaCallBackError):MariaQuery;
        on(signal:string, cb:MariaCallBackVoid):MariaQuery;
        abort():void;
    }

    export interface MariaClient {
        connect(config:ClientConfig):void;
        end():void;
        destroy():void;
        escape(query:string):string;
        query(q:string, placeHolders?:Dictionary, useArray?:boolean):MariaQuery;
        query(q:string, placeHolders?:Array<any>, useArray?:boolean):MariaQuery;
        query(q:string, useArray?:boolean):MariaQuery;
        prepare(query:string): MariaPreparedQuery;
        isMariaDB():boolean;
        on(signal:'error', cb:MariaCallBackError): MariaClient;
        on(signal:'close', cb:MariaCallBackObject): MariaClient;
        on(signal:'connect', cb:MariaCallBackVoid): MariaClient;
        on(signal:string, cb:MariaCallBackVoid): MariaClient;
        connected: boolean;
        threadId: string;
    }

    export interface Client {
        new ():MariaClient;
        ():MariaClient;
        prototype: MariaClient;
    }
}
{'fraction_non_alphanumeric': 0.11146020347097546, 'fraction_numerical': 0.0028426092160383004, 'mean_word_length': 2.93698468786808, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, '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': '5800048', 'n_tokens_mistral': 1953, 'n_tokens_neox': 1858, 'n_words': 357}