Enum hdbconnect::HdbValue[][src]

pub enum HdbValue {
    NOTHING,
    TINYINT(u8),
    SMALLINT(i16),
    INT(i32),
    BIGINT(i64),
    DECIMAL(BigDecimal),
    REAL(f32),
    DOUBLE(f64),
    CHAR(String),
    VARCHAR(String),
    NCHAR(String),
    NVARCHAR(String),
    BINARY(Vec<u8>),
    VARBINARY(Vec<u8>),
    CLOB(CLob),
    NCLOB(NCLob),
    BLOB(BLob),
    BOOLEAN(bool),
    STRING(String),
    NSTRING(String),
    BSTRING(Vec<u8>),
    SMALLDECIMAL(BigDecimal),
    TEXT(String),
    SHORTTEXT(String),
    LONGDATE(LongDate),
    SECONDDATE(SecondDate),
    DAYDATE(DayDate),
    SECONDTIME(SecondTime),
    N_TINYINT(Option<u8>),
    N_SMALLINT(Option<i16>),
    N_INT(Option<i32>),
    N_BIGINT(Option<i64>),
    N_DECIMAL(Option<BigDecimal>),
    N_REAL(Option<f32>),
    N_DOUBLE(Option<f64>),
    N_CHAR(Option<String>),
    N_VARCHAR(Option<String>),
    N_NCHAR(Option<String>),
    N_NVARCHAR(Option<String>),
    N_BINARY(Option<Vec<u8>>),
    N_VARBINARY(Option<Vec<u8>>),
    N_CLOB(Option<CLob>),
    N_NCLOB(Option<NCLob>),
    N_BLOB(Option<BLob>),
    N_BOOLEAN(Option<bool>),
    N_STRING(Option<String>),
    N_NSTRING(Option<String>),
    N_BSTRING(Option<Vec<u8>>),
    N_SMALLDECIMAL(Option<BigDecimal>),
    N_TEXT(Option<String>),
    N_SHORTTEXT(Option<String>),
    N_SECONDDATE(Option<SecondDate>),
    N_DAYDATE(Option<DayDate>),
    N_SECONDTIME(Option<SecondTime>),
    N_LONGDATE(Option<LongDate>),
}

Enum for all supported database value types.

Variants

Internally used only. Is swapped in where a real value (any of the others) is swapped out.

Stores an 8-bit unsigned integer. The minimum value is 0. The maximum value is 255.

Stores a 16-bit signed integer. The minimum value is -32,768. The maximum value is 32,767.

Stores a 32-bit signed integer. The minimum value is -2,147,483,648. The maximum value is 2,147,483,647.

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(p, s) is the SQL standard notation for fixed-point decimal. "p" specifies precision or the number of total digits (the sum of whole digits and fractional digits). "s" denotes scale or the number of fractional digits. If a column is defined as DECIMAL(5, 4) for example, the numbers 3.14, 3.1415, 3.141592 are stored in the column as 3.1400, 3.1415, 3.1415, retaining the specified precision(5) and scale(4).

Precision p can range from 1 to 38, scale s can range from 0 to p. If the scale is not specified, it defaults to 0. If precision and scale are not specified, DECIMAL becomes a floating-point decimal number. In this case, precision and scale can vary within the range 1 to 34 for precision and -6,111 to 6,176 for scale, depending on the stored value.

Examples: 0.0000001234 (1234E-10) has precision 4 and scale 10. 1.0000001234 (10000001234E-10) has precision 11 and scale 10. The value 1234000000 (1234E6) has precision 4 and scale -6.

Stores a single-precision 32-bit floating-point number.

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.

Fixed-length character String, only ASCII-7 allowed.

The VARCHAR(n) data type specifies a variable-length character string, where n indicates the maximum length in bytes and is an integer between 1 and 5000. If the VARCHAR(n) data type is used in a DML query, for example CAST (A as VARCHAR(n)), indicates the maximum length of the string in characters. SAP recommends using VARCHAR with ASCII characters based strings only. For data containing other characters, SAP recommends using the NVARCHAR data type instead.

Fixed-length character string.

The NVARCHAR(n) data type specifies a variable-length Unicode character set string, where indicates the maximum length in characters and is an integer between 1 and 5000.

The BINARY(n) data type is used to store binary data of a specified length in bytes, where n indicates the fixed length and is an integer between 1 and 5000.

The VARBINARY(n) data type is used to store binary data of a specified maximum length in bytes, where n indicates the maximum length and is an integer between 1 and 5000.

The CLOB data type is used to store a large ASCII character string.

The NCLOB data type is used to store a large Unicode string.

The BLOB data type is used to store a large binary string.

BOOLEAN stores boolean values, which are TRUE or FALSE.

The DB returns all Strings as type STRING, independent of the concrete column type.

Likely not used?

The DB returns all binary values as type BSTRING.

The SMALLDECIMAL is a floating-point decimal number. The precision and scale can vary within the range 1~16 for precision and -369~368 for scale, depending on the stored value.
SMALLDECIMAL is only supported on the HANA column store. DECIMAL and SMALLDECIMAL are floating-point types. For instance, a decimal column can store any of 3.14, 3.1415, 3.141592 whilst maintaining their precision. DECIMAL(p, s) is the SQL standard notation for fixed-point decimal. 3.14, 3.1415, 3.141592 are stored in a decimal(5, 4) column as 3.1400, 3.1415, 3.1415 for example, retaining the specified precision(5) and scale(4).

The TEXT data type enables text search features. This data type can be defined for column tables, but not for row tables. This is not a standalone SQL-Type. Selecting a TEXT column yields a column of type NCLOB.

Similar to TEXT.

Timestamp with 10^-7 seconds precision, uses eight bytes.

TIMESTAMP with second precision.

DATE.

TIME.

Nullable variant of TINYINT.

Nullable variant of SMALLINT.

Nullable variant of INT.

Nullable variant of BIGINT.

Nullable variant of DECIMAL and DECIMAL(p,s).

Nullable variant of REAL.

Nullable variant of DOUBLE.

Nullable variant of CHAR.

Nullable variant of VARCHAR.

Nullable variant of NCHAR.

Nullable variant of NVARCHAR.

Nullable variant of BINARY.

Nullable variant of VARBINARY.

Nullable variant of CLOB.

Nullable variant of NCLOB.

Nullable variant of BLOB.

Nullable variant of BOOLEAN.

Nullable variant of STRING.

Nullable variant of NSTRING.

Nullable variant of BSTRING.

Nullable variant of SMALLDECIMAL.

Nullable variant of TEXT.

Nullable variant of SHORTTEXT.

Nullable variant of SECONDDATE.

Nullable variant of DAYDATE.

Nullable variant of SECONDTIME.

Nullable variant of LONGDATE.

Methods

impl HdbValue
[src]

Deserialize into a rust type

Trait Implementations

impl Clone for HdbValue
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for HdbValue
[src]

Formats the value using the given formatter. Read more

impl Display for HdbValue
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for HdbValue

impl !Sync for HdbValue