<commit_before>export interface Options {
    host: string
    port: int
    database: string
    user: string
    password: string

    autoReconnect?: boolean
    characterEncoding?: string
    useSSL?: boolean
}

interface ConnectionImpl {
    ensureTable(tableName: string)
    ensureColumn(tableName: string, columnName: string, columnType: string)
    ensurePrimaryKey(tableName: string, columnName: string)
    ensureIndex(tableName: string, columnNames: string[])
    ensureUniqueIndex(tableName: string, columnNames: string[])
    one<T>(sql: string, parameters: any[]): T | null
    list<T>(sql: string, parameters: any[]): T[]
    save(tableName: string, obj: any, primary: string)
    execute(sql: string, parameters: any[])
    close()
}

export default ConnectionImpl<commit_msg>Define interface Client<commit_after>export interface Options {
    host: string
    port: int
    database: string
    user: string
    password: string

    autoReconnect?: boolean
    characterEncoding?: string
    useSSL?: boolean
}

export interface Client {
    // Key-value store
    getInt(key: string): number | null
    getInt(bucket: string, key: string): number | null
    getFloat(key: string): number | null
    getFloat(bucket: string, key: string): number | null
    getString(key: string): string | null
    getString(bucket: string, key: string): string | null
    getJSON(key: string): any | null
    getJSON(bucket: string, key: string): any | null
    setInt(key: string, value: number, ttl?: number)
    setInt(bucket: string, key: string, value: number, ttl?: number)
    setFloat(key: string, value: number, ttl?: number)
    setFloat(bucket: string, key: string, value: number, ttl?: number)
    setString(key: string, value: string, ttl?: number)
    setString(bucket: string, key: string, value: string, ttl?: number)
    setJSON(key: string, json: any, ttl?: number)
    setJSON(bucket: string, key: string, json: any, ttl?: number)

    // RDBMS
    ensureTable(table: string, pkey: string, type: string)
    ensureColumn(table: string, column: string, type: string)
    ensureIndex(table: string, columns: string[])
    ensureUniqueIndex(table: string, columns: string[])
    one<T>(sql: string, parameters?: any[]): T | null
    list<T>(sql: string, parameters?: any[]): T[]
    insert(table: string, object: any)
    update(table: string, object: any)
    save(table: string, object: any)
    execute(sql: string, parameters?: any[])

    // Object store
    get(key: string): java.lang.Byte[]
    get(bucket: string, key: string): java.lang.Byte[]
    put(key: string, data: java.lang.Byte[], ttl?: number)
    put(bucket: string, key: string, data: java.lang.Byte[], ttl?: number)

    delete(table: string, key: any)
    delete(bucket: string, key: string)
    close()
}
{'fraction_non_alphanumeric': 0.12973552537526806, 'fraction_numerical': 0.0, 'mean_word_length': 3.9982142857142855, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4350524', 'n_tokens_mistral': 833, 'n_tokens_neox': 826, 'n_words': 268}