### Home Classes Methods

### In Files

- lib/amalgalite/sqlite3/database/status.rb

### Parent

Object

### Methods

- ::new
- #current
- #highwater
- #reset!

### Files

- HISTORY.rdoc
- LICENSE
- README.rdoc

### Class/Module Index

Quicksearch

- Amalgalite
- Amalgalite::Aggregate
- Amalgalite::Blob
- Amalgalite::Blob::Error
- Amalgalite::Boolean
- Amalgalite::BusyHandler
- Amalgalite::BusyTimeout
- Amalgalite::CSVTableImporter
- Amalgalite::Column
- Amalgalite::Database
- Amalgalite::Database::AggregateError
- Amalgalite::Database::BusyHandlerError
- Amalgalite::Database::FunctionError
- Amalgalite::Database::InvalidModeError
- Amalgalite::Database::ProgressHandlerError
- Amalgalite::Database::TransactionBehavior
- Amalgalite::Error
- Amalgalite::Function
- Amalgalite::Index
- Amalgalite::MemoryDatabase
- Amalgalite::Packer
- Amalgalite::Paths
- Amalgalite::ProfileSampler
- Amalgalite::ProfileTap
- Amalgalite::ProgressHandler
- Amalgalite::Requires
- Amalgalite::SQLite3
- Amalgalite::SQLite3::Constants
- Amalgalite::SQLite3::Constants::Config
- Amalgalite::SQLite3::Constants::DBStatus
- Amalgalite::SQLite3::Constants::DataType
- Amalgalite::SQLite3::Constants::Helpers
- Amalgalite::SQLite3::Constants::Open
- Amalgalite::SQLite3::Constants::ResultCode
- Amalgalite::SQLite3::Constants::StatementStatus
- Amalgalite::SQLite3::Constants::Status
- Amalgalite::SQLite3::Database
- Amalgalite::SQLite3::Database::DBStatus
- Amalgalite::SQLite3::Database::Function
- Amalgalite::SQLite3::Database::Stat
- Amalgalite::SQLite3::Stat
- Amalgalite::SQLite3::Status
- Amalgalite::SQLite3::Version
- Amalgalite::Schema
- Amalgalite::Statement
- Amalgalite::Table
- Amalgalite::Taps
- Amalgalite::Taps::IO
- Amalgalite::Taps::Stderr
- Amalgalite::Taps::Stdout
- Amalgalite::Taps::StringIO
- Amalgalite::TraceTap
- Amalgalite::TypeMap
- Amalgalite::TypeMaps
- Amalgalite::TypeMaps::DefaultMap
- Amalgalite::TypeMaps::StorageMap
- Amalgalite::TypeMaps::TextMap
- Amalgalite::Version
- Amalgalite::View
- Kernel
- Object

No matching classes.

# Amalgalite::SQLite3::Database::Stat

A Stat represents a single Database Status code and its current highwater mark.

Some stats may not have a current or a highwater value, in those cases the associated has_current? or has_highwater? method returns false and the current or highwater method also returns `nil`.

### Attributes

code[R]
name[R]

### Public Class Methods

new( api_db, name ) click to toggle source

    # File lib/amalgalite/sqlite3/database/status.rb, line 15
    def initialize( api_db, name )
      @name      = name
      @code      = ::Amalgalite::SQLite3::Constants::DBStatus.value_from_name( name )
      @current   = nil
      @highwater = nil
      @api_db    = api_db
    end

### Public Instance Methods

current() click to toggle source

    # File lib/amalgalite/sqlite3/database/status.rb, line 23
    def current
      update!
      return @current
    end

highwater() click to toggle source

    # File lib/amalgalite/sqlite3/database/status.rb, line 28
    def highwater
      update!
      return @highwater
    end

reset!() click to toggle source

reset the given stat's highwater mark. This will also populate the _@current_ and _@highwater_ instance variables

    # File lib/amalgalite/sqlite3/database/status.rb, line 37
    def reset!
      update!( true )
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.