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§
impl Copy for DuckTime
Source§impl DuckValueType for DuckTime
DuckValueType 实现:按 TIME 读写。
impl DuckValueType for DuckTime
DuckValueType 实现:按 TIME 读写。
DuckValueType implementation: reads and writes as TIME.
Source§fn read_valid_by_vector_reader(reader: &VectorReader, row: usize) -> Self
fn read_valid_by_vector_reader(reader: &VectorReader, row: usize) -> Self
从裸
VectorReader 读取一个有效值(子类实现)。 Read moreSource§fn write_valid_to_vector_writer(writer: &mut VectorWriter, idx: usize, v: &Self)
fn write_valid_to_vector_writer(writer: &mut VectorWriter, idx: usize, v: &Self)
往裸
VectorWriter 写一个有效值(子类实现)。 Read moreSource§fn read_by_duck_value_valid_simple(value: &Value) -> Self
fn read_by_duck_value_valid_simple(value: &Value) -> Self
Source§fn logical_type() -> LogicalType
fn logical_type() -> LogicalType
对应的 DuckDB 逻辑类型;默认由
Self::type_id 构造,
复杂类型(LIST / MAP / ARRAY / STRUCT / DECIMAL)会重写它。 Read moreSource§fn create_reader(chunk: &DataChunk, column_index: usize) -> DuckValueReader
fn create_reader(chunk: &DataChunk, column_index: usize) -> DuckValueReader
Source§fn create_reader_from_vector(
vector: duckdb_vector,
size: usize,
) -> DuckValueReader
fn create_reader_from_vector( vector: duckdb_vector, size: usize, ) -> DuckValueReader
直接为一个裸向量创建读取器;复杂类型会额外为子向量创建子读取器。 Read more
Source§fn read(reader: &DuckValueReader, row: usize) -> Option<Self>
fn read(reader: &DuckValueReader, row: usize) -> Option<Self>
读取第
row 行的值,仅处理null,子类不能重写。 Read moreSource§fn read_valid(reader: &DuckValueReader, row: usize) -> Option<Self>
fn read_valid(reader: &DuckValueReader, row: usize) -> Option<Self>
读取一个确定有效的行;默认转发给
Self::read_valid_by_vector_reader。 Read moreSource§fn read_slot(reader: &DuckValueReader, row: usize) -> Option<Self>
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>>
fn read_slot_by_duck_value(value: &Value) -> DuckResult<Option<Self>>
Source§fn write_batch(output: duckdb_vector, output_vec: &[Option<&Self>])
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
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>)
fn write(writer: &mut DuckValueWriter, idx: usize, vo: Option<&Self>)
写入一行:仅处理null,子类不能重写、因为可能调不到。 Read more
Source§fn write_null(writer: &mut DuckValueWriter, idx: usize)
fn write_null(writer: &mut DuckValueWriter, idx: usize)
仅处理null:默认只把当前向量置为NULL。 Read more
Source§fn write_valid(writer: &mut DuckValueWriter, idx: usize, vo: &Self)
fn write_valid(writer: &mut DuckValueWriter, idx: usize, vo: &Self)
写入一个确定有效的值。 Read more
Source§fn write_finish(_writer: &mut DuckValueWriter)
fn write_finish(_writer: &mut DuckValueWriter)
批量写入收尾:默认什么都不做。 Read more
Source§fn struct_field_reader(
struct_reader: &DuckValueReader,
field_index: usize,
) -> DuckValueReader
fn struct_field_reader( struct_reader: &DuckValueReader, field_index: usize, ) -> DuckValueReader
从 STRUCT 向量中取出第
field_index 个子字段的读取器。 Read moreSource§fn struct_field_writer_batch(
struct_writer: &DuckValueWriter,
field_index: usize,
output_vec: &[Option<&Self>],
) -> DuckValueWriter
fn struct_field_writer_batch( struct_writer: &DuckValueWriter, field_index: usize, output_vec: &[Option<&Self>], ) -> DuckValueWriter
为 STRUCT 的第
field_index 个子字段创建批量写入器。 Read moreSource§fn read_by_duck_value(value: &Value) -> DuckOptionResult<Self>
fn read_by_duck_value(value: &Value) -> DuckOptionResult<Self>
Source§fn read_by_duck_value_valid(value: &Value) -> DuckResult<Self>
fn read_by_duck_value_valid(value: &Value) -> DuckResult<Self>
impl Eq for DuckTime
impl StructuralPartialEq for DuckTime
Auto Trait Implementations§
impl Freeze for DuckTime
impl RefUnwindSafe for DuckTime
impl Send for DuckTime
impl Sync for DuckTime
impl Unpin for DuckTime
impl UnsafeUnpin for DuckTime
impl UnwindSafe for DuckTime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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