<commit_before>module Pancakes
  class DatabasesController < Pancakes::ApplicationController
    def show
      @tables = database.tables
    end

    def index
      redirect_to database_path(Rails.env)
    end

    def query
      fail Pancakes::Errors::EmptyQueryString.new if params[:sql_command] =~ /drop|alter/i
      fail Pancakes::Errors::EmptyQueryString.new if params[:sql_command].blank?
      @result = database.exec_query(params[:sql_command])
    rescue PG::Error, Pancakes::Errors::EmptyQueryString => e
      @error = e
    end

    private

    def database
      @database ||= Pancakes::Database.new(params[:id])
    end
    helper_method :database
  end
end<commit_msg>Removed DROP and ALTER command filtering<commit_after>module Pancakes
  class DatabasesController < Pancakes::ApplicationController
    def show
      @tables = database.tables
    end

    def index
      redirect_to database_path(Rails.env)
    end

    def query
      fail Pancakes::Errors::EmptyQueryString.new if params[:sql_command].blank?
      @result = database.exec_query(params[:sql_command])
    rescue PG::Error, Pancakes::Errors::EmptyQueryString => e
      @error = e
    end

    private

    def database
      @database ||= Pancakes::Database.new(params[:id])
    end
    helper_method :database
  end
end
{'fraction_non_alphanumeric': 0.09222560975609756, 'fraction_numerical': 0.0, 'mean_word_length': 3.391304347826087, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4932127', 'n_tokens_mistral': 391, 'n_tokens_neox': 372, 'n_words': 89}