-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rudimentary geospatial support #1389
Conversation
f3ec45d
to
ce4a384
Compare
Pull Request Test Coverage Report for Build 6718946398
💛 - Coveralls |
a722ef2
to
41a0e60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable - I only have nitty comments.
common/lib/src/realm_types.dart
Outdated
/// class _Location { | ||
/// final String type = 'Point'; | ||
/// List<double> coordinates = const [0, 0]; | ||
/// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the dart generator support playing around with the accessibility of fields? If so, we could suggest a more user-friendly API, similar to what we do in .NET: https://github.com/realm/realm-dotnet/blob/641f2dc5581776b80979c69abc4c29777313bd0b/CHANGELOG.md?plain=1#L140-L162
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added getters and setters for latitude and longitude, as well conversion methods between GeoPoint
and Location
in the doc comments (similar to how I did in geospatial_test.dart
)
05eafa8
to
d9c0545
Compare
d9c0545
to
a7d3342
Compare
eab2e70
to
cf9c6d9
Compare
bd351a6
to
da6b32a
Compare
da6b32a
to
a98fe73
Compare
a98fe73
to
3f8406c
Compare
1a59f3e
to
e405c95
Compare
Thx @nirinchev .. just need to rerun generator 👍 |
Oh, yeah, needs to add the ignore lint comments that went in a bit earlier. Will do that. |
* main: Don't add the ISRG X1 Root on Android (#1434) Wait for initial sync to complete before starting the tests (#1435) kn/update analyzer (#1365) Add vNext Changelog header (#1429) [Release 1.6.0] (#1428) Upgrade to Core 13.23.4 (#1427) Flexible sync subscribe/unsubscribe API (#1354) Use default context rather than creating a new one (#1426) Handle duplicate certificates (#1425) kn/add certificate (#1378) asymmetric object allow non embedded links (#1402) Rudimentary geospatial support (#1389) Core 13.20.1 sync errors changes (#1387) Fix RealmObject.hashCode (#1420) add 'ignore_for_file: type=lint' to *.g.dart files (#1413) kn/fix skip then iterate bug (#1410)
Add rudimentary geospatial support. Example:
Supported shapes are
GeoBox
,GeoCircle
, andGeoPolygon
is also supported, thanks to realm/realm-core#6934, despite C-api not supporting geo shapes.
It works by allowing string arguments where geo shapes are required and trying to parse such from any given string, so is still implicitly dependent on inlining and hence not as efficient, but it will not force users to inline on the dart side, and hence they will automatically benefit once the C-api is updated, or we have switched to the new binding generator.
NOTE: This PR depends on a core-upgrade newer than v13.20.0, and hence a refactoring of the way errors are handled. It is currently based on top op #1398.
Fixes: #1155