pub struct TextColumnView<'c, C> { /* private fields */ }
Expand description

Allows read only access to the valid part of a text column.

You may ask, why is this type required, should we not just be able to use &TextColumn? The problem with TextColumn is, that it is a buffer, but it has no idea how many of its members are actually valid, and have been returned with the last row group of the the result set. That number is maintained on the level of the entire column buffer. So a text column knows the number of valid rows, in addition to holding a reference to the buffer, in order to guarantee, that every element acccessed through it, is valid.

Implementations

The number of valid elements in the text column.

True if, and only if there are no valid rows in the column buffer.

Slice of text at the specified row index without terminating zero.

Iterator over the valid elements of the text buffer

Length of value at the specified position. This is different from an indicator as it refers to the length of the value in the buffer, not to the length of the value in the datasource. The two things are different for truncated values.

Provides access to the raw underlying value buffer. Normal applications should have little reason to call this method. Yet it may be useful for writing bindings which copy directly from the ODBC in memory representation into other kinds of buffers.

The buffer contains the bytes for every non null valid element, padded to the maximum string length. The content of the padding bytes is undefined. Usually ODBC drivers write a terminating zero at the end of each string. For the actual value length call [Self::conten_length_at]. Any element starts at index * (Self::max_len + 1).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.