pub struct DbObjectType {
pub schema: String,
pub name: String,
pub package_name: Option<String>,
pub is_collection: bool,
pub collection_type: Option<CollectionType>,
pub element_type: Option<OracleType>,
pub element_type_name: Option<String>,
pub attributes: Vec<DbObjectAttr>,
pub oid: Option<Vec<u8>>,
}Expand description
A database object type definition
Fields§
§schema: StringSchema name
name: StringType name
package_name: Option<String>Package name (for PL/SQL types)
is_collection: boolWhether this is a collection type
collection_type: Option<CollectionType>Collection type (if this is a collection)
element_type: Option<OracleType>Element type for collections
element_type_name: Option<String>Element type name for object collections
attributes: Vec<DbObjectAttr>Attributes (for object types)
oid: Option<Vec<u8>>OID of the type
Implementations§
Source§impl DbObjectType
impl DbObjectType
Sourcepub fn new(schema: impl Into<String>, name: impl Into<String>) -> Self
pub fn new(schema: impl Into<String>, name: impl Into<String>) -> Self
Create a new object type
Sourcepub fn collection(
schema: impl Into<String>,
name: impl Into<String>,
collection_type: CollectionType,
element_type: OracleType,
) -> Self
pub fn collection( schema: impl Into<String>, name: impl Into<String>, collection_type: CollectionType, element_type: OracleType, ) -> Self
Create a collection type
Sourcepub fn add_attribute(&mut self, attr: DbObjectAttr)
pub fn add_attribute(&mut self, attr: DbObjectAttr)
Add an attribute
Sourcepub fn attribute(&self, name: &str) -> Option<&DbObjectAttr>
pub fn attribute(&self, name: &str) -> Option<&DbObjectAttr>
Get an attribute by name
Sourcepub fn attribute_count(&self) -> usize
pub fn attribute_count(&self) -> usize
Get the number of attributes
Trait Implementations§
Source§impl Clone for DbObjectType
impl Clone for DbObjectType
Source§fn clone(&self) -> DbObjectType
fn clone(&self) -> DbObjectType
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DbObjectType
impl RefUnwindSafe for DbObjectType
impl Send for DbObjectType
impl Sync for DbObjectType
impl Unpin for DbObjectType
impl UnwindSafe for DbObjectType
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)