Struct mimir::Var
[−]
[src]
pub struct Var { /* fields omitted */ }
This structure represents memory areas used for transferring data to and from the database and is available by handle to a calling application or driver.
Methods
impl Var
[src]
pub fn copy_data(
&self,
src_pos: u32,
dst: &mut Self,
dst_pos: u32
) -> Result<()>
[src]
&self,
src_pos: u32,
dst: &mut Self,
dst_pos: u32
) -> Result<()>
Copies the data from one variable to another variable.
src_pos
- the array position from which the data is to be copied. The first position is
- If the array position specified exceeds the number of elements allocated in the source variable, an error is returned.
dst
- the variable into which data is to be copied.dst_pos
- the array position into which the data is to be copied. The first position is
- If the array position specified exceeds the number of elements allocated in the variable, an error is returned.
pub fn get_data(&self) -> Result<&mut [ODPIData]>
[src]
Returns a pointer to an array of ODPIData
structures used for transferring data to and
from the database. These structures are allocated by the variable itself and are made
available when the variable is first created using the function Connection::new_var()
. If
a DML returning statement is executed, however, the number of allocated elements can change
in addition to the memory location.
pub fn get_num_elements_in_array(&self) -> Result<u32>
[src]
Returns the number of elements in a PL/SQL index-by table if the variable was created as an
array by the function Connection::newVar()
. If the variable is one of the output bind
variables of a DML returning statement, however, the value returned will correspond to the
number of rows returned by the DML returning statement. In all other cases, the value
returned will be the number of elements the variable was created with.
pub fn get_size_in_bytes(&self) -> Result<u32>
[src]
Returns the size of the buffer used for one element of the array used for fetching/binding Oracle data.
pub fn set_from_bytes(&self, pos: u32, value: &str) -> Result<()>
[src]
Sets the variable value to the specified string. In the case of the variable's Oracle type being DPI_ORACLE_TYPE_NUMBER, the string is converted to an Oracle number during the call to this function.
pos
- the array position in the variable which is to be set. The first position is 0. If the position exceeds the number of elements allocated by the variable an error is returned.value
- a string which contains the data to be set. The data is copied to the variable buffer and does not need to be retained after this function call has completed.
pub fn set_from_lob(&self, pos: u32, lob: &Lob) -> Result<()>
[src]
Sets the variable value to the specified LOB.
pos
- the array position in the variable which is to be set. The first position is 0. If the position exceeds the number of elements allocated by the variable an error is returned.lob
- the LOB which should be set.
pub fn set_from_object(&self, pos: u32, obj: &Object) -> Result<()>
[src]
Sets the variable value to the specified object.
pos
- the array position in the variable which is to be set. The first position is 0. If the position exceeds the number of elements allocated by the variable an error is returned.obj
- the object which should be set.
pub fn set_from_rowid(&self, pos: u32, rowid: &Rowid) -> Result<()>
[src]
Sets the variable value to the specified rowid.
pos
- the array position in the variable which is to be set. The first position is 0. If the position exceeds the number of elements allocated by the variable an error is returned.rowid
- the rowid which should be set.
pub fn set_from_stmt(&self, pos: u32, stmt: &Statement) -> Result<()>
[src]
Sets the variable value to the specified statement.
pos
- the array position in the variable which is to be set. The first position is 0. If the position exceeds the number of elements allocated by the variable an error is returned.stmt
- the statement which should be set.
pub fn set_num_elements_in_array(&self, num_elements: u32) -> Result<()>
[src]
Sets the number of elements in a PL/SQL index-by table.
num_elements
- he number of elements that PL/SQL should consider part of the array. This number should not exceed the number of elements that have been allocated in the variable.