mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2024-11-22 09:06:41 +03:00
Fix #110
This commit is contained in:
parent
0a2cff5c12
commit
cb91971fd9
|
@ -9,7 +9,7 @@ Currently the following field types are supported:
|
||||||
| ------------------ | ---------- | ------------------- | -----------------------------------------------------
|
| ------------------ | ---------- | ------------------- | -----------------------------------------------------
|
||||||
| StringField | String | unicode | Encoded as UTF-8 when written to ClickHouse
|
| StringField | String | unicode | Encoded as UTF-8 when written to ClickHouse
|
||||||
| FixedStringField | String | unicode | Encoded as UTF-8 when written to ClickHouse
|
| FixedStringField | String | unicode | Encoded as UTF-8 when written to ClickHouse
|
||||||
| DateField | Date | datetime.date | Range 1970-01-01 to 2038-01-19
|
| DateField | Date | datetime.date | Range 1970-01-01 to 2105-12-31
|
||||||
| DateTimeField | DateTime | datetime.datetime | Minimal value is 1970-01-01 00:00:00; Always in UTC
|
| DateTimeField | DateTime | datetime.datetime | Minimal value is 1970-01-01 00:00:00; Always in UTC
|
||||||
| Int8Field | Int8 | int | Range -128 to 127
|
| Int8Field | Int8 | int | Range -128 to 127
|
||||||
| Int16Field | Int16 | int | Range -32768 to 32767
|
| Int16Field | Int16 | int | Range -32768 to 32767
|
||||||
|
|
|
@ -89,7 +89,7 @@ When values are assigned to model fields, they are immediately converted to thei
|
||||||
>>> suzy.birthday = 0.5
|
>>> suzy.birthday = 0.5
|
||||||
ValueError: Invalid value for DateField - 0.5
|
ValueError: Invalid value for DateField - 0.5
|
||||||
>>> suzy.birthday = '1922-05-31'
|
>>> suzy.birthday = '1922-05-31'
|
||||||
ValueError: DateField out of range - 1922-05-31 is not between 1970-01-01 and 2038-01-19
|
ValueError: DateField out of range - 1922-05-31 is not between 1970-01-01 and 2105-12-31
|
||||||
|
|
||||||
Inserting to the Database
|
Inserting to the Database
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
|
@ -131,7 +131,7 @@ class FixedStringField(StringField):
|
||||||
class DateField(Field):
|
class DateField(Field):
|
||||||
|
|
||||||
min_value = datetime.date(1970, 1, 1)
|
min_value = datetime.date(1970, 1, 1)
|
||||||
max_value = datetime.date(2038, 1, 19)
|
max_value = datetime.date(2105, 12, 31)
|
||||||
class_default = min_value
|
class_default = min_value
|
||||||
db_type = 'Date'
|
db_type = 'Date'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user