Constructor
new UserPlatformRepository(db)
Parameters:
Name | Type | Description |
---|---|---|
db |
Database | sqlite connection |
Methods
(async) insert(userPlatform)
Add a new mapping from user to username of a platform
Parameters:
Name | Type | Description |
---|---|---|
userPlatform |
UserPlatform | mapping from user to username of the platform |
Returns:
string sql response of the command
(async) selectAllByUsername(username) → {Array.<UserPlatform>}
Get all UserPlatform from a User
Parameters:
Name | Type | Description |
---|---|---|
username |
string | name of the user |
Returns:
- Type
- Array.<UserPlatform>
(async) selectUsernameOfPlatform(username, platform) → {UserPlatform}
Get the UserPlatform for one user to one platform
Parameters:
Name | Type | Description |
---|---|---|
username |
string | name of the user |
platform |
Platform | platform to search |
Returns:
- Type
- UserPlatform