Class: Amalgalite::Database::TransactionBehavior

Inherits:
Object
  • Object
show all
Defined in:
lib/amalgalite/database.rb

Overview

container class for holding transaction behavior constants. These are the SQLite values passed to a START TRANSACTION SQL statement.

Constant Summary collapse

DEFERRED =

no read or write locks are created until the first statement is executed that requries a read or a write

"DEFERRED"
IMMEDIATE =

a readlock is obtained immediately so that no other process can write to the database

"IMMEDIATE"
EXCLUSIVE =

a read+write lock is obtained, no other proces can read or write to the database

"EXCLUSIVE"
VALID =

list of valid transaction behavior constants

[ DEFERRED, IMMEDIATE, EXCLUSIVE ]

Class Method Summary collapse

Class Method Details

.valid?(mode) ⇒ Boolean

is the given mode a valid transaction mode

Returns:



76
77
78
# File 'lib/amalgalite/database.rb', line 76

def self.valid?( mode )
  VALID.include? mode
end