Sha256: cdc9538d357b5439eeee80c21985d819ec6392c49080383b2ab2ed8ccd4a34c1

Contents?: true

Size: 1.09 KB

Versions: 11

Compression:

Stored size: 1.09 KB

Contents

module SportDb
  
  class Stats
    include SportDb::Models

    def tables
      puts "  #{League.count} leagues  /  #{Season.count} seasons"
      puts "  #{Event.count} events (league+season recs)  /  #{Round.count} rounds  /  #{Group.count} groups"
      puts "  #{Team.count} teams"
      puts "  #{Game.count} games"
      puts "  #{Badge.count} badges"

      puts "  #{Roster.count} rosters (person+team+event recs)"
      puts "  #{Goal.count} goals (person+game recs)"

      puts "  #{Assoc.count}  assocs|orgs"
      puts "  #{Ground.count}  grounds|stadiums"

## note: moved to racing.db  -- remove/delete!!
##      puts "  #{Track.count} tracks / #{Race.count} races (track+event recs) / #{Run.count} runs"
##      puts "  #{Record.count} records (race|run+person recs)"
    end

    ## fix/chek:
    #  move to Prop gem / reuse code from Prop gem
    def props
      puts "Props:"
      Prop.order( 'created_at asc' ).all.each do |prop|
        puts "  #{prop.key} / #{prop.value} || #{prop.created_at}"
      end
    end
  
  end  # class Stats

end  # module SportDb

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sportdb-1.9.15 lib/sportdb/stats.rb
sportdb-1.9.14 lib/sportdb/stats.rb
sportdb-1.9.13 lib/sportdb/stats.rb
sportdb-1.9.12 lib/sportdb/stats.rb
sportdb-1.9.11 lib/sportdb/stats.rb
sportdb-1.9.10 lib/sportdb/stats.rb
sportdb-1.9.9 lib/sportdb/stats.rb
sportdb-1.9.8 lib/sportdb/stats.rb
sportdb-1.9.7 lib/sportdb/stats.rb
sportdb-1.9.6 lib/sportdb/stats.rb
sportdb-1.9.5 lib/sportdb/stats.rb