Skip to content

Instantly share code, notes, and snippets.

@kenton
Created November 29, 2012 14:36
Show Gist options
  • Save kenton/4169482 to your computer and use it in GitHub Desktop.
Save kenton/4169482 to your computer and use it in GitHub Desktop.
connection = ActiveRecord::Base.connection
search = Search.last
in_search_mode = SEARCH_MODE_SUPER_SEARCH if search.is_super_search?
call_stmt = search.call_statement(in_search_mode)
connection.execute(call_stmt[0])
conn = search.class.connection
temp_table_operators = connection.select_value("SELECT @_table_operators")
ops = conn.select_all("SELECT operator_id FROM #{temp_table_operators}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment