Skip to content

Commit e1e6130

Browse files
committed
refactor(*): rename result to result_set and Stmt2BindData to Stmt2BindParam
1 parent 4099e64 commit e1e6130

File tree

7 files changed

+214
-188
lines changed

7 files changed

+214
-188
lines changed

taos-query/src/prelude.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub mod sync {
4444
use crate::common::*;
4545
use crate::helpers::*;
4646
pub use crate::stmt::Bindable;
47-
pub use crate::stmt2::{Stmt2BindData, Stmt2Bindable};
47+
pub use crate::stmt2::{Stmt2BindParam, Stmt2Bindable};
4848
pub use crate::tmq::{AsConsumer, IsData, IsMeta};
4949
#[cfg(feature = "r2d2")]
5050
pub use crate::{Pool, PoolBuilder};
@@ -310,7 +310,7 @@ mod r#async {
310310
use crate::common::*;
311311
use crate::helpers::*;
312312
pub use crate::stmt::AsyncBindable;
313-
pub use crate::stmt2::{Stmt2AsyncBindable, Stmt2BindData};
313+
pub use crate::stmt2::{Stmt2AsyncBindable, Stmt2BindParam};
314314
pub use crate::util::{AsyncInlinable, AsyncInlinableRead, AsyncInlinableWrite};
315315
pub use crate::RawResult;
316316

taos-query/src/stmt2/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ where
99

1010
fn prepare(&mut self, sql: &str) -> RawResult<&mut Self>;
1111

12-
fn bind(&mut self, datas: &[Stmt2BindData]) -> RawResult<&mut Self>;
12+
fn bind(&mut self, params: &[Stmt2BindParam]) -> RawResult<&mut Self>;
1313

1414
fn exec(&mut self) -> RawResult<usize>;
1515

1616
fn affected_rows(&self) -> usize;
1717

18-
fn result(&self) -> RawResult<Q::ResultSet>;
18+
fn result_set(&self) -> RawResult<Q::ResultSet>;
1919
}
2020

2121
#[async_trait::async_trait]
@@ -28,23 +28,23 @@ where
2828

2929
async fn prepare(&mut self, sql: &str) -> RawResult<&mut Self>;
3030

31-
async fn bind(&mut self, datas: &[Stmt2BindData]) -> RawResult<&mut Self>;
31+
async fn bind(&mut self, params: &[Stmt2BindParam]) -> RawResult<&mut Self>;
3232

3333
async fn exec(&mut self) -> RawResult<usize>;
3434

3535
async fn affected_rows(&self) -> usize;
3636

37-
async fn result(&self) -> RawResult<Q::AsyncResultSet>;
37+
async fn result_set(&self) -> RawResult<Q::AsyncResultSet>;
3838
}
3939

4040
#[derive(Clone, Debug)]
41-
pub struct Stmt2BindData {
41+
pub struct Stmt2BindParam {
4242
table_name: Option<String>,
4343
tags: Option<Vec<Value>>,
4444
columns: Option<Vec<ColumnView>>,
4545
}
4646

47-
impl Stmt2BindData {
47+
impl Stmt2BindParam {
4848
pub fn new(
4949
table_name: Option<String>,
5050
tags: Option<Vec<Value>>,

0 commit comments

Comments
 (0)