Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Bitwise OR Operator #825

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ashayas
Copy link

@ashayas ashayas commented Dec 29, 2024

This pull request introduces the bitwise OR operator which is complementary to the bitwise AND operator already present

Why:

  • The bitwise OR operator is a necessary complement to the existing bitwise AND operator already present in the repository. I followed the conventions and implementation patterns of the bitwise AND operator to ensure consistency and maintainability within the codebase. I wanted this implemented so that it can be updated in ChromaDB

Example Usage:

from pypika import Table, Field, Query

table = Table('example')
field1 = Field('field1')
field2 = Field('field2')

query = Query.from_(table).select(field1.bitwiseor(field2))
print(query)
# Output: SELECT "field1" | "field2" FROM "example"

Testing:

make test [PASS]
make docs.build [PASS]

Add tests for bitwise or
@ashayas ashayas requested a review from a team as a code owner December 29, 2024 21:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant