Expand description
Utility functions for creating OwnedTable
s and OwnedColumn
s.
These functions are primarily intended for use in tests.
§Example
use proof_of_sql::base::{database::owned_table_utility::*, scalar::Curve25519Scalar};
let result = owned_table::<Curve25519Scalar>([
bigint("a", [1, 2, 3]),
boolean("b", [true, false, true]),
int128("c", [1, 2, 3]),
scalar("d", [1, 2, 3]),
varchar("e", ["a", "b", "c"]),
decimal75("f", 12, 1, [1, 2, 3]),
]);
Functions§
- bigint
- Creates a
(Ident, OwnedColumn)
pair for a bigint column. This is primarily intended for use in conjunction withowned_table
. - boolean
- Creates a
(Ident, OwnedColumn)
pair for a boolean column. This is primarily intended for use in conjunction withowned_table
. - decimal75
- Creates a
(Ident, OwnedColumn)
pair for a decimal75 column. This is primarily intended for use in conjunction withowned_table
. - int
- Creates a
(Ident, OwnedColumn)
pair for an int column. This is primarily intended for use in conjunction withowned_table
. - int128
- Creates a
(Ident, OwnedColumn)
pair for a int128 column. This is primarily intended for use in conjunction withowned_table
. - owned_
table - Creates an
OwnedTable
from a list of(Ident, OwnedColumn)
pairs. This is a convenience wrapper aroundOwnedTable::try_from_iter
primarily for use in tests and intended to be used along with the other methods in this module (e.g. bigint, boolean, etc). The function will panic under a variety of conditions. SeeOwnedTable::try_from_iter
for more details. - scalar
- Creates a
(Ident, OwnedColumn)
pair for a scalar column. This is primarily intended for use in conjunction withowned_table
. - smallint
- Creates a
(Ident, OwnedColumn)
pair for a smallint column. This is primarily intended for use in conjunction withowned_table
. - timestamptz
- Creates a
(Ident, OwnedColumn)
pair for a timestamp column. This is primarily intended for use in conjunction withowned_table
. - tinyint
- Creates a (Ident,
OwnedColumn
) pair for a tinyint column. This is primarily intended for use in conjunction withowned_table
. - uint8
- Creates a (Ident,
OwnedColumn
) pair for a uint8 column. This is primarily intended for use in conjunction withowned_table
. - varbinary
- Creates a
(Ident, OwnedColumn)
pair for a varbinary column. This is primarily intended for use in conjunction withowned_table
. - varchar
- Creates a
(Ident, OwnedColumn)
pair for a varchar column. This is primarily intended for use in conjunction withowned_table
.