sea-orm-timescale
TimescaleDB functions and migration helpers for Sea-ORM.
Usage
Query helper functions return SimpleExpr values that slot into Sea-ORM's query builder:
use *;
use ;
let hourly = find
.select_only
.column_as
.column_as
.group_by
.into_json
.all
.await?;
Also provides first, last, locf, time_bucket_gapfill, and histogram — see docs.rs for the full API.
Migrations
Helpers for common TimescaleDB DDL operations. Use these in your Sea-ORM migrations:
use *;
use *;
// Convert a table to a hypertable
create_hypertable.await?;
// Enable compression with a 30-day policy
enable_compression.await?;
// Drop chunks older than 1 year
add_retention_policy.await?;
Continuous aggregates and refresh are also supported — see docs.rs.
License
MIT