Sha256: e79d88e8367f0c2fe2ff295a54e1c2f1c24ce0592fbc91501780ccf981543172

Contents?: true

Size: 227 Bytes

Versions: 2

Compression:

Stored size: 227 Bytes

Contents

# frozen_string_literal: true

module Ruby
  module Text2sql
    class SQLExecutor
      def execute(sql_query)
        result = ActiveRecord::Base.connection.execute(sql_query)

        result.to_a
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-text2sql-1.0.0 lib/ruby/text2sql/sql_executor.rb
ruby-text2sql-0.1.0 lib/ruby/text2sql/sql_executor.rb