# Module db_sqlx_postgres::dev::dev::prelude

source · [−]
Expand description

useful imports for users working with a supported database

## Structs

AddNotification

Data required to add notification

Captcha

Data representing a captcha

CreateCaptcha

data requried to create new captcha

Level

Level struct that describes threshold-difficulty factor mapping

NameHash

type encapsulating username and hashed password of a user

Notification

Represents notification

Register

Data required to register a new user

Secret

datastructure representing a user’s secret

StatsUnixTimestamp

Captcha statistics with time recorded in UNIX epoch formats

TrafficPattern

User’s traffic pattern; used in generating a captcha configuration

UpdateEmail

data required to update them email of a user

## Enums

DBError

Error data structure grouping various error subtypes

Login

types of credentials used as identifiers during login

## Traits

CloneSPDatabase

Trait to clone MCDatabase

Connect

Create databse connection

DBOps

Database operations trait(migrations, pool creation and fetching connection from pool)

GetConnection

Get database connection

MCDatabase

mCaptcha’s database requirements. To implement support for $Database, kindly implement this trait.

Migrate

database migrations

## Type Definitions

BoxDynError

Convenience type alias for grouping driver-specific errors

DBResult

Generic result data structure