Accessors for params and columns
This commit is contained in:
parent
ab672e42b4
commit
361c7bf395
@ -615,11 +615,21 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Column {
|
pub struct Column {
|
||||||
name: String,
|
name: String,
|
||||||
type_: Type,
|
type_: Type,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Column {
|
||||||
|
pub fn name(&self) -> &str {
|
||||||
|
&self.name
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn type_(&self) -> &Type {
|
||||||
|
&self.type_
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub struct Statement {
|
pub struct Statement {
|
||||||
close_sender: Sender<(u8, String)>,
|
close_sender: Sender<(u8, String)>,
|
||||||
name: String,
|
name: String,
|
||||||
@ -635,6 +645,14 @@ impl Drop for Statement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Statement {
|
impl Statement {
|
||||||
|
pub fn parameters(&self) -> &[Type] {
|
||||||
|
&self.params
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn columns(&self) -> &[Column] {
|
||||||
|
&self.columns
|
||||||
|
}
|
||||||
|
|
||||||
pub fn execute(self,
|
pub fn execute(self,
|
||||||
params: &[&ToSql],
|
params: &[&ToSql],
|
||||||
conn: Connection)
|
conn: Connection)
|
||||||
|
Loading…
Reference in New Issue
Block a user