Skip to main content

Function: duplicateKeyFields()

duplicateKeyFields(err): string[] | undefined

Defined in: service-core/src/database/DatabaseErrors.ts:49

Best-effort extraction of the field names involved in a duplicate key error, for telling a primary key/version clash apart from a clash on some other unique column. Returns undefined when the driver's error doesn't say. The special value "PRIMARY" is returned when the driver only names the primary key (MySQL, a PostgreSQL PK_ constraint).

Parameters​

err​

any

Returns​

string[] | undefined