Class: UserPlatformRepository

UserPlatformRepository(db)

DB Connection to the userPlatformMapping Table

Constructor

new UserPlatformRepository(db)

Parameters:
Name Type Description
db Database sqlite connection
Source:

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
Source:
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
Source:
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
Source:
Returns:
Type
UserPlatform