/workspace/templates/location_update

The location_update layer query updates a record in the layer table identified where layer qID matches the provided id property.

The keys of the POST body are the field names. A key may only contain letters, numbers and underscores.

The values of the POST body are substituted as query params. A value is never written into the SQL string. The params are assigned with a body_ prefix, so a body key can't overwrite a param of the template, eg. the table.

Members

(inner, constant) FIELD

Field names [body keys] must be SQL identifiers.

Methods

(inner) checkField(field, layer)

Throws an error if the field name is not an SQL identifier. The field name is written into the SQL string.

Parameters:
NameTypeDescription
fieldstring

The field name from the POST body.

layerObject

The layer of the query.

(inner) isReserved(field, layer) → {boolean}

Returns true if the field is the layer qID or the id field. Unquoted identifiers are case-insensitive in Postgres, so the comparison is case-insensitive.

Parameters:
NameTypeDescription
fieldstring

The field name from the POST body.

layerObject

The layer of the query.

Returns:

The field is reserved.

Type: 
boolean