mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2024-11-26 02:33:45 +03:00
Fix description of ALIAS fields
This commit is contained in:
parent
f24749112e
commit
4f4ce697e4
|
@ -27,7 +27,7 @@ created on the ClickHouse server if it does not already exist.
|
||||||
#### add_setting(name, value)
|
#### add_setting(name, value)
|
||||||
|
|
||||||
|
|
||||||
Add a database setting that will be sent with every request.
|
Adds a database setting that will be sent with every request.
|
||||||
For example, `db.add_setting("max_execution_time", 10)` will
|
For example, `db.add_setting("max_execution_time", 10)` will
|
||||||
limit query execution time to 10 seconds.
|
limit query execution time to 10 seconds.
|
||||||
The name must be string, and the value is converted to string in case
|
The name must be string, and the value is converted to string in case
|
||||||
|
|
|
@ -37,7 +37,7 @@ To allow null values in a field, wrap it inside a `NullableField`:
|
||||||
|
|
||||||
birthday = fields.NullableField(fields.DateField())
|
birthday = fields.NullableField(fields.DateField())
|
||||||
|
|
||||||
In this case, the default value for that fields becomes `null` unless otherwide specified.
|
In this case, the default value for that field becomes `null` unless otherwise specified.
|
||||||
|
|
||||||
### Materialized fields
|
### Materialized fields
|
||||||
|
|
||||||
|
@ -51,9 +51,9 @@ It is not possible to specify a default value for a materialized field.
|
||||||
|
|
||||||
### Alias fields
|
### Alias fields
|
||||||
|
|
||||||
An alias field is simply a different way to call another field in the model. For example:
|
An alias field is a field whose value is calculated by ClickHouse on the fly, as a function of other fields. It is not physically stored by the database. For example:
|
||||||
|
|
||||||
date_born = field.DateField(alias="birthday")
|
weekday_born = field.UInt8Field(alias="toDayOfWeek(birthday)")
|
||||||
|
|
||||||
Alias fields are read-only, meaning that their values are not sent to the database when inserting records.
|
Alias fields are read-only, meaning that their values are not sent to the database when inserting records.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user