Skip to content

Commit

Permalink
format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
4t145 committed Dec 19, 2024
1 parent de243fc commit 66d4c63
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions tardis/src/db/reldb_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -704,7 +704,7 @@ impl TardisRelDBlConnection {
Ok(())
}

#[instrument(name="reldb_query", skip_all)]
#[instrument(name = "reldb_query", skip_all)]
/// Create table / 创建表
///
/// # Arguments
Expand All @@ -727,7 +727,7 @@ impl TardisRelDBlConnection {
}
}

#[instrument(name="reldb_query", skip_all)]
#[instrument(name = "reldb_query", skip_all)]
/// Create index / 创建索引
///
/// # Arguments
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -905,7 +905,7 @@ impl TardisRelDBlConnection {
}
}

#[instrument(name="reldb_query", skip_all)]
#[instrument(name = "reldb_query", skip_all)]
/// Get number of records / 获取记录数量
///
/// # Arguments
Expand Down Expand Up @@ -933,7 +933,7 @@ impl TardisRelDBlConnection {
}
}

#[instrument(name="reldb_query", skip_all)]
#[instrument(name = "reldb_query", skip_all)]
/// Get number of records / 获取记录数量
///
/// # Arguments
Expand Down Expand Up @@ -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<Value>) -> TardisResult<ExecResult> {
if let Some(tx) = &self.tx {
Expand All @@ -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<Vec<Value>>) -> TardisResult<()> {
if let Some(tx) = &self.tx {
Expand All @@ -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<Value>) -> TardisResult<Option<QueryResult>> {
if let Some(tx) = &self.tx {
TardisRelDBClient::query_one_inner(sql, params, tx).await
Expand All @@ -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<Value>) -> TardisResult<Vec<QueryResult>> {
if let Some(tx) = &self.tx {
TardisRelDBClient::query_all_inner(sql, params, tx).await
Expand All @@ -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
Expand Down Expand Up @@ -1040,7 +1040,7 @@ impl TardisRelDBlConnection {
}
}

#[instrument(name="reldb_query", skip_all)]
#[instrument(name = "reldb_query", skip_all)]
/// Insert multiple records / 插入多条记录
///
/// # Arguments
Expand Down Expand Up @@ -1075,7 +1075,7 @@ impl TardisRelDBlConnection {
}
}

#[instrument(name="reldb_query", skip_all)]
#[instrument(name = "reldb_query", skip_all)]
/// Update a record / 更新一条记录
///
/// # Arguments
Expand Down Expand Up @@ -1109,7 +1109,7 @@ impl TardisRelDBlConnection {
}
}

#[instrument(name="reldb_query", skip_all)]
#[instrument(name = "reldb_query", skip_all)]
/// Update multiple records / 更新多条记录
///
/// # Arguments
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 66d4c63

Please sign in to comment.