(pks: (string | Buffer | Date)[])
| 516 | } |
| 517 | |
| 518 | static getPrimaryKeyHash(pks: (string | Buffer | Date)[]): string { |
| 519 | return pks |
| 520 | .map(pk => { |
| 521 | if (Buffer.isBuffer(pk)) { |
| 522 | return pk.toString('hex'); |
| 523 | } |
| 524 | |
| 525 | if (pk instanceof Date) { |
| 526 | return pk.toISOString(); |
| 527 | } |
| 528 | |
| 529 | return pk; |
| 530 | }) |
| 531 | .join(this.PK_SEPARATOR); |
| 532 | } |
| 533 | |
| 534 | static splitPrimaryKeys<T extends object>(key: string): EntityKey<T>[] { |
| 535 | return key.split(this.PK_SEPARATOR) as EntityKey<T>[]; |
no test coverage detected