Skip to content

Commit

Permalink
Change some code
Browse files Browse the repository at this point in the history
  • Loading branch information
rikonaka committed Jul 6, 2023
1 parent ec6b582 commit 18c1c90
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Expand Up @@ -209,7 +209,7 @@ impl SQLite {
match self.alive {
true => {
let rows = sqlx::query(sql).fetch_all(&mut self.connection).await?;
sqlite::raw_process(rows).await
sqlite::row_process(rows).await
}
false => panic!("{}", CLOSED_CONNECTION_ERROR),
}
Expand All @@ -220,7 +220,7 @@ impl SQLite {
true => {
let row = sqlx::query(sql).fetch_one(&mut self.connection).await?;
let rows = vec![row];
sqlite::raw_process(rows).await
sqlite::row_process(rows).await
}
false => panic!("{}", CLOSED_CONNECTION_ERROR),
}
Expand Down Expand Up @@ -303,7 +303,7 @@ impl MySQL {
match self.alive {
true => {
let rows = sqlx::query(sql).fetch_all(&mut self.connection).await?;
mysql::raw_process(rows).await
mysql::row_process(rows).await
}
false => panic!("{}", CLOSED_CONNECTION_ERROR),
}
Expand All @@ -314,7 +314,7 @@ impl MySQL {
true => {
let row = sqlx::query(sql).fetch_one(&mut self.connection).await?;
let rows = vec![row];
mysql::raw_process(rows).await
mysql::row_process(rows).await
}
false => panic!("{}", CLOSED_CONNECTION_ERROR),
}
Expand Down Expand Up @@ -386,7 +386,7 @@ impl PostgreSQL {
match self.alive {
true => {
let rows = sqlx::query(sql).fetch_all(&mut self.connection).await?;
postgresql::raw_process(rows).await
postgresql::row_process(rows).await
}
false => panic!("{}", CLOSED_CONNECTION_ERROR),
}
Expand All @@ -397,7 +397,7 @@ impl PostgreSQL {
true => {
let row = sqlx::query(sql).fetch_one(&mut self.connection).await?;
let rows = vec![row];
postgresql::raw_process(rows).await
postgresql::row_process(rows).await
}
false => panic!("{}", CLOSED_CONNECTION_ERROR),
}
Expand Down
2 changes: 1 addition & 1 deletion src/mysql.rs
Expand Up @@ -63,7 +63,7 @@ impl fmt::Display for MySQLDataTypes {
}
}

pub async fn raw_process(rows: Vec<MySqlRow>) -> anyhow::Result<SQLRets> {
pub async fn row_process(rows: Vec<MySqlRow>) -> anyhow::Result<SQLRets> {
let mut sql_rets = SQLRets::new();

if rows.len() > 0 {
Expand Down
2 changes: 1 addition & 1 deletion src/postgresql.rs
Expand Up @@ -100,7 +100,7 @@ impl fmt::Display for PostgreSQLDataTypes {
}
}

pub async fn raw_process(rows: Vec<PgRow>) -> anyhow::Result<SQLRets> {
pub async fn row_process(rows: Vec<PgRow>) -> anyhow::Result<SQLRets> {
let mut sql_rets = SQLRets::new();

if rows.len() > 0 {
Expand Down
2 changes: 1 addition & 1 deletion src/sqlite.rs
Expand Up @@ -42,7 +42,7 @@ impl fmt::Display for SQLiteDataTypes {
}
}

pub async fn raw_process(rows: Vec<SqliteRow>) -> anyhow::Result<SQLRets> {
pub async fn row_process(rows: Vec<SqliteRow>) -> anyhow::Result<SQLRets> {
let mut sql_rets = SQLRets::new();

if rows.len() > 0 {
Expand Down

0 comments on commit 18c1c90

Please sign in to comment.