GreenFairy.CQL.Scalars.DateTime (GreenFairy v0.3.0)
View SourceCQL scalar for datetime fields (utc_datetime, utc_datetime_usec).
Operators
Standard comparison:
:_eq/:_neq- Equality/inequality:_gt/:_gte/:_lt/:_lte- Temporal comparison:_in/:_nin- List membership:_is_null- Null check:_between- Range query
Period operators:
:_period- Relative time periods (last/next N units):_current_period- Current time period (today, this week, etc.)
Period Operator Examples
# Last 7 days
%{direction: :last, unit: :day, count: 7}
# This week
%{unit: :week}
# Next 3 months
%{direction: :next, unit: :month, count: 3}Adapter Support
- Ecto (SQL): PostgreSQL, MySQL, SQLite, MSSQL with native date functions
- Exlasticsearch: Uses Elasticsearch date math expressions
Owned Types
This scalar owns the following auxiliary types:
GreenFairy.CQL.Scalars.DateTime.PeriodDirection- LAST/NEXT enumGreenFairy.CQL.Scalars.DateTime.PeriodUnit- HOUR/DAY/WEEK/MONTH/QUARTER/YEAR enumGreenFairy.CQL.Scalars.DateTime.PeriodInput- Input for_periodoperatorGreenFairy.CQL.Scalars.DateTime.CurrentPeriodInput- Input for_current_periodoperator
Summary
Functions
Returns the list of auxiliary type modules owned by this scalar.