Struct mimir::Object
[−]
[src]
pub struct Object { pub inner: *mut ODPIObject, }
This structure represents instances of the types created by the SQL command CREATE OR REPLACE TYPE
Fields
inner: *mut ODPIObject
The ODPI-C Object pointer.
Methods
impl Object
[src]
fn add_ref(&self) -> Result<()>
Adds a reference to the object. This is intended for situations where a reference to the object needs to be maintained independently of the reference returned when the object was created.
fn append_element(
&self,
native_type: ODPINativeTypeNum,
data: &mut ODPIData
) -> Result<()>
&self,
native_type: ODPINativeTypeNum,
data: &mut ODPIData
) -> Result<()>
Sets the value of the element found at the specified index.
fn copy_object(&self) -> Result<Object>
Creates an independent copy of an object and returns a reference to the newly created object. This reference should be released as soon as it is no longer needed.
fn delete_element_by_index(&self, index: i32) -> Result<()>
Deletes an element from the collection. Note that the position ordinals of the remaining elements are not changed. The delete operation creates holes in the collection.
fn get_attribute_value(
&self,
attr: &ObjectAttr,
info: &ODPIObjectAttrInfo
) -> Result<ODPIData>
&self,
attr: &ObjectAttr,
info: &ODPIObjectAttrInfo
) -> Result<ODPIData>
Returns the value of one of the object's attributes.
fn get_element_exists_by_index(&self, index: i32) -> Result<bool>
Returns whether an element exists at the specified index.
fn get_element_value_by_index(
&self,
index: i32,
native_type: ODPINativeTypeNum
) -> Result<ODPIData>
&self,
index: i32,
native_type: ODPINativeTypeNum
) -> Result<ODPIData>
Returns the value of the element found at the specified index.
fn get_first_index(&self) -> Result<(i32, bool)>
Returns the first index used in a collection.
fn get_last_index(&self) -> Result<(i32, bool)>
Returns the last index used in a collection.
fn get_next_index(&self, index: i32) -> Result<(i32, bool)>
Returns the next index used in a collection following the specified index.
fn get_prev_index(&self, index: i32) -> Result<(i32, bool)>
Returns the previous index used in a collection preceding the specified index.
fn get_size(&self) -> Result<i32>
Returns the number of elements in a collection.
fn release(&self) -> Result<()>
Releases a reference to the object. A count of the references to the object is maintained and when this count reaches zero, the memory associated with the object is freed.
fn set_attribute_value(
&self,
attribute: ObjectAttr,
native_type: ODPINativeTypeNum,
value: Data
) -> Result<()>
&self,
attribute: ObjectAttr,
native_type: ODPINativeTypeNum,
value: Data
) -> Result<()>
Sets the value of one of the object’s attributes.
fn set_element_value_by_index(
&self,
index: i32,
native_type: ODPINativeTypeNum,
value: Data
) -> Result<()>
&self,
index: i32,
native_type: ODPINativeTypeNum,
value: Data
) -> Result<()>
Sets the value of the element found at the specified index.
fn trim(&self, num_to_trim: u32) -> Result<()>
Trims a number of elements from the end of a collection.
Trait Implementations
impl Clone for Object
[src]
fn clone(&self) -> Object
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more