Class: QueryHistory

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/query_history.rb

Class Method Summary collapse

Class Method Details

.new_setidObject



3
4
5
6
7
8
9
10
# File 'app/models/query_history.rb', line 3

def self.new_setid 
  res = self.find_by_sql("select max(queryset_id)+1 as ans from query_histories");
  if res.size>0 && res[0].ans then
    return res[0].ans
  else
    return 1
  end   
end