class Babik::Selection::Operation::Minute
Minute
date operation
Public Instance Methods
sql_function()
click to toggle source
# File lib/babik/queryset/lib/selection/operation/date.rb, line 144 def sql_function dbms_adapter = db_engine return 'MINUTE(#field)' if dbms_adapter == 'mysql2' return 'EXTRACT(MINUTE FROM #field)' if dbms_adapter == 'postgresql' return 'CAST(strftime(\'%M\', #field) AS INTEGER)' if dbms_adapter == 'sqlite3' raise NotImplementedError, "#{self.class} lookup not implemented for #{dbms_adapter}" end