Module prelude

Module prelude 

Source
Expand description

Prelude exposes all the types for ic-dbms-api crate.

Structs§

Blob
Blob data type for the DBMS.
Boolean
Boolean data type for the DBMS.
ColumnDef
Defines a column in a database table.
Date
Date data type for the DBMS.
DateTime
Date time data type for the DBMS.
Decimal
Decimal data type for the DBMS.
ForeignKeyDef
Defines a foreign key relationship for a column.
IcDbmsCanisterInitArgs
IcDbmsCanisterUpgradeArgs
Int32
Integer 32-bit data type for the DBMS.
Int64
Integer 64-bit data type for the DBMS.
NoForeignFetcher
A no-op foreign fetcher that does not perform any fetching.
Principal
Principal data type for the DBMS.
Query
A struct representing a query in the DBMS.
QueryBuilder
A builder for constructing database Queryes.
Text
Text data type for the DBMS.
Uint32
Unsigned integer 32-bit data type for the DBMS.
Uint64
Unsigned integer 64-bit data type for the DBMS.
Uuid
UUID data type for the DBMS.

Enums§

DataSize
Represents the size of data types used in the DBMS canister.
DataTypeKind
An enumeration of all supported data type kinds in the DBMS.
DecodeError
An enum representing possible decoding errors.
DeleteBehavior
Defines the behavior for delete operations regarding foreign key constraints.
Filter
super::Query filters.
IcDbmsCanisterArgs
Arguments for initializing or updating an IC DBMS canister.
IcDbmsError
IcDbms Error type
MemoryError
An enum representing possible memory-related errors.
Nullable
Nullable data type for the DBMS.
OrderDirection
An enum representing the direction of ordering in a query.
QueryError
An enum representing possible errors that can occur during query operations.
Select
An enum representing the fields to select in a query.
TableError
Table related errors
TransactionError
An enum representing possible errors that can occur during transaction operations.
Value
A generic wrapper enum to hold any DBMS value.
ValuesSource
Indicates the source of the column values.

Traits§

DataType
A trait representing a data type that can be stored in the DBMS.
Database
This module defines the Database trait and related database functionalities.
Encode
This trait defines the encoding and decoding behaviour for data types used in the DBMS canister.
ForeignFetcher
This trait defines the behavior of a foreign fetcher, which is responsible for fetching data from foreign sources or databases.
InsertRecord
This trait represents a record for inserting into a table.
TableRecord
This trait represents a record returned by a crate::dbms::query::Query for a table.
TableSchema
Table schema representation.
UpdateRecord
This trait represents a record for updating a table.

Functions§

self_reference_values
Helper function which takes a list of (ValuesSource, Value) tuples, take only those with ValuesSource::Foreign matching the provided table and column names, and returns a vector of the corresponding Values. with the ValuesSource set to ValuesSource::This.

Type Aliases§

IcDbmsResult
IcDbms Result type
MSize
Size type for memory operations.
MemoryResult
The result type for memory operations.
Page
Type identifying a memory page number.
PageOffset
Type identifying an offset within a memory page.
QueryResult
The result type for query operations.
TableColumns
TableFingerprint
A type representing a unique fingerprint for a table schema.
TransactionId
Type alias for Transaction ID

Derive Macros§

Encode
Automatically implements the `Encode`` trait for a struct.
Table
Given a struct representing a database table, automatically implements the TableSchema trait with all the necessary types to work with the ic-dbms-canister. So given this struct: