tpitale / information_schema

DataMapper Classes to Access information_schema.* in PostgreSQL 8.3

This URL has Read+Write access

information_schema / information_schema.rb
100644 17 lines (13 sloc) 0.5 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'dm-core'
require 'dm-aggregates'
require 'lib/type'
require 'lib/naming_convention'
 
adapter = DataMapper.setup(:default,{
  :adapter => 'postgres',
  :username => 'focus',
  :database => 'focus_development',
  :host => 'localhost'
})
adapter.resource_naming_convention = NamingConventions::Resource::UnderscoredAndPluralizedWithPrefix
 
DataObjects::Postgres.logger = DataObjects::Logger.new(STDOUT, 0)
 
Dir.glob(File.join(File.dirname(__FILE__), 'versions/8_3/*.rb')).each {|f| require f }