# Module pages::db

source · [−]

## Structs

Conn
Use an existing database pool
Database
EVENTS
EVENT_TYPE_CREATE
EVENT_TYPE_DELETE
EVENT_TYPE_UPDATE
Event
Fresh
InnerLibrepagesEvent 🔒
InnerSite 🔒
LibrePagesEvent
NameHash
type encapsulating username and hashed password of a user
Register
Data required to register a new user
Site
Data required to add a new site
UpdateEmail
data required to update them email of a user

## Enums

ConnectionOptions
Connect to databse
Login
types of credentials used as identifiers during login

## Functions

get_db
map_register_err 🔒
map postgres errors to ServiceError types
map_row_not_found_err
map custom row not found error to DB error
now_unix_time_stamp 🔒