Constructor
new Update()
Methods
data(object) → {this}
Updates all matching rows with the given object
Parameters:
| Name | Type | Description |
|---|---|---|
object | Object | The object with the data to update. Keys represent column names |
Returns:
- Type:
- this
(async) execute() → {Any}
Executes the prepared querry
Returns:
- Type:
- Any
force() → {this}
Enables update of all rows
Returns:
- Type:
- this
selectDatabase(database) → {this}
Selects a database for this query
Parameters:
| Name | Type | Description |
|---|---|---|
database | String | Name of the database |
Returns:
- Type:
- this
where(string, values) → {this}
Adds a where-clause to the query - Values should be set as ? in the string and given in left-to-right order via the 'values'-array to minimize the risk of sql-injection
Parameters:
| Name | Type | Description |
|---|---|---|
string | String | The where-clause as a string with ? representing each values. |
values | Array.<Any> | Array containing values replacing the ? in the string (from left to right) |
Returns:
- Type:
- this