class

PrivateParlorXT::SQLiteStatistics

Inherits PrivateParlorXT::Statistics < Reference < Object

An implementation of Statistics using the Database for storing message data

Constructors

new(connection : DB::Database)

Generally this should use the same connection that was used for the database

Source

Instance methods

ensure_schema

Ensures that there is a 'message_stats' table in the database

Source
ensure_start_date

Ensures that there is a date value for the 'start_date' key in the 'system_config' table

Source
increment_downvotes

Increment the number of downvotes given

Source
increment_messages(type : Messages) : Nil

Increment the message count according to the given type and increment the total number of messages in general

Source
increment_unoriginal_media

Increment the number of unoriginal media messages encountered

Source
increment_unoriginal_text

Increment the number of unoriginal text messages encountered

Source
increment_upvotes

Increment the number of upvotes given

Source
karma_counts

Returns a hash of Karma to `Int32 , containing the total number of karma given or lost, and daily, weekly, and monthly totals

Source
karma_level_count(start_value : Int32, end_value : Int32) : Int32

Returns an Int32 total of users whose karma lie between start_value and end_value

Source
message_counts

Returns a hash of Messages to Int32, containing the total number of message for each type and daily, weekly, and monthly totals

Source
robot9000_counts

Returns a hash of Robot9000 to Int32, containing the total number of unique and unoriginal messages for texts and media types

Source
start_date

Returns a String containing the date at which the statistics module was initialized

Source
user_counts

Returns a hash of Users to Int32, containing the total number of each kind of user and daily, weekly, and monthly totals

Source