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.
- Camel
Case Validator - A validator for
CamelCasestrings. - Clamp
Sanitizer - Sanitizer that clamps integer values within a specified range.
- Clamp
Unsigned Sanitizer - Sanitizer that clamps unsigned integer values within a specified range.
- Collapse
Whitespace Sanitizer - Sanitizer that collapses multiple whitespace characters into a single space in strings.
- Column
Def - Defines a column in a database table.
- Country
Iso639 Validator - Validator for ISO639 country codes.
- Country
Iso3166 Validator - Validator for ISO3166 country codes.
- Date
- Date data type for the DBMS.
- Date
Time - Date time data type for the DBMS.
- Decimal
- Decimal data type for the DBMS.
- Email
Validator - A validator for email addresses.
- Foreign
KeyDef - Defines a foreign key relationship for a column.
- IcDbms
Canister Init Args - IcDbms
Canister Upgrade Args - Int8
- An integer type wrapper around a primitive integer type.
- Int16
- An integer type wrapper around a primitive integer type.
- Int32
- An integer type wrapper around a primitive integer type.
- Int64
- An integer type wrapper around a primitive integer type.
- Kebab
Case Validator - A validator for
kebab-casestrings. - Lower
Case Sanitizer - Sanitizer that converts strings to lowercase.
- MaxStrlen
Validator - A validator that checks if the length of a string does not exceed a maximum length.
- Mime
Type Validator - A validator that checks if a string is a valid MIME type.
- MinStrlen
Validator - A validator that checks if the length of a string is at least a minimum length.
- NoForeign
Fetcher - A no-op foreign fetcher that does not perform any fetching.
- Null
IfEmpty Sanitizer - The
NullIfEmptySanitizerstruct is used to sanitize input by converting empty strings to null values. - Phone
Number Validator - A validator for phone numbers.
- Principal
- Principal data type for the DBMS.
- Query
- A struct representing a query in the DBMS.
- Query
Builder - A builder for constructing database
Queryes. - Range
Strlen Validator - A validator that checks if the length of a string is within a specified range.
- RgbColor
Validator - A validator for RGB color strings.
- Round
ToScale Sanitizer - Sanitizer that rounds
rust_decimal::Decimalvalues to a specified scale. - Slug
Sanitizer - Sanitizer sluggifies strings by converting them to lowercase, replacing spaces with hyphens, and removing non-alphanumeric characters.
- Snake
Case Validator - A validator for
snake_casestrings. - Text
- Text data type for the DBMS.
- Timezone
Sanitizer - Sanitizer that ensures that all
crate::prelude::DateTimevalues are within a specific timezone. - Trim
Sanitizer - Sanitizer that trims leading and trailing whitespace from strings.
- Uint8
- An integer type wrapper around a primitive integer type.
- Uint16
- An integer type wrapper around a primitive integer type.
- Uint32
- An integer type wrapper around a primitive integer type.
- Uint64
- An integer type wrapper around a primitive integer type.
- Upper
Case Sanitizer - Sanitizer that converts strings to uppercase.
- UrlEncoding
Sanitizer - Sanitizer URL-encodes strings by converting them to percent-encoded format.
- UrlValidator
- A validator that checks if a string is a valid URL.
- UtcSanitizer
- Sanitizer that ensures that all
crate::prelude::DateTimevalues are within the UTC timezone. - Uuid
- UUID data type for the DBMS.
Enums§
- Data
Size - Represents the size of data types used in the DBMS canister.
- Data
Type Kind - An enumeration of all supported data type kinds in the DBMS.
- Decode
Error - An enum representing possible decoding errors.
- Delete
Behavior - Defines the behavior for delete operations regarding foreign key constraints.
- Filter
super::Queryfilters.- IcDbms
Canister Args - Arguments for initializing or updating an IC DBMS canister.
- IcDbms
Error - IcDbms Error type
- Memory
Error - An enum representing possible memory-related errors.
- Nullable
- Nullable data type for the DBMS.
- Order
Direction - An enum representing the direction of ordering in a query.
- Query
Error - An enum representing possible errors that can occur during query operations.
- Select
- An enum representing the fields to select in a query.
- Table
Error - Table related errors
- Transaction
Error - An enum representing possible errors that can occur during transaction operations.
- Value
- A generic wrapper enum to hold any DBMS value.
- Values
Source - Indicates the source of the column values.
Constants§
- DEFAULT_
ALIGNMENT - Default alignment in bytes for
DataSize::Dynamicdata types.
Traits§
- Data
Type - 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.
- Foreign
Fetcher - This trait defines the behavior of a foreign fetcher, which is responsible for fetching data from foreign sources or databases.
- Insert
Record - This trait represents a record for inserting into a table.
- Sanitize
- Trait for sanitizing
Values. - Table
Record - This trait represents a record returned by a
crate::dbms::query::Queryfor a table. - Table
Schema - Table schema representation.
- Update
Record - This trait represents a record for updating a table.
- Validate
- Trait for validating
crate::prelude::Values.
Functions§
- self_
reference_ values - Helper function which takes a list of
(ValuesSource, Value)tuples, take only those withValuesSource::Foreignmatching the provided table and column names, and returns a vector of the correspondingValues. with theValuesSourceset toValuesSource::This.
Type Aliases§
- IcDbms
Result - IcDbms Result type
- MSize
- Size type for memory operations.
- Memory
Result - The result type for memory operations.
- Page
- Type identifying a memory page number.
- Page
Offset - Type identifying an offset within a memory page.
- Query
Result - The result type for query operations.
- Table
Columns - Table
Fingerprint - A type representing a unique fingerprint for a table schema.
- Transaction
Id - Type alias for Transaction ID