Expand description
Module with database related functionality. In particular, this module contains the
accessor traits and the OwnedTable
type along with some utility functions to convert
between Arrow and OwnedTable
.
Re-exports§
pub use crate::base::arrow::arrow_array_to_column_conversion::ArrayRefExt;
pub use crate::base::arrow::arrow_array_to_column_conversion::ArrowArrayToColumnConversionError;
pub use crate::base::arrow::owned_and_arrow_conversions::OwnedArrowConversionError;
pub use crate::base::arrow::scalar_and_i256_conversions;
Modules§
- arrow_
schema_ utility - This module provides utility functions for working with Arrow schemas in the context of Proof of SQL. It includes functionality to convert Arrow schemas to PoSQL-compatible formats.
- owned_
table_ utility - Utility functions for creating
OwnedTable
s andOwnedColumn
s. These functions are primarily intended for use in tests. - table_
utility - Utility functions for creating
Table
s andColumn
s. These functions are primarily intended for use in tests.
Structs§
- Column
Field - This type is used to represent the metadata of a column in a table. Namely: it’s name and type.
- Column
Ref - Reference of a SQL column
- Owned
Table - A table of data, with schema included. This is simply a map from
Ident
toOwnedColumn
, where columns order matters. This is primarily used as an internal result that is used before converting to the final result in either Arrow format or JSON. This is the analog of an arrowRecordBatch
. - Owned
Table Test Accessor - A test accessor that uses
OwnedTable
as the underlying table type. Note: this is intended for testing and examples. It is not optimized for performance, so should not be used for benchmarks or production use-cases. - Table
- A table of data, with schema included. This is simply a map from
Ident
toColumn
, where columns order matters. This is primarily used as an internal result that is used before converting to the final result in either Arrow format or JSON. This is the analog of an arrowRecordBatch
. - Table
Evaluation - The result of evaluating a table
- Table
Options - Options for creating a table.
Inspired by
RecordBatchOptions
- Table
Ref - Expression for an SQL table
- Table
Test Accessor - A test accessor that uses
Table
as the underlying table type. Note: this is intended for testing and examples. It is not optimized for performance, so should not be used for benchmarks or production use-cases.
Enums§
- Column
- Represents a read-only view of a column in an in-memory, column-oriented database.
- Column
Operation Error - Errors from operations on columns.
- Column
Type - Represents the supported data types of a column in an in-memory, column-oriented database.
- Columnar
Value - The result of evaluating an expression.
- Expression
Evaluation Error - Errors from evaluation of
Expression
s. - Literal
Value - Represents a literal value.
- Owned
Column - Supported types for
OwnedColumn
- Owned
Column Error - Errors from operations related to
OwnedColumn
s. - Owned
Table Error - An error that occurs when working with tables.
- Table
Operation Error - Errors from operations on tables.
Traits§
- Commitment
Accessor - Access commitments of database columns.
- Data
Accessor - Access database columns of an in-memory table span.
- Metadata
Accessor - Access metadata of a table span in a database.
- Schema
Accessor - Access tables and their schemas in a database.
- Test
Accessor - A trait that defines the interface for a combined metadata, schema, commitment, and data accessor for unit testing or example purposes.
Functions§
- try_
add_ subtract_ column_ types - Determine the output type of an add or subtract operation if it is possible to add or subtract the two input types. If the types are not compatible, return an error.
- try_
divide_ column_ types - Determine the output type of a division operation if it is possible to divide the two input types. If the types are not compatible, return an error.
- try_
multiply_ column_ types - Determine the output type of a multiplication operation if it is possible to multiply the two input types. If the types are not compatible, return an error.
Type Aliases§
- Column
Operation Result - Result type for column operations
- Expression
Evaluation Result - Result type for expression evaluation
- Owned
Column Result - Result type for operations related to
OwnedColumn
s. - Table
Operation Result - Result type for table operations