harp_apps.storage.models.blobs¶
- class Blob[source]¶
Bases:
BaseA simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- __init__(**kwargs)¶
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
- content_type¶
- created_at¶
- data¶
- id¶
- class BlobsRepository[source]¶
Bases:
Repository[Blob]- select_orphans()[source]¶
The ids delete_orphans would remove.
Deleting blobs with a bulk statement leaves anything caching their existence, such as SqlBlobStorage.seen, believing rows are there that are not. The caller needs to know which ids went, so the count, the selection and the deletion all read from one definition of “orphan” and cannot drift apart.