This is a follow-up task for the proposal outlined in loopbackio/loopback-next#2712.
Implement a helper functions in base Connector class to process index and foreign-key definitions in an unified way and convert them into data suitable for consumption by connector implementations. The helpers should gather both model-level and property-level definitions, apply database/connector-specific options, merge keys/properties fields in index definitions, etc. and produce a final definition that can be directly mapped to database commands.
See _SPIKE_.md in loopbackio/loopback-next#2712 for the full description of index/PK definition syntax.
This is a prerequisite for implementation of indexes & foreign keys in other connectors, most notably memory connector (loopbackio/loopback-next#2333) and SqlConnector (https://github.com/strongloop/loopback-connector-rest/issues/135)
Acceptance criteria
This is a follow-up task for the proposal outlined in loopbackio/loopback-next#2712.
Implement a helper functions in base
Connectorclass to process index and foreign-key definitions in an unified way and convert them into data suitable for consumption by connector implementations. The helpers should gather both model-level and property-level definitions, apply database/connector-specific options, merge keys/properties fields in index definitions, etc. and produce a final definition that can be directly mapped to database commands.See
_SPIKE_.mdin loopbackio/loopback-next#2712 for the full description of index/PK definition syntax.This is a prerequisite for implementation of indexes & foreign keys in other connectors, most notably memory connector (loopbackio/loopback-next#2333) and
SqlConnector(https://github.com/strongloop/loopback-connector-rest/issues/135)Acceptance criteria