projectrow

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package projectrow records, for the life of a transaction, the projects whose row it locked FOR NO KEY UPDATE, the lock every write of a project takes so that the project's writes run one at a time. The row itself cannot tell: a transaction that only inserted a row referencing the project leaves its id in the project row through the key share lock of the foreign key check, which keeps no other write out.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Held

func Held(ctx context.Context, project workspace.ProjectID) bool

Held reports whether the transaction ctx carries has locked project's row FOR NO KEY UPDATE.

func MarkHeld

func MarkHeld(ctx context.Context, project workspace.ProjectID)

MarkHeld records that the transaction ctx carries has locked project's row FOR NO KEY UPDATE. Outside a transaction a lock ends with its statement, and nothing is recorded.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL