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,
|
||||
type_: Type,
|
||||
}
|
||||
|
||||
impl Column {
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn type_(&self) -> &Type {
|
||||
&self.type_
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Statement {
|
||||
close_sender: Sender<(u8, String)>,
|
||||
name: String,
|
||||
@ -635,6 +645,14 @@ impl Drop for Statement {
|
||||
}
|
||||
|
||||
impl Statement {
|
||||
pub fn parameters(&self) -> &[Type] {
|
||||
&self.params
|
||||
}
|
||||
|
||||
pub fn columns(&self) -> &[Column] {
|
||||
&self.columns
|
||||
}
|
||||
|
||||
pub fn execute(self,
|
||||
params: &[&ToSql],
|
||||
conn: Connection)
|
||||
|
Loading…
Reference in New Issue
Block a user