-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Labels
ecdbECDb and ECSQL related issuesECDb and ECSQL related issues
Description
EC schemas contain units information but ECSql doesn't use that information.
Consider supporting the following things:
- Unit information exposed via query results metadata
- Explicit unit conversion e.g.
SELECT Length @ 'Units:FT' FROM Pipereturns the value of length converted to feet. - Unit aware math. e.g.
SELECT Length + '2 Units.IN' FROM Pipereturns the length in persistence units (M) with 2 inches added. OrSELECT Length * Width FROM Doorwould return an area in meters squared- Consider other options for how to encode units in literals.
- Any operation using incompatible units should fail. e.g. if Length has no or incompatible persistence unit defined the operation will fail with a descriptive error
Support should not include:
- Numeric string formatting support, it should only return the converted double value.
- Automatic detection of presentation unit and auto conversion to it. ECSql should always include explicit input defining the presentation unit.
Existing implementation to in Postgres: https://github.com/df7cb/postgresql-unit
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ecdbECDb and ECSQL related issuesECDb and ECSQL related issues