E531 Add multirange support. by vpetrovykh · Pull Request #452 · geldata/gel-python · GitHub
[go: up one dir, main page]

Skip to content

Add multirange support.#452

Merged
vpetrovykh merged 4 commits intomasterfrom
multirange
Jul 25, 2023
Merged

Add multirange support.#452
vpetrovykh merged 4 commits intomasterfrom
multirange

Conversation

@vpetrovykh
Copy link
Contributor

Add multirange codec.

Adjust edgedb.Range and create edgedb.Multirange class as Python represenation of ranges and multiranges.


def __eq__(self, other):
if not isinstance(other, Range):
def __eq__(self, other) -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should have try to have Range and MultiRange able to compare equal.
In particular, if we are going to do that, we need to have __hash__ be equal when the objects are equal, which is not worth dealing with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point about hashes equality. I'll drop the equality between Range and MultiRange.

vpetrovykh and others added 4 commits July 24, 2023 19:36
Add multirange codec.

Adjust edgedb.Range and create edgedb.Multirange class as Python
represenation of ranges and multiranges.
Co-authored-by: Yury Selivanov <yury@edgedb.com>
@vpetrovykh vpetrovykh merged commit 717cd76 into master Jul 25, 2023
@vpetrovykh vpetrovykh deleted the multirange branch July 25, 2023 03:14
msullivan pushed a commit that referenced this pull request Aug 9, 2023
Add multirange codec.

Adjust edgedb.Range and create edgedb.MultiRange class as Python
representation of ranges and multiranges.
msullivan added a commit that referenced this pull request Aug 9, 2023
Changes
=======

* Implement support for new type descriptor protocol
  (by @elprans in 47eec19 for #427)

* Sync errors
  (by @elprans in 3bfb574 for #449)

* Don't depend on exact syntax errors in tests
  (by @msullivan in b3ce0c6 for #451)

* Fix an error in string representation of RelativeDuration.
  (by @vpetrovykh in 667da72 for #453)

* Add multirange support.
  (by @vpetrovykh in 15e280e for #452)
msullivan pushed a commit that referenced this pull request Aug 9, 2023
Add multirange codec.

Adjust edgedb.Range and create edgedb.MultiRange class as Python
representation of ranges and multiranges.
msullivan added a commit that referenced this pull request Aug 9, 2023
Changes
=======

* Implement support for new type descriptor protocol
  (by @elprans in 47eec19 for #427)

* Sync errors
  (by @elprans in 3bfb574 for #449)

* Don't depend on exact syntax errors in tests
  (by @msullivan in b3ce0c6 for #451)

* Fix an error in string representation of RelativeDuration.
  (by @vpetrovykh in 667da72 for #453)

* Add multirange support.
  (by @vpetrovykh in 15e280e for #452)
@aljazerzen aljazerzen mentioned this pull request Feb 23, 2024
This was referenced Aug 2, 2024
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.

3 participants

0