class

Ralph::Query::LockClause

Inherits Reference / Object

Represents a row-level locking clause (FOR UPDATE, FOR SHARE, etc.)

Used for pessimistic locking in concurrent environments.

Lock Modes

  • :update - Exclusive lock (FOR UPDATE)
  • :share - Shared lock (FOR SHARE)
  • :no_key_update - FOR NO KEY UPDATE (PostgreSQL)
  • :key_share - FOR KEY SHARE (PostgreSQL)

Options

  • :nowait - Fail immediately if lock cannot be acquired
  • :skip_locked - Skip rows that are already locked

Constructors

new(mode : Mode = Mode::Update, option : Option = Option::None, tables : Array(String) = [] of String)
Source

Instance methods

mode
Source
option
Source
tables
Source
to_sql
Source

Nested types