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

feat: BooleanField for ORM #206

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

HarrisMinhas123
Copy link

No description provided.

@HarrisMinhas123 HarrisMinhas123 changed the title BooleanField feature for ORM feat: BooleanField for ORM Aug 1, 2023
@@ -162,7 +162,25 @@ def validate(self, value):
if len(value) > self._length:
raise ValueError('Value of %d bytes is too long for FixedStringField(%d)' % (len(value), self._length))

class BooleanField(Field):
# The ClickHouse column type to use
db_type = 'UInt8'
Copy link
Contributor

Choose a reason for hiding this comment

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

ClickHouse has type bool https://clickhouse.com/docs/en/sql-reference/data-types/boolean while it's kept internally as UInt8, why not set here db_type = 'Bool' ?

Copy link
Author

Choose a reason for hiding this comment

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

DB type has been changed to Bool as suggested. It doesnt make any difference functionally.

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