Skip to main content
Version: 13 - TBD

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 = false re-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 = true marks 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_id is 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_read and refreshes read_at.

Parameters

NameTypeDescription
allow_deletedbool
allow_normalbool
bystr
clsOptional
commitbool
debugboolif set, the content of the data being written will be logged.
initOptional
is_readUnionThe 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_idUnionReference to the comment that was read.
selectOptional

Constants

RESOURCE = record_comment_read

Methods

clone

delete

duplicate

exists

export

get

get_dict

identity

record_comment

restore

save