Constructor
new TermController()
Create a term controller.
- Source:
Methods
(async) byId(id) → {Promise:.<object:>}
Get an term by id.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
number |
- Source:
Returns:
(async) byTermText(term) → {Promise:.<object:>}
Get an term by the term's text.
Parameters:
| Name | Type | Description |
|---|---|---|
term |
string |
- Source:
Returns:
(async) insert(term) → {Promise:.<object:>}
Insert a term.
Parameters:
| Name | Type | Description |
|---|---|---|
term |
string |
- Source:
Returns:
(async) insertMany(terms) → {Promise:.<Array:.<number:>>}
Insert many terms.
Parameters:
| Name | Type | Description |
|---|---|---|
terms |
Array:.<string:> |
- Source:
Returns:
(async) linkTermBook(termId, bookId) → {Promise:.<void:>}
Link a term to a book.
Parameters:
| Name | Type | Description |
|---|---|---|
termId |
number | |
bookId |
number |
- Source: