[][src]Module parse_mediawiki_sql::types

Defines the types used in the schemas module and implements the FromSql trait for these and other types, so that they can be parsed from SQL syntax. 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.

ChangeTagDefId

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.

ExternalLinksId

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.

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.

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.

PageRestrictionsId

Represents pr_id, the primary key of the page_restrictions table.

PageRestrictionsOld

Represents page_restrictions, an outdated field of the page table containing a string representing a map from action to the groups that are allowed to perform that action.

PageTitle

Represents the page_title field of the page table, a title with underscores.

RecentChangesId

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

Represents a timestamp given as a string in yyyymmddhhmmss format. 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.

Error
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.

ParseTypeContext
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.

FromSql

Trait for converting from the SQL syntax for a simple type (anything other than a tuple) to a Rust type, which can borrow from the string or not. Used by schemas::FromSqlTuple.

Timelike

Trait for [Timestamp], re-exported from chrono. The common set of methods for time component.

Type Definitions

IResult