RecordCommentRead
class flow_api.record_comment_read.RecordCommentRead(select=None, cls=None, init=None, by='id', allow_normal=True, allow_deleted=False, commit=False, is_read=<class 'flow_api.system.NotSet'>, record_comment_id=<class 'flow_api.system.NotSet'>, debug=False)
Base class: Row
Per-identity read-state OVERRIDE for a single record_comment.
Read state has two layers. The record-level record_comment_watermark
holds the default: a comment is read by an identity when it is at or before
that identity's read_until point for the record. This table stores the
sparse per-comment EXCEPTIONS to that default:
is_read = falsere-flags one specific comment as unread even though it is at or before the watermark (the email-style "keep this one on my to-action list" behaviour).is_read = truemarks one specific comment read even though it is after the watermark (read a single newer comment without advancing the watermark past everything before it).
A row exists only when an identity has explicitly overridden the watermark
for that comment; the common case (no override) stores nothing, so storage
stays O(records x readers) plus a handful of override rows rather than
O(comments x readers). The marker's identity_id is always the acting
identity — a caller can only set their own read state.
Permission contract:
- create / update: caller needs READ on the parent comment;
identity_idis forced to the acting identity (never taken from the request body). The UNIQUE(record_comment_id, identity_id) constraint keeps it one row per (comment, identity), so a repeated override on the same comment updates the existing row. - read / update / delete: only the owning identity (identity_id == caller),
or an internal caller. Deleting a row drops the override, returning the
comment to its watermark default; updating flips
is_readand refreshesread_at.
Parameters
| Name | Type | Description |
|---|---|---|
| allow_deleted | bool | |
| allow_normal | bool | |
| by | str | |
| cls | Optional | |
| commit | bool | |
| debug | bool | if set, the content of the data being written will be logged. |
| init | Optional | |
| is_read | Union | The overridden read state for this comment: true = explicitly read, false = explicitly unread. Overrides the record-level read_until watermark for this single comment. Defaults to true so a legacy store-when-read marker (a row created without this field) counts as read. |
| record_comment_id | Union | Reference to the comment that was read. |
| select | Optional |