En este módulo se implementan utilidades comunes para todos los verbos
- Source:
Requires
- module:debug
- module:moment
Members
(static) N
Definición del número de celdas en la malla
- Source:
Methods
(static) getColumns(issource, nivel) → {string}
Se genera el filtro necesario para hacer consultas temporales
Parameters:
Name | Type | Description |
---|---|---|
issource |
boolean | True if it is specie |
nivel |
string | Taxonomic level |
- Source:
Returns:
Raw SQL column names
- Type
- string
(static) getParam(req, name, defaultValueopt) → {string}
Regresa el valor del parametro name
cuando este presente o
defaultValue
. Verifica los valores en el cuerpo de la petición, {"id":12},
y en el query, ej. ?id=12. Se utiliza BodyParser
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
req |
express.Request | Express request object |
|
name |
string | Parameter name |
|
defaultValue |
Mixed |
<optional> |
Returned default value if paramters is not defined |
- Source:
Returns:
- Type
- string
(static) getRasterCategories(tfilters_total) → {string}
Se genera el filtro necesario para hacer consultas temporales
Parameters:
Name | Type | Description |
---|---|---|
tfilters_total |
array | Array with filters |
- Source:
Returns:
Raw SQL columns names
- Type
- string
(static) getTimeCase(fecha_incio, fecha_fin, sfecha) → {integer}
Se genera el filtro necesario para hacer consultas temporales
Parameters:
Name | Type | Description |
---|---|---|
fecha_incio |
string | - |
fecha_fin |
string | - |
sfecha |
boolean | True if the registries without date are consider |
- Source:
Returns:
Temporal filter code
- Type
- integer
(static) processBioFilters(tfilters_total, spidopt) → {string}
Procesa los valores de tfilters_total
para crear el filtro de estos. Solo
se consideran los filtros bióticos.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
tfilters_total |
array | Express request object |
|
spid |
integer |
<optional> |
Specie identifier |
- Source:
Returns:
Raw SQL statement to filter
- Type
- string
(static) processDateRecords(lim_inf, lim_sup, sfecha) → {string}
Se genera el filtro necesario para hacer consultas temporales
Parameters:
Name | Type | Description |
---|---|---|
lim_inf |
string | Date string in format YYYY-MM-DD |
lim_sup |
string | Date string in format YYYY-MM-DD |
sfecha |
boolean | Indicates if the registers without dates are considered |
- Source:
Returns:
Raw SQL statement to filter
- Type
- string
(static) processRasterFilters(tfilters_total) → {string}
Procesa los valores de tfilters_total
para crear el filtro de estos. Solo
se consideran los filtros abióticos.
Parameters:
Name | Type | Description |
---|---|---|
tfilters_total |
array | Express request object |
- Source:
Returns:
Raw SQL statement to filter
- Type
- string
(static) processTitleGroup(groupid, tfilters) → {Object}
Se genera el filtro necesario para hacer consultas temporales
Parameters:
Name | Type | Description |
---|---|---|
groupid |
integer | Code for Biotic, Abiotic, Topographic variables |
tfilters |
integer | - |
- Source:
Returns:
- Type
- Object