lib/picky/sources/db.rb in picky-3.6.16 vs lib/picky/sources/db.rb in picky-4.0.0pre1

- old
+ new

@@ -54,12 +54,13 @@ parameters << options unless options.empty? %Q{#{self.class.name}(#{parameters.join(', ')})} end # Creates a database adapter for use with this source. + # def create_database_adapter # :nodoc: - # TODO Do not use ActiveRecord directly. Use set_table_name etc. + # THINK Do not use ActiveRecord directly? Use set_table_name etc? # adapter_class = Class.new ActiveRecord::Base adapter_class.abstract_class = true adapter_class end @@ -94,11 +95,11 @@ # Take a snapshot of the data. # # Uses CREATE TABLE AS with the given SELECT statement to create a snapshot of the data. # def take_snapshot index - timed_exclaim %Q{"#{index.identifier}": Taking snapshot of database data.} + timed_exclaim %Q{ "#{index.identifier}": Taking snapshot of database data.} origin = snapshot_table_name index.name on_database = database.connection # Drop the table if it exists. @@ -141,10 +142,10 @@ # Gets the data from the backend. # def get_data category, offset, &block # :nodoc: select_statement = harvest_statement_with_offset category, offset - # TODO Rewrite ASAP. + # THINK Not really nice like this. Rewrite if possible. # if database.connection.adapter_name == "PostgreSQL" id_key = 'id' text_key = category.from.to_s database.connection.execute(select_statement).each do |hash| \ No newline at end of file