pub struct Descriptor<'stmt> { /* private fields */ }
Expand description
A descriptor associated with a statement. This wrapper does not wrap explicitly allocated descriptors which have the connection as parent, but usually implicitly allocated ones associated with the statement. It could also represent an explicitly allocated one, but ony in the context there it is associated with a statement and currently borrowed from it.
- IPD Implementation parameter descriptor
- APD Application parameter descriptor
- IRD Implemenation row descriptor
- ARD Application row descriptor
Implementations§
Source§impl<'stmt> Descriptor<'stmt>
impl<'stmt> Descriptor<'stmt>
Sourcepub unsafe fn new(handle: HDesc) -> Self
pub unsafe fn new(handle: HDesc) -> Self
§Safety
Call this method only with a valid (successfully allocated) ODBC descriptor handle.
Sourcepub fn set_precision(
&mut self,
rec_number: i16,
precision: i16,
) -> SqlResult<()>
pub fn set_precision( &mut self, rec_number: i16, precision: i16, ) -> SqlResult<()>
Number of digits for an exact numeric type, the number of bits in the mantissa (binary precision) for an approximate numeric type, or the numbers of digits in the fractional seconds component for the SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP, or SQL_INTERVAL_SECOND data type. This field is undefined for all other data types. See: https://learn.microsoft.com/sql/odbc/reference/syntax/sqlsetdescfield-function
Sourcepub fn set_scale(&mut self, rec_number: i16, scale: i16) -> SqlResult<()>
pub fn set_scale(&mut self, rec_number: i16, scale: i16) -> SqlResult<()>
The defined scale for decimal and numeric data types. The field is undefined for all other data types.
Trait Implementations§
Source§impl<'stmt> AsHandle for Descriptor<'stmt>
impl<'stmt> AsHandle for Descriptor<'stmt>
Source§fn as_handle(&self) -> Handle
fn as_handle(&self) -> Handle
Source§fn handle_type(&self) -> HandleType
fn handle_type(&self) -> HandleType
as_handle
. This is a method rather than a constant
in order to make the type object safe.Auto Trait Implementations§
impl<'stmt> Freeze for Descriptor<'stmt>
impl<'stmt> RefUnwindSafe for Descriptor<'stmt>
impl<'stmt> !Send for Descriptor<'stmt>
impl<'stmt> !Sync for Descriptor<'stmt>
impl<'stmt> Unpin for Descriptor<'stmt>
impl<'stmt> UnwindSafe for Descriptor<'stmt>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Diagnostics for T
impl<T> Diagnostics for T
Source§fn diagnostic_record(
&self,
rec_number: i16,
message_text: &mut [u16],
) -> Option<DiagnosticResult>
fn diagnostic_record( &self, rec_number: i16, message_text: &mut [u16], ) -> Option<DiagnosticResult>
Source§fn diagnostic_record_vec(
&self,
rec_number: i16,
message_text: &mut Vec<SqlChar>,
) -> Option<DiagnosticResult>
fn diagnostic_record_vec( &self, rec_number: i16, message_text: &mut Vec<SqlChar>, ) -> Option<DiagnosticResult>
Self::diagnostic_record
, if the message does not fit in the
buffer, it will grow the message buffer and extract it again. Read more