lib/sequel/dataset/features.rb in sequel-5.10.0 vs lib/sequel/dataset/features.rb in sequel-5.11.0

- old
+ new

@@ -176,12 +176,30 @@ # Whether the dataset supports fractional seconds in literal timestamps, true by default. def supports_timestamp_usecs? true end + # Whether the dataset supports the WINDOW clause to define windows used by multiple + # window functions, false by default. + def supports_window_clause? + false + end + # Whether the dataset supports window functions, false by default. def supports_window_functions? false + end + + # Whether the dataset supports the given window function option. True by default. + # This should only be called if supports_window_functions? is true. Possible options + # are :rows, :range, :groups, :offset, :exclude. + def supports_window_function_frame_option?(option) + case option + when :rows, :range, :offset + true + else + false + end end # Whether the dataset supports WHERE TRUE (or WHERE 1 for databases that # that use 1 for true), true by default. def supports_where_true?