proof_of_sql::base

Module database

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

Modules§

  • 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.
  • Utility functions for creating OwnedTables and OwnedColumns. These functions are primarily intended for use in tests.
  • Utility functions for creating Tables and Columns. These functions are primarily intended for use in tests.

Structs§

  • This type is used to represent the metadata of a column in a table. Namely: it’s name and type.
  • Reference of a SQL column
  • A table of data, with schema included. This is simply a map from Identifier to OwnedColumn, 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 arrow RecordBatch.
  • 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.
  • A table of data, with schema included. This is simply a map from Identifier to Column, 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 arrow RecordBatch.
  • The result of evaluating a table
  • Options for creating a table. Inspired by RecordBatchOptions
  • Expression for an SQL table
  • 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§

Traits§

  • Access commitments of database columns.
  • Access database columns of an in-memory table span.
  • Access metadata of a table span in a database.
  • Access tables and their schemas in a database.
  • A trait that defines the interface for a combined metadata, schema, commitment, and data accessor for unit testing or example purposes.

Functions§

  • 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.
  • Determine the output type of a division operation if it is possible to multiply the two input types. If the types are not compatible, return an error.
  • 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§