@terascope/standard-asset-apis / routers/FieldRouter / FieldRouter
Class: FieldRouter
Defined in: routers/FieldRouter.ts:8
A routing algorithm that uses specific field values from a record (and optional the key can include the field names)
Implements
Constructors
Constructor
new FieldRouter(
config
):FieldRouter
Defined in: routers/FieldRouter.ts:15
Parameters
Parameter | Type |
---|---|
config | FieldRouterConfig |
Returns
FieldRouter
Properties
Property | Modifier | Type | Default value | Defined in |
---|---|---|---|---|
fieldDelimiter | readonly | string | undefined | routers/FieldRouter.ts:11 |
fields | readonly | readonly string [] | undefined | routers/FieldRouter.ts:13 |
includeFieldNames | readonly | boolean | undefined | routers/FieldRouter.ts:12 |
kind | readonly | STORAGE | I.RouterKind.STORAGE | routers/FieldRouter.ts:9 |
valueDelimiter | readonly | string | undefined | routers/FieldRouter.ts:10 |
Methods
lookup()
lookup(
record
):string
Defined in: routers/FieldRouter.ts:25
When called this uses the routing algorithm to return the route to use, which usually is a string|number with meaning to the application (like where to write the record to)
Parameters
Parameter | Type |
---|---|
record | DataEntity |
Returns
string