From 4f4ce697e4b2a7d3b8f906741a2d095c4efc4375 Mon Sep 17 00:00:00 2001 From: Itai Shirav Date: Sun, 14 Oct 2018 09:51:04 +0300 Subject: [PATCH] Fix description of ALIAS fields --- docs/class_reference.md | 2 +- docs/models_and_databases.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/class_reference.md b/docs/class_reference.md index 90a7bce..264dd72 100644 --- a/docs/class_reference.md +++ b/docs/class_reference.md @@ -27,7 +27,7 @@ created on the ClickHouse server if it does not already exist. #### 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 limit query execution time to 10 seconds. The name must be string, and the value is converted to string in case diff --git a/docs/models_and_databases.md b/docs/models_and_databases.md index 230fbbb..b062608 100644 --- a/docs/models_and_databases.md +++ b/docs/models_and_databases.md @@ -37,7 +37,7 @@ To allow null values in a field, wrap it inside a `NullableField`: 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 @@ -51,9 +51,9 @@ It is not possible to specify a default value for a materialized field. ### 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.