Class: UserRepository

UserRepository(db)

DB Connection to the users Table

Constructor

new UserRepository(db)

Parameters:
Name Type Description
db Database sqlite connection
Source:

Methods

(async) insert(user)

Add a new user to the DB
Parameters:
Name Type Description
user User user to add
Source:
Returns:
string sql response of the command

(async) selectByUsername(username)

Get a user by his username
Parameters:
Name Type Description
username string username of the user
Source:
Returns:
string sql response of the command