pub enum HdbValue<'a> {
Show 24 variants
NULL,
TINYINT(u8),
SMALLINT(i16),
INT(i32),
BIGINT(i64),
DECIMAL(BigDecimal),
REAL(f32),
DOUBLE(f64),
BINARY(Vec<u8>),
ASYNC_CLOB(CLob),
ASYNC_NCLOB(NCLob),
ASYNC_BLOB(BLob),
ASYNC_LOBSTREAM(Option<Arc<Mutex<dyn AsyncRead + Send + Unpin>>>),
BOOLEAN(bool),
STRING(String),
DBSTRING(Vec<u8>),
STR(&'a str),
LONGDATE(LongDate),
SECONDDATE(SecondDate),
DAYDATE(DayDate),
SECONDTIME(SecondTime),
GEOMETRY(Vec<u8>),
POINT(Vec<u8>),
ARRAY(Vec<HdbValue<'a>>),
}Expand description
Enum for all supported database value types.
Variants§
NULL
Representation of a database NULL value.
TINYINT(u8)
Stores an 8-bit unsigned integer. The minimum value is 0. The maximum value is 255.
SMALLINT(i16)
Stores a 16-bit signed integer. The minimum value is -32,768. The maximum value is 32,767.
INT(i32)
Stores a 32-bit signed integer. The minimum value is -2,147,483,648. The maximum value is 2,147,483,647.
BIGINT(i64)
Stores a 64-bit signed integer. The minimum value is -9,223,372,036,854,775,808. The maximum value is 9,223,372,036,854,775,807.
DECIMAL(BigDecimal)
Representation for fixed-point decimal values.
REAL(f32)
Stores a single-precision 32-bit floating-point number.
DOUBLE(f64)
Stores a double-precision 64-bit floating-point number. The minimum value is -1.7976931348623157E308, the maximum value is 1.7976931348623157E308 . The smallest positive DOUBLE value is 2.2250738585072014E-308 and the largest negative DOUBLE value is -2.2250738585072014E-308.
BINARY(Vec<u8>)
Stores binary data.
ASYNC_CLOB(CLob)
Stores a large ASCII character string.
ASYNC_NCLOB(NCLob)
Stores a large Unicode string.
ASYNC_BLOB(BLob)
Stores a large binary string.
ASYNC_LOBSTREAM(Option<Arc<Mutex<dyn AsyncRead + Send + Unpin>>>)
Used for streaming LOBs to the database (see
PreparedStatement::execute_row()).
BOOLEAN(bool)
BOOLEAN stores boolean values, which are TRUE or FALSE.
STRING(String)
The DB returns all valid Strings as type STRING, independent of the concrete column type.
DBSTRING(Vec<u8>)
In rare cases, when the database sends invalid CESU-8, we fall back to this type.
STR(&'a str)
Can be used for avoiding cloning when sending large Strings to the database (see
PreparedStatement::execute_row()).
LONGDATE(LongDate)
Timestamp with 10^-7 seconds precision, uses eight bytes.
SECONDDATE(SecondDate)
TIMESTAMP with second precision.
DAYDATE(DayDate)
DATE with day precision.
SECONDTIME(SecondTime)
TIME with second precision.
GEOMETRY(Vec<u8>)
Spatial type GEOMETRY.
POINT(Vec<u8>)
Spatial type POINT.
ARRAY(Vec<HdbValue<'a>>)
HANA’s array type
Implementations§
Source§impl HdbValue<'static>
impl HdbValue<'static>
Sourcepub fn try_into<'x, T>(self) -> Result<T, HdbError>where
T: Deserialize<'x>,
pub fn try_into<'x, T>(self) -> Result<T, HdbError>where
T: Deserialize<'x>,
Deserialize into a rust type.
§Errors
HdbError::DeserializationError if the target type does not fit.
Sourcepub fn try_into_async_blob(self) -> Result<BLob, HdbError>
pub fn try_into_async_blob(self) -> Result<BLob, HdbError>
Sourcepub fn try_into_async_clob(self) -> Result<CLob, HdbError>
pub fn try_into_async_clob(self) -> Result<CLob, HdbError>
Trait Implementations§
Source§impl DbValueInto<String> for HdbValue<'static>
impl DbValueInto<String> for HdbValue<'static>
Source§impl DbValueInto<bool> for HdbValue<'static>
impl DbValueInto<bool> for HdbValue<'static>
Source§impl DbValueInto<f32> for HdbValue<'static>
impl DbValueInto<f32> for HdbValue<'static>
Source§impl DbValueInto<f64> for HdbValue<'static>
impl DbValueInto<f64> for HdbValue<'static>
Source§impl DbValueInto<i16> for HdbValue<'static>
impl DbValueInto<i16> for HdbValue<'static>
Source§impl DbValueInto<i32> for HdbValue<'static>
impl DbValueInto<i32> for HdbValue<'static>
Source§impl DbValueInto<i64> for HdbValue<'static>
impl DbValueInto<i64> for HdbValue<'static>
Source§impl DbValueInto<i8> for HdbValue<'static>
impl DbValueInto<i8> for HdbValue<'static>
Source§impl DbValueInto<u16> for HdbValue<'static>
impl DbValueInto<u16> for HdbValue<'static>
Source§impl DbValueInto<u32> for HdbValue<'static>
impl DbValueInto<u32> for HdbValue<'static>
Source§impl DbValueInto<u64> for HdbValue<'static>
impl DbValueInto<u64> for HdbValue<'static>
Source§impl DbValueInto<u8> for HdbValue<'static>
impl DbValueInto<u8> for HdbValue<'static>
Auto Trait Implementations§
impl<'a> Freeze for HdbValue<'a>
impl<'a> !RefUnwindSafe for HdbValue<'a>
impl<'a> Send for HdbValue<'a>
impl<'a> Sync for HdbValue<'a>
impl<'a> Unpin for HdbValue<'a>
impl<'a> !UnwindSafe for HdbValue<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);