Module: CatalogDb::Metal
- Defined in:
- lib/sportdb/catalogs.rb,
lib/sportdb/catalogs/base.rb,
lib/sportdb/catalogs/city.rb,
lib/sportdb/catalogs/club.rb,
lib/sportdb/catalogs/ground.rb,
lib/sportdb/catalogs/league.rb,
lib/sportdb/catalogs/player.rb,
lib/sportdb/catalogs/country.rb,
lib/sportdb/catalogs/event_info.rb,
lib/sportdb/catalogs/league_period.rb,
lib/sportdb/catalogs/national_team.rb
Defined Under Namespace
Classes: BaseRecord, City, Club, Country, EventInfo, Ground, League, LeaguePeriod, NationalTeam, Player, PlayerRecord, Record
Class Method Summary collapse
Class Method Details
.tables ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/sportdb/catalogs.rb', line 32 def self.tables puts "==> table stats" if Record.database? db = Record.database filename = db.filename if filename # note - nil for memory or tempary db? puts " #{File.basename(filename)} in (#{File.dirname(filename)})" else puts "no filename; memory or temporary db?" end ## pp Record.database ## puts puts " #{Country.count} countries / #{City.count} cities" puts " #{NationalTeam.count} national teams" puts " #{League.count} leagues / #{LeaguePeriod.count} periods" puts " #{Club.count} clubs" puts " #{Ground.count} grounds" ## add more else puts " - no catalog.db set - " end if PlayerRecord.database? db = PlayerRecord.database filename = db.filename if filename # note - nil for memory or tempary db? puts " #{File.basename(filename)} in (#{File.dirname(filename)})" else puts "no filename; memory or temporary db?" end ## pp PlayerRecord.database ## puts puts " #{Player.count} players" else puts " - no players.db set -" end end |