Module field_types

Source
Expand description

The types used in the schemas module.

Implements the FromSql trait for them. Re-exports the Datelike and Timelike traits from the chrono crate, which are used by Timestamp.

Structs§

ActorId
Represents actor_id, the primary key of the actor table.
CategoryId
Represents cat_id, the primary key of the category table.
ChangeTagDefinitionId
Represents ctd_id, the primary key of the change_tag_def table.
ChangeTagId
Represents ct_id, the primary key of the change_tag table.
CommentId
Represents comment_id, the primary key of the comment table.
ExternalLinkId
Represents el_id, the primary key of the externallinks table.
FullPageTitle
Represents a page title with namespace and with spaces rather than underscores, as in the ll_title field of the langlinks table.
LinkTargetId
Represents lt_id, the primary key of the linktarget table.
LogId
Represents log_id, the primary key of the logging table.
MinorMime
Represents the img_minor_mime field of the image table.
NaiveDateTime
The type that Timestamp derefs to, from chrono. ISO 8601 combined date and time without timezone.
NotNan
The type used for float fields that are never NaN. A wrapper around floats providing an implementation of Eq, Ord and Hash.
PageCount
Represents cat_pages, cat_subcats, and cat_files fields of the category table. They should logically be greater than or equal to 0, but because of errors can be negative.
PageId
Represents page_id, the primary key of the page table, as well as other fields in other tables that correspond to it.
PageNamespace
Represents the page_namespace field of the page table.
PageRestrictionId
Represents pr_id, the primary key of the page_restrictions table.
PageTitle
Represents the page_title field of the page table, a title with underscores.
RecentChangeId
Represents rc_id, the primary key of the recentchanges table.
RevisionId
Represents rev_id, the primary key of the revision table.
Sha1
Represents a SHA-1 hash in base 36, for instance in the img_sha1 field of the image table.
Timestamp
A timestamp, represented as a string in the format 'yyyymmddhhmmss' or 'yyyy-mm-dd hh:mm::ss'. Provides the methods of NaiveDateTime through Deref.
UserGroup
Represents the name of a user group, such as the ug_group field of the user_groups table.
UserId
Represents user_id, the primary key of the user table.

Enums§

ContentModel
Represents the page_content_model field of the page table.
Expiry
Represents the pr_expiry field of the page_restrictions table.
MajorMime
Represents the img_major_mime field of the image table.
MediaType
Represents the img_media_type field of the image table.
PageAction
Represents the pr_type field of the page_restrictions table, the action that is restricted.
PageType
Represents the cl_type field of the categorylinks table.
ProtectionLevel
Represents the pr_level field of the page_restrictions table, the group that is allowed to perform the action.

Traits§

Datelike
Trait for Timestamp, re-exported from chrono. The common set of methods for date component.
Timelike
Trait for Timestamp, re-exported from chrono. The common set of methods for time component.