### Home Classes Methods

### In Files

- lib/amalgalite/sqlite3/constants.rb

### Methods

- #name_from_value
- #value_from_name

### 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::Constants::Helpers

### Public Instance Methods

name_from_value( value ) click to toggle source

convert an integer value into the string representation of the associated constant. this is a helper method used by some of the other modules

    # File lib/amalgalite/sqlite3/constants.rb, line 12
    def name_from_value( value )
      unless defined? @const_map_from_value
        @const_map_from_value = {}
        constants.each do |const_name|
          c_int = const_get( const_name )
          @const_map_from_value[c_int] = const_name.to_s
        end
      end
      return @const_map_from_value[ value ]
    end

value_from_name( name ) click to toggle source

convert a string into the constant value. This is helper method used by some of the other modules

    # File lib/amalgalite/sqlite3/constants.rb, line 27
    def value_from_name( name )
      unless defined? @const_map_from_name
        @const_map_from_name = {}
        constants.each do |const_name|
          c_int = const_get( const_name )
          @const_map_from_name[ const_name.to_s ] = c_int
        end
      end
      return @const_map_from_name[ name.upcase ]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.