proof_of_sql::base::database::owned_table_utility

Function decimal75

Source
pub fn decimal75<S: Scalar>(
    name: impl Deref<Target = str>,
    precision: u8,
    scale: i8,
    data: impl IntoIterator<Item = impl Into<S>>,
) -> (Identifier, OwnedColumn<S>)
Expand description

Creates a (Identifier, OwnedColumn) pair for a decimal75 column. This is primarily intended for use in conjunction with owned_table.

§Example

use proof_of_sql::base::{database::owned_table_utility::*, scalar::Curve25519Scalar};
let result = owned_table::<Curve25519Scalar>([
    decimal75("a", 12, 1, [1, 2, 3]),
]);

§Panics

  • Panics if name.parse() fails to convert the name into an Identifier.
  • Panics if creating the Precision from the specified precision value fails.