<commit_before>export class PouchdbProxy {

    constructor(private rdy: Promise<any>) { }

    public switchDb(rdy: Promise<any>) {
        this.rdy = rdy;
    }

    public ready() {
        return this.rdy;
    }

    public put(document, options?): Promise<any> {
        return this.rdy.then(db => db.put(document, options));
    }

    public remove(document, revisionId?): Promise<any> {
        return this.rdy.then(db => db.remove(document, revisionId));
    }

    public query(index, opts): Promise<any> {
        return this.rdy.then(db => db.query(index, opts));
    }

    public sync(url, opts): Promise<any> {
        return this.rdy.then(db => db.sync(url, opts));
    }

    public get(id, opts={}): Promise<any> {
        return this.rdy.then(db => db.get(id, opts));
    }

    public changes(opts): Promise<any> {
        return this.rdy.then(db => db.changes(opts));
    }

    public putAttachment(docId, attachmentId, rev, attachment, type): Promise<any> {
        return this.rdy.then(db => db.putAttachment(docId, attachmentId, rev, attachment, type));
    }

    public getAttachment(docId, attachmentId): Promise<any> {
        return this.rdy.then(db => db.getAttachment(docId, attachmentId));
    }

    public removeAttachment(docId, attachmentId, rev): Promise<any> {
        return this.rdy.then(db => db.removeAttachment(docId, attachmentId, rev));
    }

}<commit_msg>refactor for style; add author<commit_after>/**
 * @author <NAME>
 */
export class PouchdbProxy {

    constructor(private rdy: Promise<any>) {

    }

    public switchDb(rdy: Promise<any>) { // TODO remove unused

        this.rdy = rdy;
    }

    public ready() {

        return this.rdy;
    }

    public put(document, options?): Promise<any> {

        return this.rdy.then(db => db.put(document, options));
    }

    public remove(document, revisionId?): Promise<any> {

        return this.rdy.then(db => db.remove(document, revisionId));
    }

    public query(index, opts): Promise<any> {

        return this.rdy.then(db => db.query(index, opts));
    }

    public sync(url, opts): Promise<any> {

        return this.rdy.then(db => db.sync(url, opts));
    }

    public get(id, opts={}): Promise<any> {

        return this.rdy.then(db => db.get(id, opts));
    }

    public changes(opts): Promise<any> {

        return this.rdy.then(db => db.changes(opts));
    }

    public putAttachment(docId, attachmentId, rev, attachment, type): Promise<any> {

        return this.rdy.then(db => db.putAttachment(docId, attachmentId, rev, attachment, type));
    }

    public getAttachment(docId, attachmentId): Promise<any> {

        return this.rdy.then(db => db.getAttachment(docId, attachmentId));
    }

    public removeAttachment(docId, attachmentId, rev): Promise<any> {

        return this.rdy.then(db => db.removeAttachment(docId, attachmentId, rev));
    }

}
{'fraction_non_alphanumeric': 0.1496363006581226, 'fraction_numerical': 0.0, 'mean_word_length': 2.9239130434782608, 'pattern_counts': {'":': 0, '<': 26, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4867055', 'n_tokens_mistral': 950, 'n_tokens_neox': 924, 'n_words': 196}