Class: PlatformRepository

PlatformRepository(db)

DB Connection to the platforms Table

Constructor

new PlatformRepository(db)

Parameters:
Name Type Description
db Database sqlite connection
Source:

Methods

(async) insert(platform)

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

(async) selectAll() → {Array.<Platform>}

Get all Platforms in the Database
Source:
Returns:
sql response of the command
Type
Array.<Platform>

(async) selectByID(id)

Get a platform by id
Parameters:
Name Type Description
id string id of the platform
Source:
Returns:
Platform

(async) selectByName(name)

Get a platform by name
Parameters:
Name Type Description
name string name of the platform
Source:
Returns:
Platform