Sha256: f1dabdaade53b5a13a7815a52b6b5c2a03320c2a1b1bd0233b82e450ca1e8317
Contents?: true
Size: 719 Bytes
Versions: 5
Compression:
Stored size: 719 Bytes
Contents
class StreamForOccurrenceDouble < ConceptQL::Nodes::Node def query(db) ds = db.from(:table) # Occurrence needs window functions to work meta_def(ds, :supports_window_functions?){true} ds end # Stole this from: # https://github.com/jeremyevans/sequel/blob/63397b787335d06de97dc89ddf49b7a3a93ffdc9/spec/core/expression_filters_spec.rb#L400 # # By default, the Sequel.mock datasets don't allow window functions, but I need them # enabled for testing # # I saw that Sequel tests had this little nugget in them to temporarily enable # window functions and sure enough, it works def meta_def(obj, name, &block) (class << obj; self end).send(:define_method, name, &block) end end
Version data entries
5 entries across 5 versions & 1 rubygems