pub struct DbObjectAttr {
pub name: String,
pub oracle_type: OracleType,
pub max_size: u32,
pub precision: u8,
pub scale: i8,
pub nullable: bool,
pub object_type_name: Option<String>,
}Expand description
An attribute of a database object type
Fields§
§name: StringAttribute name
oracle_type: OracleTypeOracle data type
max_size: u32Maximum size (for strings/raw)
precision: u8Precision (for numbers)
scale: i8Scale (for numbers)
nullable: boolWhether the attribute is nullable
object_type_name: Option<String>Nested object type name (for object attributes)
Implementations§
Source§impl DbObjectAttr
impl DbObjectAttr
Sourcepub fn new(name: impl Into<String>, oracle_type: OracleType) -> Self
pub fn new(name: impl Into<String>, oracle_type: OracleType) -> Self
Create a new attribute
Sourcepub fn with_max_size(self, size: u32) -> Self
pub fn with_max_size(self, size: u32) -> Self
Set maximum size
Sourcepub fn with_precision(self, precision: u8, scale: i8) -> Self
pub fn with_precision(self, precision: u8, scale: i8) -> Self
Set precision and scale
Sourcepub fn with_object_type(self, type_name: impl Into<String>) -> Self
pub fn with_object_type(self, type_name: impl Into<String>) -> Self
Set nested object type
Trait Implementations§
Source§impl Clone for DbObjectAttr
impl Clone for DbObjectAttr
Source§fn clone(&self) -> DbObjectAttr
fn clone(&self) -> DbObjectAttr
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 DbObjectAttr
impl RefUnwindSafe for DbObjectAttr
impl Send for DbObjectAttr
impl Sync for DbObjectAttr
impl Unpin for DbObjectAttr
impl UnwindSafe for DbObjectAttr
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)