new BaseLZAdapter(config, limit_fieldsopt)
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
object |
Properties
|
|||||||||||||||||||||||||||
limit_fields |
Array.<String> |
<optional> |
null | If an API returns far more data than is needed, this can be used to simplify the payload by excluding unused fields. This can help to reduce memory usage for really big server responses like LD. |
- Source:
Methods
_findPrefixedKey(a_record, fieldname)
Convenience method, manually called in LZ sources that deal with dependent data.
In the last step of fetching data, LZ adds a prefix to each field name. This means that operations like "build query based on prior data" can't just ask for "log_pvalue" because they are receiving "assoc:log_pvalue" or some such unknown prefix.
This helper lets us use dependent data more easily. Not every adapter needs to use this method.
Parameters:
Name | Type | Description |
---|---|---|
a_record |
Object | One record (often the first one in a set of records) |
fieldname |
String | The desired fieldname, eg "log_pvalue" |
- Source: