HomeSoftware Heritage

Add a 'unique_key' method on model objects

Description

Add a 'unique_key' method on model objects

that returns a value suitable for unicity constraints.

Motivation:

  • this is somewhat more of a model concern than a journal/kafka concern IMO
  • this is one step toward adding support for non-model objects in KafkaJournalWriter

Implementation of the unique_key methods comes from
swh.journal.serializers.object_key.

Details

Provenance
vlorentzAuthored on Sep 29 2020, 2:08 PM
vlorentzPushed on Oct 12 2020, 12:16 PM
Differential Revision
D4078: Add a 'unique_key' method on model objects
Parents
rDMODbdfde828453a: cli: make SWHIDParamType return SWHID type instead of string
Branches
Unknown
Tags
Unknown
References
tag: v0.7.1
Build Status
Buildable 16157
Build 24853: test-and-buildJenkins console · Jenkins