Sha256: 097da769171e13a33293fdc45af1f7a9efee6cc13219293096607a1b3eed1219

Contents?: true

Size: 855 Bytes

Versions: 53

Compression:

Stored size: 855 Bytes

Contents

module Blazer
  module Adapters
    class BaseAdapter
      attr_reader :data_source

      def initialize(data_source)
        @data_source = data_source
      end

      def run_statement(statement, comment)
        # the one required method
      end

      def tables
        [] # optional, but nice to have
      end

      def schema
        [] # optional, but nice to have
      end

      def preview_statement
        "" # also optional, but nice to have
      end

      def reconnect
        # optional
      end

      def cost(statement)
        # optional
      end

      def explain(statement)
        # optional
      end

      def cancel(run_id)
        # optional
      end

      def cachable?(statement)
        true # optional
      end

      protected

      def settings
        @data_source.settings
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
sql-jarvis-2.1.10 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.9 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.8 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.7 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.6 lib/blazer/adapters/base_adapter.rb
blazer-2.3.1 lib/blazer/adapters/base_adapter.rb
blazer-2.3.0 lib/blazer/adapters/base_adapter.rb
blazer-2.2.8 lib/blazer/adapters/base_adapter.rb
blazer-2.2.7 lib/blazer/adapters/base_adapter.rb
blazer-2.2.6 lib/blazer/adapters/base_adapter.rb
blazer-2.2.5 lib/blazer/adapters/base_adapter.rb
blazer-2.2.4 lib/blazer/adapters/base_adapter.rb
blazer-2.2.3 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.5 lib/blazer/adapters/base_adapter.rb
blazer-2.2.2 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.4 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.3 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.2 lib/blazer/adapters/base_adapter.rb
blazer-2.2.1 lib/blazer/adapters/base_adapter.rb
sql-jarvis-2.1.1 lib/blazer/adapters/base_adapter.rb