Get a table as a list of ntspRecords
getTableAsRecords.RdThe table is retrieved as `list` of `ntspRecord`s or subclass thereof. The `recordConstructor` can be used to make a subclass, e.g., to make `msrawfilesRecord`s use `newMsrawfilesRecord`. The default makes the generic `ntspRecord`.
Usage
getTableAsRecords(
dbComm,
tableName,
searchBlock = list(),
fields = "*",
sortField = "no-sort",
recordConstructor = newNtspRecord
)Arguments
- dbComm
DbComm connection object
- tableName
Name of table in database, wildcards are permitted
- searchBlock
list coercible to json for Elasticsearch Search API (Query DSL)
- fields
Fields to include in the response, wildcards are permitted, default is all fields.
- sortField
field by which to sort the results, length-one character (optionally preceded by '-') or list, see https://elasticsearch-dsl.readthedocs.io/en/stable/api.html#elasticsearch_dsl.Search.sort
- recordConstructor
function to construct new records