Skip to content
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

Tidy operator depgraph edges #394

Merged
merged 3 commits into from
Jan 26, 2022
Merged

Tidy operator depgraph edges #394

merged 3 commits into from
Jan 26, 2022

Conversation

Hoverbear
Copy link
Contributor

Repairs #334 .

@Hoverbear Hoverbear self-assigned this Jan 24, 2022
// NB: no break here. We need to be dependent on all externs that are operators
for (extern_item, &extern_index) in externs {
let fn_matches = |fn_name| item.module_path == extern_item.module_path && extern_item.name == fn_name;
let cmp_fn_matches = fn_matches(item.cmp_fn_name());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty brittle and I'd prefer to extend this to be customizable in the future.

@@ -12,6 +12,32 @@ pub struct PostgresOrdEntity {
pub id: core::any::TypeId,
}

impl PostgresOrdEntity {
pub(crate) fn cmp_fn_name(&self) -> String {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should probably be configurable.

@Hoverbear
Copy link
Contributor Author

Given https://github.com/zombodb/pgx/tree/master/pgx-examples/operators#automatically-deriving-operators-and-families I'm not going to work about making the names customizable for now.

Signed-off-by: Ana Hobden <[email protected]>
@Hoverbear Hoverbear merged commit f3c1c25 into develop Jan 26, 2022
@Hoverbear Hoverbear deleted the limit-operator-edges branch January 26, 2022 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant