Class: Sequel::Platform::Athena

Inherits:
Base
  • Object
show all
Defined in:
lib/sequel/extensions/platform.rb

Overview

Athena platform (Presto/Trino based) with Athena-specific function translations.

Instance Attribute Summary

Attributes inherited from Base

#config, #db

Instance Method Summary collapse

Methods inherited from Base

#[], #cast_date, #fetch, #initialize, #prefers?, #str_to_date, #supports?

Constructor Details

This class inherits a constructor from Sequel::Platform::Base

Instance Method Details

#date_diff(from, to) ⇒ Object



174
175
176
177
# File 'lib/sequel/extensions/platform.rb', line 174

def date_diff(from, to)
  # Athena/Presto uses date_diff with unit
  Sequel.function(:date_diff, 'day', from, to)
end

#days_between(from, to) ⇒ Object



179
180
181
# File 'lib/sequel/extensions/platform.rb', line 179

def days_between(from, to)
  Sequel.function(:date_diff, 'day', from, to)
end