Sha256: 38fab838d976e381df4a5c1477c05533f6724b9c9f02b29ea0d9854c0e2b8436

Contents?: true

Size: 1.1 KB

Versions: 77

Compression:

Stored size: 1.1 KB

Contents

module Riddle
  class Configuration
    class SQLSource < Riddle::Configuration::Source
      self.settings = [:type, :sql_host, :sql_user, :sql_pass, :sql_db,
        :sql_port, :sql_sock, :mysql_connect_flags, :sql_query_pre, :sql_query,
        :sql_query_range, :sql_range_step, :sql_attr_uint, :sql_attr_bool,
        :sql_attr_timestamp, :sql_attr_str2ordinal, :sql_attr_float,
        :sql_attr_multi, :sql_query_post, :sql_query_post_index,
        :sql_ranged_throttle, :sql_query_info]
      
      attr_accessor *self.settings
      
      def initialize(name, type)
        @name = name
        @type = type
        
        @sql_query_pre        = []
        @sql_attr_uint        = []
        @sql_attr_bool        = []
        @sql_attr_timestamp   = []
        @sql_attr_str2ordinal = []
        @sql_attr_float       = []
        @sql_attr_multi       = []
        @sql_query_post       = []
        @sql_query_post_index = []
      end
            
      def valid?
        super && (!( @sql_host.nil? || @sql_user.nil? || @sql_db.nil? ||
          @sql_query.nil? ) || !@parent.nil?)
      end
    end
  end
end

Version data entries

77 entries across 77 versions & 15 rubygems

Version Path
DrMark-thinking-sphinx-1.1.14 vendor/riddle/lib/riddle/configuration/sql_source.rb
DrMark-thinking-sphinx-1.1.15 vendor/riddle/lib/riddle/configuration/sql_source.rb
DrMark-thinking-sphinx-1.1.6 vendor/riddle/lib/riddle/configuration/sql_source.rb
DrMark-thinking-sphinx-1.2.5 vendor/riddle/lib/riddle/configuration/sql_source.rb
DrMark-thinking-sphinx-1.2.6 vendor/riddle/lib/riddle/configuration/sql_source.rb
bterlson-thinking-sphinx-1.2.8 vendor/riddle/lib/riddle/configuration/sql_source.rb
dpickett-thinking-sphinx-1.1.12 vendor/riddle/lib/riddle/configuration/sql_source.rb
dpickett-thinking-sphinx-1.1.23 vendor/riddle/lib/riddle/configuration/sql_source.rb
dpickett-thinking-sphinx-1.1.4 vendor/riddle/lib/riddle/configuration/sql_source.rb
ebeigarts-thinking-sphinx-1.1.21 vendor/riddle/lib/riddle/configuration/sql_source.rb
ebeigarts-thinking-sphinx-1.1.22 vendor/riddle/lib/riddle/configuration/sql_source.rb
ebeigarts-thinking-sphinx-1.2.10 vendor/riddle/lib/riddle/configuration/sql_source.rb
factorylabs-thinking-sphinx-1.2.7 vendor/riddle/lib/riddle/configuration/sql_source.rb
freelancing-god-riddle-0.9.8.1533.2 lib/riddle/configuration/sql_source.rb
freelancing-god-riddle-0.9.8.1533.3 lib/riddle/configuration/sql_source.rb
freelancing-god-riddle-0.9.8.1533.4 lib/riddle/configuration/sql_source.rb
freelancing-god-riddle-0.9.8.1533.5 lib/riddle/configuration/sql_source.rb
freelancing-god-riddle-0.9.8.1533.7 lib/riddle/configuration/sql_source.rb
freelancing-god-riddle-0.9.8.1533.8 lib/riddle/configuration/sql_source.rb
freelancing-god-riddle-0.9.8.1533.9 lib/riddle/configuration/sql_source.rb