From 66d4c63ea7d7947c6a86bda5ca0b5f60583faf01 Mon Sep 17 00:00:00 2001 From: 4t145 Date: Thu, 19 Dec 2024 10:03:28 +0800 Subject: [PATCH] format fix --- tardis/src/db/reldb_client.rs | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tardis/src/db/reldb_client.rs b/tardis/src/db/reldb_client.rs index e253a86..d97c57e 100644 --- a/tardis/src/db/reldb_client.rs +++ b/tardis/src/db/reldb_client.rs @@ -653,8 +653,8 @@ impl TardisRelDBlConnection { } Ok(()) } - - #[instrument(name="reldb_query", skip_all)] + + #[instrument(name = "reldb_query", skip_all)] /// Create a table from an entity / 从实体中创建表 /// /// # Arguments @@ -704,7 +704,7 @@ impl TardisRelDBlConnection { Ok(()) } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Create table / 创建表 /// /// # Arguments @@ -727,7 +727,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Create index / 创建索引 /// /// # Arguments @@ -750,7 +750,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Get a record, return a custom structure / 获取一条记录,返回自定义结构体 /// /// # Arguments @@ -800,7 +800,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Get multiple rows and return a custom structure / 获取多条记录,返回自定义结构体 /// /// # Arguments @@ -831,7 +831,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Get multiple rows and return a custom structure / 获取多条记录,返回自定义结构体 /// /// # Arguments @@ -850,7 +850,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Paging to get multiple records and the total number of records, returning a custom structure / 分页获取多条记录及总记录数,返回自定义结构体 /// /// # Arguments @@ -884,7 +884,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Paging to get multiple records and the total number of records, returning a custom structure / 分页获取多条记录及总记录数,返回自定义结构体 /// /// # Arguments @@ -905,7 +905,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Get number of records / 获取记录数量 /// /// # Arguments @@ -933,7 +933,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Get number of records / 获取记录数量 /// /// # Arguments @@ -969,7 +969,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Execute SQL operations (provide custom SQL processing capabilities) / 执行SQL操作(提供自定义SQL处理能力) pub async fn execute_one(&self, sql: &str, params: Vec) -> TardisResult { if let Some(tx) = &self.tx { @@ -979,7 +979,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] // Execute SQL operations (provide custom SQL processing capabilities) / 执行SQL操作(提供自定义SQL处理能力) pub async fn execute_many(&self, sql: &str, params: Vec>) -> TardisResult<()> { if let Some(tx) = &self.tx { @@ -989,7 +989,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] pub async fn query_one(&self, sql: &str, params: Vec) -> TardisResult> { if let Some(tx) = &self.tx { TardisRelDBClient::query_one_inner(sql, params, tx).await @@ -998,7 +998,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] pub async fn query_all(&self, sql: &str, params: Vec) -> TardisResult> { if let Some(tx) = &self.tx { TardisRelDBClient::query_all_inner(sql, params, tx).await @@ -1007,7 +1007,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Insert a record and return primary key value / 插入一条记录,返回主键值 /// /// # Arguments @@ -1040,7 +1040,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Insert multiple records / 插入多条记录 /// /// # Arguments @@ -1075,7 +1075,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Update a record / 更新一条记录 /// /// # Arguments @@ -1109,7 +1109,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Update multiple records / 更新多条记录 /// /// # Arguments @@ -1139,7 +1139,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Soft delete record(s) (primary key is Id) / 软删除记录(主键为Id) /// /// # Arguments @@ -1168,7 +1168,7 @@ impl TardisRelDBlConnection { } } - #[instrument(name="reldb_query", skip_all)] + #[instrument(name = "reldb_query", skip_all)] /// Soft delete record(s) (custom primary key) / 软删除记录(自定义主键) /// /// # Arguments