Range
The Range generic struct represents a SurrealDB range value with configurable bound types. Ranges can have inclusive or exclusive bounds on either end.
Package: github.com/surrealdb/surrealdb.go/pkg/models
Source: pkg/models/range.go
Definitions
Range
CBOR tag: 49
BoundIncluded
An inclusive bound (the value is included in the range).
CBOR tag: 50
BoundExcluded
An exclusive bound (the value is excluded from the range).
CBOR tag: 51
Bound
The constraint interface for bound types.
Related Types
RecordRangeID
A range scoped to a specific table, used for range-based record selection.
Methods
.String()
Returns the string representation of the range (e.g., 1..10, 1>..=10).
Returns: string
.GetJoinString()
Returns the range operator string (e.g., .., >.., ..=, >..=).
Returns: string
See Also
Table for the table name type used in
RecordRangeIDValue types for the full type mapping
Data manipulation for using ranges in queries
SurrealQL ranges for the underlying data model