Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • T torque-postgresql
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Carlos
  • torque-postgresql
  • Wiki
  • Range

Range · Changes

Page history
Updated Range (markdown) authored May 17, 2020 by Carlos's avatar Carlos
Hide whitespace changes
Inline Side-by-side
Range.md
View page @ eb9cee12
......@@ -6,10 +6,10 @@ Ruby `Range` extensions. In order to comply with new features related to date/ti
A way to get the intersection between 2 ranges, just like: `(5..15) & (10..20) === (10..15)`. See the examples:
![Range Intersection](https://lh6.googleusercontent.com/RIupg6XD5R9xXXcECk8PEIH7Udp2C3tQjJw32UE5hK7Dd5QGWV3W9TxnX_nBFFwThPlxhtiOCvZzyGSL_ui0=w1920-h979-rw)
![Range Intersection](https://user-images.githubusercontent.com/1782535/82135857-d4160180-97dd-11ea-9911-e47fbbf27e80.jpg)
### `|` or `union`
A way to concatenate 2 ranges, regardless if they intersect or not. It basically gets the lowest and highest values. Like: `(5..15) | (10..20) === (5..20)`. See the examples:
![Range Add](https://lh4.googleusercontent.com/9oL-NlXIl93x488YYkqwIQwlJvWeDuk-aiUyifWUCzr3G7JRXavncPhML0M7TydJFd-TB76AABeLRxXJLxfX=w1920-h979-rw)
![Range Union](https://user-images.githubusercontent.com/1782535/82135859-e09a5a00-97dd-11ea-8d85-8f5c28156521.jpg)
\ No newline at end of file
Clone repository
  • Wiki
  • Configuring

Core Extensions

  • Range

Data types

  • Enum
  • Enum Set
  • Interval
  • Date/Time Range
  • Box
  • Circle
  • Line
  • Segment

Querying

  • Arel
  • Has Many
  • Belongs to Many
  • Dynamic Attributes
  • Distinct On
  • Auxiliary Statements
  • Inherited Tables