Struct holochain_state::query::prelude::Row[]

pub struct Row<'stmt> { /* fields omitted */ }
Expand description

A single result row of a query.

Implementations

Get the value of a particular column of the result row.

Failure

Panics if calling row.get(idx) would return an error, including:

  • If the underlying SQLite column type is not a valid type as a source for T
  • If the underlying SQLite integral value is outside the range representable by T
  • If idx is outside the range of columns in the returned query

Get the value of a particular column of the result row.

Failure

Returns an Error::InvalidColumnType if the underlying SQLite column type is not a valid type as a source for T.

Returns an Error::InvalidColumnIndex if idx is outside the valid column range for this row.

Returns an Error::InvalidColumnName if idx is not a valid column name for this row.

If the result type is i128 (which requires the i128_blob feature to be enabled), and the underlying SQLite column is a blob whose size is not 16 bytes, Error::InvalidColumnType will also be returned.

Get the value of a particular column of the result row as a ValueRef, allowing data to be read out of a row without copying.

This ValueRef is valid only as long as this Row, which is enforced by it’s lifetime. This means that while this method is completely safe, it can be somewhat difficult to use, and most callers will be better served by get or get_unwrap.

Failure

Returns an Error::InvalidColumnIndex if idx is outside the valid column range for this row.

Returns an Error::InvalidColumnName if idx is not a valid column name for this row.

Get the value of a particular column of the result row as a ValueRef, allowing data to be read out of a row without copying.

This ValueRef is valid only as long as this Row, which is enforced by it’s lifetime. This means that while this method is completely safe, it can be difficult to use, and most callers will be better served by get or get_unwrap.

Failure

Panics if calling row.get_ref(idx) would return an error, including:

  • If idx is outside the range of columns in the returned query.
  • If idx is not a valid column name for this row.
👎 Deprecated:

Use get_ref instead.

Renamed to get_ref.

👎 Deprecated:

Use get_ref_unwrap instead.

Renamed to get_ref_unwrap.

Trait Implementations

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more