Module: Momomoto::Information_schema
- Defined in:
- lib/momomoto/information_schema/columns.rb,
lib/momomoto/information_schema.rb,
lib/momomoto/information_schema/fetch_procedure_columns.rb,
lib/momomoto/information_schema/fetch_procedure_parameters.rb
Overview
This module is used by Momomoto to access the database’s meta information on the current active database.
Defined Under Namespace
Classes: Columns, Fetch_procedure_columns, Fetch_procedure_parameters
Class Method Summary collapse
Class Method Details
.const_missing(table) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/momomoto/information_schema.rb', line 4 def self.const_missing( table ) raise CriticalError, "Invalid name." unless table.to_s.downcase.match(/^[a-z0-9_]+$/) begin require "momomoto/information_schema/#{table.to_s.downcase}" ::Momomoto::Information_schema::const_get( table ) rescue LoadError klass = Class.new( ::Momomoto::Table ) klass.schema_name = "information_schema" klass.table_type = "VIEW" klass.primary_keys( [] ) ::Momomoto::Information_schema.const_set(table, klass) end end |