SqlQueryResult

Struct SqlQueryResult 

Source
pub struct SqlQueryResult { /* private fields */ }
Expand description

Represents a server side SQL result set.

A SqlQueryResult instance can only be used while the transaction is alive.

thread unsafe

§Examples

use tsubakuro_rust_core::prelude::*;

async fn example(client: &SqlClient, transaction: &Transaction) -> Result<(), TgError> {
    let sql = "select pk, value from tb order by pk";
    let mut query_result = client.query(transaction, sql).await?;

    while query_result.next_row().await? {
        if query_result.next_column().await? {
            let pk: i32 = query_result.fetch().await?; // not null
            println!("pk={}", pk);
        }
        if query_result.next_column().await? {
            let value: Option<String> = query_result.fetch().await?; // nullable
            println!("value={:?}", value);
        }
    }

    query_result.close().await?;

    Ok(())
}

Implementations§

Source§

impl SqlQueryResult

Source

pub fn set_default_timeout(&mut self, timeout: Duration)

Set default timeout.

Source

pub fn default_timeout(&mut self) -> &Duration

Get default timeout.

Source

pub fn get_metadata(&self) -> Option<&SqlQueryResultMetadata>

Returns the metadata of this query result.

§Examples
use tsubakuro_rust_core::prelude::*;

async fn example(mut query_result: SqlQueryResult) -> Result<(), TgError> {
    let metadata = query_result.get_metadata().unwrap().clone();
    let columns = metadata.columns();

    while query_result.next_row().await? {
        for column in columns {
            let column_name = column.name();

            assert!(query_result.next_column().await?);
            if query_result.is_null()? {
                continue;
            }
            match column.atom_type().unwrap() {
                AtomType::Int4 => { // int
                    let value: i32 = query_result.fetch().await?;
                }
                AtomType::Int8 => { // bigint
                    let value: i64 = query_result.fetch().await?;
                }
                AtomType::Character => { // char, varchar
                    let value: String = query_result.fetch().await?;
                }
                _ => panic!(),
            };
        }
    }

    query_result.close().await?;

    Ok(())
}
Source§

impl SqlQueryResult

Source

pub async fn next_row(&mut self) -> Result<bool, TgError>

Advances the cursor to the head of the next row.

If this operation was succeeded (returns true), this cursor points the head of the next row. After this operation, you need to invoke Self::next_column to retrieve the first column data of the next row.

Source

pub async fn next_row_for(&mut self, timeout: Duration) -> Result<bool, TgError>

Advances the cursor to the head of the next row.

If this operation was succeeded (returns true), this cursor points the head of the next row. After this operation, you need to invoke Self::next_column to retrieve the first column data of the next row.

Source

pub async fn next_column(&mut self) -> Result<bool, TgError>

Advances the cursor to the next column in the current row.

If this operation was succeeded (returns true), this cursor will point to the next column of the row. You can invoke Self::fetch method to obtain the column value.

Source

pub async fn next_column_for( &mut self, timeout: Duration, ) -> Result<bool, TgError>

Advances the cursor to the next column in the current row.

If this operation was succeeded (returns true), this cursor will point to the next column of the row. You can invoke Self::fetch method to obtain the column value.

Source

pub fn is_null(&mut self) -> Result<bool, TgError>

Returns whether or not the column on this cursor is NULL.

Source§

impl SqlQueryResult

Source

pub fn set_close_timeout(&mut self, timeout: Duration)

Set close timeout.

since 0.3.0

Source

pub fn close_timeout(&self) -> Duration

Get close timeout.

since 0.3.0

Source

pub async fn close(&mut self) -> Result<(), TgError>

Disposes this resource.

since 0.3.0

Source

pub async fn close_for(&mut self, timeout: Duration) -> Result<(), TgError>

Disposes this resource.

since 0.3.0

Source

pub fn is_closed(&self) -> bool

Check if this resource is closed.

since 0.3.0

Trait Implementations§

Source§

impl Debug for SqlQueryResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SqlQueryResultFetch<(NaiveTime, FixedOffset)> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(NaiveTime, FixedOffset), TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<(NaiveTime, FixedOffset), TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<(Time, UtcOffset)> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(Time, UtcOffset), TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<(Time, UtcOffset), TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<BigDecimal> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<BigDecimal, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DECIMAL value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<BigDecimal, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DECIMAL value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<BytesMut> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<BytesMut, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a OCTET value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<BytesMut, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a OCTET value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<Date> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Date, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DATE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Date, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DATE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<DateTime<FixedOffset>> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<DateTime<FixedOffset>, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<DateTime<FixedOffset>, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<DateTime<Utc>> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<DateTime<Utc>, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<DateTime<Utc>, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<Decimal> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Decimal, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DECIMAL value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Decimal, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DECIMAL value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<NaiveDate> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<NaiveDate, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DATE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<NaiveDate, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DATE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<NaiveDateTime> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<NaiveDateTime, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<NaiveDateTime, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<NaiveTime> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<NaiveTime, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<NaiveTime, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<OffsetDateTime> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<OffsetDateTime, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<OffsetDateTime, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl<T> SqlQueryResultFetch<Option<T>> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<T>, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a Option<T> value on the column of the cursor position.

You can only take once to retrieve the value on the column.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Option<T>, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a Option<T> value on the column of the cursor position.

You can only take once to retrieve the value on the column.

Source§

impl SqlQueryResultFetch<PrimitiveDateTime> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<PrimitiveDateTime, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<PrimitiveDateTime, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<String> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<String, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a CHARACTER value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<String, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a CHARACTER value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<TgBlobReference> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgBlobReference, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a BLOB value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

See SqlClient::open_blob, copy_blob_to.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgBlobReference, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a BLOB value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

See SqlClient::open_blob, copy_blob_to.

Source§

impl SqlQueryResultFetch<TgClobReference> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgClobReference, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a CLOB value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

See SqlClient::open_clob, copy_clob_to.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgClobReference, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a CLOB value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

See SqlClient::open_clob, copy_clob_to.

Source§

impl SqlQueryResultFetch<TgDate> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgDate, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DATE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgDate, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DATE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<TgDecimalI128> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgDecimalI128, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DECIMAL value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgDecimalI128, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DECIMAL value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<TgDecimalResult> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgDecimalResult, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DECIMAL value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgDecimalResult, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a DECIMAL value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<TgTimeOfDay> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgTimeOfDay, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgTimeOfDay, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<Time> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Time, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Time, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<TimeOfDayWithTimeZone> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgTimeOfDayWithTimeZone, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgTimeOfDayWithTimeZone, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_OF_DAY_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<TimePoint> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgTimePoint, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgTimePoint, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<TimePointWithTimeZone> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<TgTimePointWithTimeZone, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<TgTimePointWithTimeZone, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a TIME_POINT_WITH_TIME_ZONE value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<Vec<u8>> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a OCTET value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a OCTET value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<bool> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<bool, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a BOOLEAN value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<bool, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a BOOLEAN value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<f32> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<f32, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a FLOAT4 value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<f32, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a FLOAT4 value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<f64> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<f64, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a FLOAT8 value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<f64, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a FLOAT8 value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<i32> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<i32, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a INT4 value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<i32, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a INT4 value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

impl SqlQueryResultFetch<i64> for SqlQueryResult

Source§

fn fetch<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<i64, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a INT8 value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Source§

fn fetch_for<'life0, 'async_trait>( &'life0 mut self, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<i64, TgError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves a INT8 value on the column of the cursor position.

You can only take once to retrieve the value on the column.

This method can only be used while the transaction is alive.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,