Sha256: 16c2d3736b0b42fb95733d155e22432b8fb83904b6341aabab85e512cbc68a40

Contents?: true

Size: 1.36 KB

Versions: 10

Compression:

Stored size: 1.36 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_query_killlist, :sql_attr_uint,
        :sql_attr_bool, :sql_attr_bigint, :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, :mssql_winauth, :mssql_unicode, :unpack_zlib,
        :unpack_mysqlcompress, :unpack_mysqlcompress_maxsize]
      
      attr_accessor *self.settings
      
      def initialize(name, type)
        @name = name
        @type = type
        
        @sql_query_pre        = []
        @sql_attr_uint        = []
        @sql_attr_bool        = []
        @sql_attr_bigint      = []
        @sql_attr_timestamp   = []
        @sql_attr_str2ordinal = []
        @sql_attr_float       = []
        @sql_attr_multi       = []
        @sql_query_post       = []
        @sql_query_post_index = []
        @unpack_zlib          = []
        @unpack_mysqlcompress = []
      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

10 entries across 10 versions & 3 rubygems

Version Path
hariton-thinking-sphinx-1.2.11.2 vendor/riddle/lib/riddle/configuration/sql_source.rb
hariton-thinking-sphinx-1.2.11 vendor/riddle/lib/riddle/configuration/sql_source.rb
hariton-thinking-sphinx-1.2.7.0 vendor/riddle/lib/riddle/configuration/sql_source.rb
hariton-thinking-sphinx-1.2.7.1 vendor/riddle/lib/riddle/configuration/sql_source.rb
riddle-1.0.0 lib/riddle/configuration/sql_source.rb
thinking-sphinx-099-1.3.2 vendor/riddle/lib/riddle/configuration/sql_source.rb
thinking-sphinx-099-1.3.1 vendor/riddle/lib/riddle/configuration/sql_source.rb
thinking-sphinx-099-1.3.0 vendor/riddle/lib/riddle/configuration/sql_source.rb
thinking-sphinx-099-1.2.13 vendor/riddle/lib/riddle/configuration/sql_source.rb
thinking-sphinx-099-1.2.12 vendor/riddle/lib/riddle/configuration/sql_source.rb