From a7dda35f7fc48595c0d6d75258c50ccafb5caa65 Mon Sep 17 00:00:00 2001 From: cnmade Date: Sat, 19 Feb 2022 15:11:43 +0800 Subject: [PATCH 1/4] Translate zh/engines/table-engines/integrations/sqlite: rename old file --- .../table-engines/integrations/{sqlite.md => sqlite.md.bak} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/zh/engines/table-engines/integrations/{sqlite.md => sqlite.md.bak} (100%) diff --git a/docs/zh/engines/table-engines/integrations/sqlite.md b/docs/zh/engines/table-engines/integrations/sqlite.md.bak similarity index 100% rename from docs/zh/engines/table-engines/integrations/sqlite.md rename to docs/zh/engines/table-engines/integrations/sqlite.md.bak From 8f6a3f4d7fb5fd354fe7188456baa7458a7a7591 Mon Sep 17 00:00:00 2001 From: cnmade Date: Sat, 19 Feb 2022 15:14:22 +0800 Subject: [PATCH 2/4] Translate zh/engines/table-engines/integrations/sqlite: reimport files --- .../table-engines/integrations/sqlite.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 docs/zh/engines/table-engines/integrations/sqlite.md diff --git a/docs/zh/engines/table-engines/integrations/sqlite.md b/docs/zh/engines/table-engines/integrations/sqlite.md new file mode 100644 index 00000000000..391f1696291 --- /dev/null +++ b/docs/zh/engines/table-engines/integrations/sqlite.md @@ -0,0 +1,59 @@ +--- +toc_priority: 7 +toc_title: SQLite +--- + +# SQLite {#sqlite} + +The engine allows to import and export data to SQLite and supports queries to SQLite tables directly from ClickHouse. + +## Creating a Table {#creating-a-table} + +``` sql + CREATE TABLE [IF NOT EXISTS] [db.]table_name + ( + name1 [type1], + name2 [type2], ... + ) ENGINE = SQLite('db_path', 'table') +``` + +**Engine Parameters** + +- `db_path` — Path to SQLite file with a database. +- `table` — Name of a table in the SQLite database. + +## Usage Example {#usage-example} + +Shows a query creating the SQLite table: + +```sql +SHOW CREATE TABLE sqlite_db.table2; +``` + +``` text +CREATE TABLE SQLite.table2 +( + `col1` Nullable(Int32), + `col2` Nullable(String) +) +ENGINE = SQLite('sqlite.db','table2'); +``` + +Returns the data from the table: + +``` sql +SELECT * FROM sqlite_db.table2 ORDER BY col1; +``` + +```text +┌─col1─┬─col2──┐ +│ 1 │ text1 │ +│ 2 │ text2 │ +│ 3 │ text3 │ +└──────┴───────┘ +``` + +**See Also** + +- [SQLite](../../../engines/database-engines/sqlite.md) engine +- [sqlite](../../../sql-reference/table-functions/sqlite.md) table function \ No newline at end of file From da5cb8950dfabecd70b02cbb2149d68c7f167eaf Mon Sep 17 00:00:00 2001 From: cnmade Date: Sat, 19 Feb 2022 15:20:34 +0800 Subject: [PATCH 3/4] Translate zh/engines/table-engines/integrations/sqlite: translate to zh --- .../table-engines/integrations/sqlite.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/zh/engines/table-engines/integrations/sqlite.md b/docs/zh/engines/table-engines/integrations/sqlite.md index 391f1696291..f492148ed10 100644 --- a/docs/zh/engines/table-engines/integrations/sqlite.md +++ b/docs/zh/engines/table-engines/integrations/sqlite.md @@ -5,9 +5,9 @@ toc_title: SQLite # SQLite {#sqlite} -The engine allows to import and export data to SQLite and supports queries to SQLite tables directly from ClickHouse. +该引擎允许导入和导出数据到SQLite,并支持查询SQLite表直接从ClickHouse。 -## Creating a Table {#creating-a-table} +## 创建数据表 {#creating-a-table} ``` sql CREATE TABLE [IF NOT EXISTS] [db.]table_name @@ -17,14 +17,14 @@ The engine allows to import and export data to SQLite and supports queries to SQ ) ENGINE = SQLite('db_path', 'table') ``` -**Engine Parameters** +**引擎参数** -- `db_path` — Path to SQLite file with a database. -- `table` — Name of a table in the SQLite database. +- `db_path` — SQLite数据库文件的具体路径地址。 +- `table` — SQLite数据库中的表名。 -## Usage Example {#usage-example} +## 使用示例 {#usage-example} -Shows a query creating the SQLite table: +显示创建表的查询语句: ```sql SHOW CREATE TABLE sqlite_db.table2; @@ -39,7 +39,7 @@ CREATE TABLE SQLite.table2 ENGINE = SQLite('sqlite.db','table2'); ``` -Returns the data from the table: +从数据表查询数据: ``` sql SELECT * FROM sqlite_db.table2 ORDER BY col1; @@ -53,7 +53,7 @@ SELECT * FROM sqlite_db.table2 ORDER BY col1; └──────┴───────┘ ``` -**See Also** +**详见** -- [SQLite](../../../engines/database-engines/sqlite.md) engine -- [sqlite](../../../sql-reference/table-functions/sqlite.md) table function \ No newline at end of file +- [SQLite](../../../engines/database-engines/sqlite.md) 引擎 +- [sqlite](../../../sql-reference/table-functions/sqlite.md) 表方法函数 \ No newline at end of file From bb4986795551c5749b9ae86aba4708aa06084c7c Mon Sep 17 00:00:00 2001 From: cnmade Date: Sat, 19 Feb 2022 15:21:08 +0800 Subject: [PATCH 4/4] Translate zh/engines/table-engines/integrations/sqlite: remove bak file --- docs/zh/engines/table-engines/integrations/sqlite.md.bak | 1 - 1 file changed, 1 deletion(-) delete mode 120000 docs/zh/engines/table-engines/integrations/sqlite.md.bak diff --git a/docs/zh/engines/table-engines/integrations/sqlite.md.bak b/docs/zh/engines/table-engines/integrations/sqlite.md.bak deleted file mode 120000 index 56d0a490f52..00000000000 --- a/docs/zh/engines/table-engines/integrations/sqlite.md.bak +++ /dev/null @@ -1 +0,0 @@ -../../../../en/engines/table-engines/integrations/sqlite.md \ No newline at end of file