Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
5001cem-DomesticRepairs/modules/list.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
33 lines (25 sloc)
802 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sqlite = require('sqlite-async') | |
module.exports = class List { | |
constructor(dbName = ':memory:') { | |
return (async() => { | |
this.db = await sqlite.open(dbName) | |
//we need this table to store the user track | |
const sql = 'CREATE TABLE IF NOT EXISTS uploadTrack\ | |
(id INTEGER PRIMARY KEY AUTOINCREMENT, singer_name TEXT, singer_details TEXT, description TEXT,image_url TEXT, Track_name TEXT;' | |
await this.db.run(sql) | |
return this | |
console.log("Track open") | |
})() | |
} | |
/** | |
* checks to see if a set of login credentials are valid | |
* @param {String} username the username to check | |
* @param {String} password the password to check | |
* @returns {Boolean} returns true if credentials are valid | |
*/ | |
async getAll() { | |
} | |
async tearDown() { | |
await this.db.close() | |
} | |
} |