sociam / xray

X-ray project - information controller transparency tools.
7 stars 2 forks source link

db.js exports to class. #25

Closed AdamSlack closed 7 years ago

AdamSlack commented 7 years ago

Update DB.js to export class with constructor that will accept a DB option for correct DB interface permissions.

class DB {
    constructor(dbOption) {
        // initialise pool here.
    }

    async getStaleSearchTerms() {

    }

    async updateLastSearchedDate(searchTerm) {

    }

    async insertSearchTerm(searchTerm) {

    }

    async doesAppExist(app) {

    }

    async insertPlayApp(app, region) {

    }
}
sauyon commented 7 years ago

Should be done in 2e1cd2c7a6a856dedcb7d513458628ec915971e6

AdamSlack commented 7 years ago

This is implemented fully.