GreenFairy.CQL.Scalars.DateTime (GreenFairy v0.3.0)

View Source

CQL 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:

Summary

Functions

Returns the list of auxiliary type modules owned by this scalar.

Functions

auxiliary_types()

Returns the list of auxiliary type modules owned by this scalar.

These types are automatically discovered and registered with the schema.