Constructor
new PlatformRepository(db)
Parameters:
Name | Type | Description |
---|---|---|
db |
Database | sqlite connection |
Methods
(async) insert(platform)
Add a new platform to the DB
Parameters:
Name | Type | Description |
---|---|---|
platform |
Platform | platform to add |
Returns:
string sql response of the command
(async) selectAll() → {Array.<Platform>}
Get all Platforms in the Database
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 |
Returns:
Platform
(async) selectByName(name)
Get a platform by name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | name of the platform |
Returns:
Platform