📁 Also found in: /home/chedong/.local/share/rdoc
| Use Case | Command | Description |
|---|---|---|
| 🧩 Define a window for a query | over(window) |
Applies a window function to a column or expression |
| 📦 Create a named window | window(name) |
Defines a reusable window specification |
| 🔀 Partition data within a window | partition(expr) |
Groups rows by one or more columns |
| 📊 Order rows within a partition | order(expr) |
Specifies the ordering of rows in the window |
| 📏 Define a frame (rows/range) | rows(range) / range(range) |
Limits the window to a subset of rows relative to the current row |
Arel::WindowPredications is a module in the Arel library that provides methods for building SQL window function clauses. Window functions perform calculations across a set of rows related to the current row, without collapsing them into a single output row. This module is mixed into Arel attribute nodes to enable fluent construction of OVER, PARTITION BY, ORDER BY, and frame specifications.
over(window = nil) – Creates a OVER clause with an optional window name or definition.window(name) – Generates a WINDOW clause for named windows.partition(*exprs) – Adds a PARTITION BY clause.order(*exprs) – Adds an ORDER BY clause.rows(range) – Defines a row-based frame (e.g., ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING).range(range) – Defines a range-based frame.Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-28 07:18 @216.73.217.46
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format