-
Notifications
You must be signed in to change notification settings - Fork 382
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
Add support for geopoly Interface #2946
Conversation
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.
Awesome work with the sqlparser extension! I think we should consider moving the runtime mapping away from the core library to reflect that this is not something all databases support. The rest of this look great!
Regarding all your comments:
I'm still thinking about a solution, I will be glad if you have any suggestions, since Perhaps a mechanism is needed to allow modules to define types |
I'm using the
But we only need to inject the actual custom type in |
I had to slightly change the use of Or is this not an option? |
I think this shouldn't be a problem. We need the known types for almost everything involving the driver, so we might as well preload it. The failing test worries me a bit as loading more assets may degrade build performance, but since this is all coming from external packages that would invalidate the entire build either way, it shouldn't be a problem. diff --git a/drift_dev/test/backends/build/build_integration_test.dart b/drift_dev/test/backends/build/build_integration_test.dart
index d81f397f..e1828132 100644
--- a/drift_dev/test/backends/build/build_integration_test.dart
+++ b/drift_dev/test/backends/build/build_integration_test.dart
@@ -583,6 +583,8 @@ class MyDatabase {
return everyElement(
anyOf(
isA<AssetId>().having((e) => e.extension, 'extension', '.json'),
+ // Allow reading SDK or other package assets to set up the analyzer.
+ isA<AssetId>().having((e) => e.package, 'package', isNot('a')),
other,
),
); |
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've added a simple test to drift
to make sure the type is roughly doing what it's supposed to. This looks good to me now, but I want to merge #2939 first.
Thanks for helping |
LGTM, thanks! 👍 |
Solves #2892
Questions and suggestions regarding implementation are welcome
More tests and perhaps an example will be added soon