Skip to main content

DuckTime

Struct DuckTime 

Source
pub struct DuckTime {
    pub micros_since_midnight: i64,
}
Expand description

DuckDB TIME(自午夜起的微秒数)。

DuckDB TIME (microseconds since midnight).

Fields§

§micros_since_midnight: i64

自 00:00:00 起的微秒数。

Microseconds since 00:00:00.

Trait Implementations§

Source§

impl Clone for DuckTime

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DuckTime

Source§

impl Debug for DuckTime

Source§

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

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

impl Default for DuckTime

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl DuckValueType for DuckTime

DuckValueType 实现:按 TIME 读写。

DuckValueType implementation: reads and writes as TIME.

Source§

fn type_id() -> TypeId

对应的 DuckDB 类型 id。 Read more
Source§

fn read_valid_by_vector_reader(reader: &VectorReader, row: usize) -> Self

从裸 VectorReader 读取一个有效值(子类实现)。 Read more
Source§

fn write_valid_to_vector_writer(writer: &mut VectorWriter, idx: usize, v: &Self)

往裸 VectorWriter 写一个有效值(子类实现)。 Read more
Source§

fn read_by_duck_value_valid_simple(value: &Value) -> Self

从非 NULL 的 Value 直接取值(子类实现,不涉及 NULL 判定)。 Read more
Source§

fn logical_type() -> LogicalType

对应的 DuckDB 逻辑类型;默认由 Self::type_id 构造, 复杂类型(LIST / MAP / ARRAY / STRUCT / DECIMAL)会重写它。 Read more
Source§

fn from_null() -> Option<Self>

本类型能否用「值」表示 SQL NULL:Some(v) 表示可以(Option<T> 返回 Some(None)), None 表示存不下 NULL。 Read more
Source§

fn create_reader(chunk: &DataChunk, column_index: usize) -> DuckValueReader

为 chunk 的第 column_index 列创建读取器。 Read more
Source§

fn create_reader_from_vector( vector: duckdb_vector, size: usize, ) -> DuckValueReader

直接为一个裸向量创建读取器;复杂类型会额外为子向量创建子读取器。 Read more
Source§

fn read(reader: &DuckValueReader, row: usize) -> Option<Self>

读取第 row 行的值,仅处理null,子类不能重写。 Read more
Source§

fn read_valid(reader: &DuckValueReader, row: usize) -> Option<Self>

读取一个确定有效的行;默认转发给 Self::read_valid_by_vector_reader。 Read more
Source§

fn read_slot(reader: &DuckValueReader, row: usize) -> Option<Self>

读取一个「槽位」(LIST/ARRAY 的元素、MAP 的键或值、STRUCT 的字段)。 Read more
Source§

fn read_slot_by_duck_value(value: &Value) -> DuckResult<Option<Self>>

Self::read_slot 的 Value 版本(表函数 bind 参数等自描述数据)。 Read more
Source§

fn write_batch(output: duckdb_vector, output_vec: &[Option<&Self>])

把一批(可为 NULL 的)值写入输出向量。 Read more
Source§

fn create_writer_batch( vector: duckdb_vector, _output_vec: &[Option<&Self>], ) -> DuckValueWriter

创建批量写入器;复杂类型会在这里预留并挂上子写入器。 Read more
Source§

fn write(writer: &mut DuckValueWriter, idx: usize, vo: Option<&Self>)

写入一行:仅处理null,子类不能重写、因为可能调不到。 Read more
Source§

fn write_null(writer: &mut DuckValueWriter, idx: usize)

仅处理null:默认只把当前向量置为NULL。 Read more
Source§

fn write_valid(writer: &mut DuckValueWriter, idx: usize, vo: &Self)

写入一个确定有效的值。 Read more
Source§

fn write_finish(_writer: &mut DuckValueWriter)

批量写入收尾:默认什么都不做。 Read more
Source§

fn struct_field_reader( struct_reader: &DuckValueReader, field_index: usize, ) -> DuckValueReader

从 STRUCT 向量中取出第 field_index 个子字段的读取器。 Read more
Source§

fn struct_field_writer_batch( struct_writer: &DuckValueWriter, field_index: usize, output_vec: &[Option<&Self>], ) -> DuckValueWriter

为 STRUCT 的第 field_index 个子字段创建批量写入器。 Read more
Source§

fn read_by_duck_value(value: &Value) -> DuckOptionResult<Self>

从 Value 读出一个值(表函数解析参数时使用);NULL 返回 Ok(None)。 Read more
Source§

fn read_by_duck_value_valid(value: &Value) -> DuckResult<Self>

从一个确定非 NULL 的 Value 读出值;默认转发给 Self::read_by_duck_value_valid_simple。 Read more
Source§

impl Eq for DuckTime

Source§

impl PartialEq for DuckTime

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DuckTime

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.