trait HasConversationPartition

Methods

static void
bootHasConversationPartition()

Boot the conversation partition global scope.

bool
performInsert(Builder $query)

Populate the conversation partition before model creation events run.

bool
performInsertOrIgnore(Builder $query, array|string|null $uniqueBy)

Populate the conversation partition before an insert that ignores unique conflicts.

void
setConversationPartitionForInsert()

Stamp the current partition before either model insertion path runs its listeners.

array
getAttributesForInsert()

Get the authoritative attributes for a partitioned insert.

setKeysForSaveQuery(Builder $query)

Add the conversation partition to an existing model write query.

setKeysForSelectQuery(Builder $query)

Add the conversation partition to an existing model select query.

newQueryForRestoration(array|int|string $ids)

Create a partitioned query for queued model restoration.

void
ensureConversationRelationshipPartition()

Check a stored relationship owner without resolving a partition for eager-load prototypes.

void
ensureModelMatchesConversationPartition(ConversationPartition $partition)

Reject a model that does not belong to the current conversation partition.

Details

at line 17
static void bootHasConversationPartition()

Boot the conversation partition global scope.

Return Value

void

at line 25
protected bool performInsert(Builder $query)

Populate the conversation partition before model creation events run.

Parameters

Builder $query

Return Value

bool

at line 35
protected bool performInsertOrIgnore(Builder $query, array|string|null $uniqueBy)

Populate the conversation partition before an insert that ignores unique conflicts.

Parameters

Builder $query
array|string|null $uniqueBy

Return Value

bool

at line 45
protected void setConversationPartitionForInsert()

Stamp the current partition before either model insertion path runs its listeners.

Return Value

void

at line 61
protected array getAttributesForInsert()

Get the authoritative attributes for a partitioned insert.

Return Value

array

at line 78
protected Builder setKeysForSaveQuery(Builder $query)

Add the conversation partition to an existing model write query.

Parameters

Builder $query

Return Value

Builder

at line 102
protected Builder setKeysForSelectQuery(Builder $query)

Add the conversation partition to an existing model select query.

Parameters

Builder $query

Return Value

Builder

at line 122
Builder newQueryForRestoration(array|int|string $ids)

Create a partitioned query for queued model restoration.

Parameters

array|int|string $ids

Return Value

Builder

at line 135
protected void ensureConversationRelationshipPartition()

Check a stored relationship owner without resolving a partition for eager-load prototypes.

Return Value

void

at line 145
protected void ensureModelMatchesConversationPartition(ConversationPartition $partition)

Reject a model that does not belong to the current conversation partition.

Parameters

ConversationPartition $partition

Return Value

void