Constructor
new UserRepository(db)
Parameters:
Name | Type | Description |
---|---|---|
db |
Database | sqlite connection |
Methods
(async) insert(user)
Add a new user to the DB
Parameters:
Name | Type | Description |
---|---|---|
user |
User | user to add |
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 |
Returns:
string sql response of the command