serverpod library

Classes

$UndefinedBit
An omitted bit-vector argument in generated copyWith methods.
$UndefinedDateTime
An omitted date-time argument in generated copyWith methods.
$UndefinedDuration
An omitted duration argument in generated copyWith methods.
$UndefinedGeographyGeometryCollection
An omitted geography collection argument in generated copyWith methods.
$UndefinedGeographyLineString
An omitted geography line-string argument in generated copyWith methods.
$UndefinedGeographyPoint
An omitted geography point argument in generated copyWith methods.
$UndefinedGeographyPolygon
An omitted geography polygon argument in generated copyWith methods.
$UndefinedHalfVector
An omitted half-vector argument in generated copyWith methods.
$UndefinedList<T>
An omitted list argument in generated copyWith methods.
$UndefinedMap<K, V>
An omitted map argument in generated copyWith methods.
$UndefinedSet<T>
An omitted set argument in generated copyWith methods.
$UndefinedSparseVector
An omitted sparse-vector argument in generated copyWith methods.
$UndefinedUri
An omitted URI argument in generated copyWith methods.
$UndefinedUuidValue
An omitted UUID argument in generated copyWith methods.
$UndefinedVector
An omitted vector argument in generated copyWith methods.
AcceptEncodingHeader
A class representing the HTTP Accept-Encoding header.
AcceptHeader
A class representing the HTTP Accept header.
AcceptLanguageHeader
A class representing the HTTP Accept-Language header.
AcceptRangesHeader
A class representing the HTTP Accept-Ranges header.
AccessControlAllowHeadersHeader
A class representing the HTTP Access-Control-Allow-Headers header.
AccessControlAllowMethodsHeader
A class representing the HTTP Access-Control-Allow-Methods header.
AccessControlAllowOriginHeader
The HTTP Access-Control-Allow-Origin response header.
AccessControlExposeHeadersHeader
A class representing the HTTP Access-Control-Expose-Headers header.
AccessorState<K, R>
Holds the externalized state for ReadOnlyAccessor instances in a map.
Adapter
An interface for adapters that bridge Relic to specific server implementations.
AdapterCapabilities
What an Adapter can do beyond a plain request and response.
AdapterExchange
One request and its response.
AnyExpression<T>
A database expression that returns all rows where any of the related rows match the filtering criteria.
AsEventHandler<T extends DiagnosticEvent>
Adapter class to use an EventHandlerFunction as a DiagnosticEventHandler. Since this class inherits TypedEventHandler it can filter on event type.
AuthenticationHeader
A class representing the HTTP Authentication header.
AuthenticationInfo
Holds the id for an authenticated user and which scopes it can access. Allowed scopes are defined for each Endpoint.
AuthenticationParameter
A class representing a key-value pair parameter for authentication.
AuthorizationHeader
An abstract base class representing an HTTP Authorization header.
BadRequestMessage
A message sent when a bad request is received.
BaseMigrationArtifactStore
Base class for a migration artifacts storage.
BasicAuthorizationHeader
Represents Basic authentication using a username and password.
BearerAuthorizationHeader
Represents a Bearer token for HTTP Authorization.
BinaryDataReceived
Binary data received from the peer through the WebSocket.
BinaryUploadDescription
Description for an upload using a binary HTTP request.
Bit
Represents a binary vector, where each element is either true or false.
Body
The body of a request or response.
BodyType
A body type that combines MIME type and encoding information.
ByteHeaderSource
A HeaderStore that kept the wire bytes of its fields, so a typed header can decode from them without a String in between.
ByteHeaderStore
A HeaderStore over the bytes of a request head.
Cache<K, V>
Abstract cache interface.
CacheBustingConfig
Cache-busting for asset URLs that embed a content hash.
CacheControlHeader
A class representing the HTTP Cache-Control header.
CacheMissHandler<T extends Object>
A CacheMissHandler is used to define a function that is called when a cache miss occurs. The function is expected to return a new object that will be stored in the cache.
Cascade
A helper that calls several handlers in sequence and returns the first acceptable response.
ClearSiteDataHeader
A class representing the HTTP Clear-Site-Data header.
ClearSiteDataType
A class representing a single Clear-Site-Data type.
ClientCallOpContext
The context of a client call operation. Subclasses represent web, method, and method streaming calls.
ClientDatabaseSession
A DatabaseSession backed by a local SQLite file, for client-side models (database: client / database: all).
CloseMethodStreamCommand
A message sent over a websocket connection to close a websocket stream of data to an endpoint method.
CloseReceived
A close notification (Close frame) received from the peer through the WebSocket or a failure indication.
CloudStorage
The CloudStorage provides a standardized interface to store binary files in the cloud. The default implementation is to use the database for binary storage, but it can be extended to support Google Cloud, Amazon S3, or any other cloud storage service.
Column<T>
Abstract class representing a database Column. Subclassed by the different supported column types such as ColumnInt or ColumnString.
ColumnBigInt
A Column holding BigInt.
ColumnBit
A Column holding a Bit vector from pgvector.
ColumnBool
A Column holding an bool.
ColumnByteData
A Column holding ByteData.
ColumnComparable<T>
A Column whose values can be compared equal or unequal to other values. Attends full specification of default PG comparison operations: https://www.postgresql.org/docs/current/functions-comparison.html#FUNCTIONS-COMPARISON-OP-TABLE
ColumnCount
A Column holding a count of rows.
ColumnDateTime
A Column holding an DateTime. In the database it is stored as a timestamp without time zone.
ColumnDouble
A Column holding an double.
ColumnDuration
A Column holding Duration.
ColumnEnum<E extends Enum>
A Column holding an enum.
ColumnEnumExtended<E extends Enum>
Intended for internal use only
ColumnExpression<T>
Database expression for a column.
ColumnGeographyDistance
A Column representing the result of ST_Distance between a geography column and a fixed geometry. Extends ColumnDouble so it can be used directly in orderBy.
ColumnGeographyGeometryCollection
A Column holding a GeographyGeometryCollection from PostGIS.
ColumnGeographyLineString
A Column holding a GeographyLineString from PostGIS.
ColumnGeographyPoint
A Column holding a GeographyPoint from PostGIS.
ColumnGeographyPolygon
A Column holding a GeographyPolygon from PostGIS.
ColumnHalfVector
A Column holding a HalfVector from pgvector.
ColumnInt
A Column holding an int.
ColumnSerializable<T>
A Column holding an SerializableModel. The entity will be stored in the database as a json column.
ColumnSparseVector
A Column holding a SparseVector from pgvector.
ColumnString
A Column holding an String.
ColumnStructured<T>
A Column holding a SerializableModel. The entity will be stored in the database as a binary-encoded object that retains the JSON structure. Stored as JSONB on Postgres (with indexing support) and BLOB on SQLite.
ColumnUri
A Column holding Uri.
ColumnUuid
A Column holding UuidValue.
ColumnValue<T, V>
Represents a column-value pair for database updates.
ColumnVector
A Column holding a Vector from pgvector.
ColumnVectorDistance<T>
A Column holding the result of a vector distance operation.
ConnectionHeader
A class representing the HTTP Connection header.
ConnectionHeaderType
A class representing the type of connection directives for the Connection header.
ConnectionInfo
Represents the connection information of a network request. Can be HTTP but also other types of network connections.
Constant
A constant Expression.
ContentDispositionHeader
A class representing the HTTP Content-Disposition header.
ContentDispositionParameter
A class representing a parameter for the Content-Disposition header.
ContentEncoding
A class representing valid content encodings.
ContentEncodingHeader
A class representing the HTTP Content-Encoding header.
ContentLanguageHeader
A class representing the HTTP Content-Language header.
ContentRangeHeader
A class representing an HTTP Content-Range header for byte ranges.
ContentSecurityPolicyDirective
A class representing a single CSP directive.
ContentSecurityPolicyHeader
A class representing the HTTP Content-Security-Policy (CSP) header.
ContentTypeHeader
A class representing the HTTP Content-Type header.
ContextProperty<T extends Object>
Manages a piece of data associated with a specific Request.
A class representing a single cookie.
CookieHeader
A class representing the HTTP Cookie header.
Cron
Represents a cron schedule.
CronFutureCallScheduling
CrossOriginEmbedderPolicyHeader
A class representing the HTTP Cross-Origin-Embedder-Policy header.
CrossOriginOpenerPolicyHeader
A class representing the HTTP Cross-Origin-Opener-Policy header.
CrossOriginResourcePolicyHeader
A class representing the HTTP Cross-Origin-Resource-Policy header.
Database
Provides easy access to the database in relation to the current DatabaseSession.
DatabaseAnalyzer
Analyzes the structure of Databases.
DatabaseCloudStorage
The DatabaseCloudStorage uses the standard Serverpod database to store binary files. It's the default CloudStorage interface of Serverpod, but you may want to replace it with a more robust service depending on your needs, especially in your production environment.
DatabaseConfig
Configuration for a database.
DatabaseDefinitionRestrictions
Restrictions on the database definition for the current dialect.
DatabaseHealthIndicator
Built-in health indicator that checks database connectivity.
DatabaseProtocolDeserializationProvider
Optional typed routing for generated database protocols.
DatabaseResult
Database result.
DatabaseResultRow
Database result row.
DatabaseResultSchema
Database result schema.
DatabaseResultSchemaColumn
Database result schema column.
DatabaseSerializationManager
The SerializationManager is responsible for creating objects from a serialization, but also for serializing objects. This class is typically overridden by generated code. DatabaseSerializationManager is an extension to also handle Tables.
DatabaseSession
Interface for accessing the database.
DatabaseUtil
Provides utility functions for working with the Database.
DeepCollectionEquality
Deep equality on collections.
DeveloperTools
Developer tools for inspecting and debugging a RelicApp.
DiagnosticEvent
Base interface for all diagnostic events.
DiagnosticEventContext
Base class for information about the context in which a DiagnosticEvent was submitted.
DiagnosticEventHandler
Base interface for DiagnosticEvent handlers.
DiagnosticEventRecord<E extends DiagnosticEvent>
A record with a submitted diagnostic event.
DigestAuthorizationHeader
Represents Digest authentication for HTTP Authorization.
DoubleFormField
A form field accessor that parses values as double.
DoublePathParam
A path parameter accessor that parses values as double.
DoubleQueryParam
A query parameter accessor that parses values as double.
EncodingQuality
A class representing an encoding with an optional quality value.
Endpoint
The Endpoint is an entrypoint to the Server. To add a custom Endpoint to a Server, create a subclass and place it in the endpoints directory. Code will generated that builds the corresponding client library. To add methods that can be accessed from the client, make sure that the first argument of the method is a Session parameter.
EndpointConnector
The EndpointConnector associates a name with and endpoint and its EndpointMethodConnectors.
EndpointDispatch
The EndpointDispatch is responsible for directing requests to the Server to the correct Endpoint and method. Typically, this class is overridden by an Endpoints class that is generated.
EndpointMethodConnector
The EndpointMethodConnector is a base class for connectors that connect methods their implementation.
EscapedExpression
A database expression that is escaped. This is used to escape values that are not expressions, such as strings and numbers.
ETagConditionHeader
Base class for ETag-based conditional headers (If-Match and If-None-Match).
ETagHeader
A class representing the HTTP ETag header.
ETagValue
An HTTP entity-tag per RFC 9110 section 8.8.3.
EveryExpression<T>
A database expression that returns all rows where all of the related rows match the filtering criteria.
ExceptionEvent
An event that represents an exception that occurred in the server.
ExceptionHandler
A DiagnosticEventHandler that handles ExceptionEvent instances.
ExpectHeader
A class representing the HTTP Expect header.
ExperimentalApi
Experimental API for Serverpod.
ExperimentalFeatures
Setup of experimental features.
Expression<T>
A database Expression.
FallbackMiddleware
Middleware that falls back to an alternative handler when a response matches a condition.
FileFieldEntry
A file field entry.
FileInfo
Cached file information including MIME type, file stats, and ETag.
FileMetadata
Portable metadata that can be attached to a stored file.
FileStat
Metadata and properties reported for a stored file.
FlutterRoute
Route for serving Flutter web applications.
FormData
Parsed HTML form data.
FormEntry
A single form entry.
FormField<T extends Object>
A read-only accessor for a typed form field.
FormFieldEntry
A text field entry.
FormFields
Text form fields, read through FormField accessors.
FormFile
A read-only accessor for an uploaded file.
FormLimits
Limits used while parsing HTML forms and multipart uploads.
ForwardedElement
Represents one forwarded-element in the Forwarded header.
ForwardedHeader
Typed representation of the Forwarded HTTP header. It's a list of ForwardedElements.
ForwardedIdentifier
Represents a node identifier in the Forwarded header, as per RFC 7239 Section 6. This can be an IP address (v4 or v6), "unknown", or an obfuscated identifier, optionally with a port.
FromHeader
A class representing the HTTP From header.
FunctionAccessor<T extends Object, K, R>
A ReadOnlyAccessor that decodes with a function.
FutureCall<T extends SerializableModel>
Superclass for future calls. Extend this class and declare public Future<void> methods that take a Session as their first parameter to create custom future calls. Type-safe methods for scheduling the calls are generated when running serverpod generate.
FutureCallConfig
Configuration for future call handling.
FutureCallDispatch<T>
Provides type-safe access to future calls on the server. Typically, this class is overriden by a FutureCalls class that is generated.
FutureCallManager
The FutureCallManager is responsible for managing and executing FutureCalls in the Serverpod framework. A FutureCall is a task that is scheduled to run at a specific time in the future. These tasks are persistent, meaning they are stored in the database and will still execute even if the server is restarted.
FutureCallOpContext
The context of a future call operation.
FutureCallSession
Created when a FutureCall is being made. It contains all data associated with the current call and provides easy access to the database.
Geography
Abstract base class for all PostGIS geography types.
GeographyGeometryCollection
Represents a PostGIS GeometryCollection — a heterogeneous collection of Geography values (points, line strings, polygons).
GeographyLineString
Represents a geographic line string (sequence of points) for use with PostGIS.
GeographyPoint
Represents a geographic point with longitude, latitude, and spatial reference system identifier (SRID) for use with PostGIS.
GeographyPolygon
Represents a geographic polygon (exterior ring + optional holes) for PostGIS.
HalfVector
Represents a vector of half-precision float values.
HandlerObject
An abstract base class for classes that behave like Handlers.
HeaderAccessor<T extends Object>
A typed header, the HeaderName and the HeaderCodec that reads and writes it.
HeaderCodec<T extends Object>
A specialized codec for HTTP headers that defines conversion between a typed value T and its string representation in headers.
HeaderName
An interned HTTP header name.
Headers
Headers is an immutable, case-insensitive view over a HeaderStore.
HeaderScanner
A cursor-based scanner for HTTP header field values.
HeaderStore
Read access to the header fields of a message.
HealthCheckResult
Result of a single health indicator check.
HealthCheckService
Service that manages health checks for the server.
HealthConfig
Configuration for the health check system.
HealthIndicator<T extends Object>
Base class for health indicators that check service dependencies.
HealthResponse
Aggregated response from multiple health indicators.
Hijack
A Result indicating that the underlying connection has been hijacked.
HnswIndexQueryOptions
Query options for the HNSW index.
Host
An HTTP host reference per RFC 3986 section 3.2.2, used by Host headers, the Domain attribute of cookies, and the host=/for= values in Forwarded.
HostHeader
Wanna-be RFC3986 compliant 'Host' header.
IfMatchHeader
A class representing the HTTP If-Match header.
IfNoneMatchHeader
A class representing the HTTP If-None-Match header.
IfRangeHeader
A class representing the HTTP If-Range header.
Include
The base include class, should not be used directly.
IncludeList
Defines what tables to join when querying a table.
IncludeObject
Defines what tables to join when querying a table.
InjectableIn<T>
Interface for objects that can be injected in others. This allows an object to delegate setup to another object.
InternalSession
A Session used internally in the ServerPod. Typically used to access the database and do logging for events that are not triggered from a call, or a stream.
IntervalFutureCallScheduling
IntFormField
A form field accessor that parses values as int.
IntPathParam
A path parameter accessor that parses values as int.
IntQueryParam
A query parameter accessor that parses values as int.
InvokableFutureCall<T extends SerializableModel>
A FutureCall that can be invoked by the server when its scheduled time arrives. Implemented by the future call wrappers generated when running serverpod generate; not intended to be implemented directly by users.
IOAdapter
An Adapter implementation for dart:io HttpServer.
IORelicWebSocket
A dart-io-based RelicWebSocket implementation.
IPAddress
Represents an IPv4 or IPv6 address, optionally with a CIDR prefix length.
IPv4Address
Represents an IPv4 address with optional CIDR prefix.
IPv6Address
Represents an IPv6 address with optional CIDR prefix.
IsolatedObject<T>
IvfflatIndexQueryOptions
Query options for the IVFFLAT index.
JsonWidget
A WebWidget that renders JSON output. The output will be the result of passing the provided object to jsonEncode.
LanguageQuality
A class representing a language with an optional quality value.
LanguageTag
A BCP 47 language tag per RFC 5646, used by Content-Language (RFC 9110 8.5) and Accept-Language (RFC 9110 12.5.4).
Listener
One bound socket of an Adapter.
ListWidget
Combines a List of WebWidgets into a single WebWidget.
LookupResult<T extends Object>
Represents the result of looking up a route in the router.
LruCache<K, V>
A simple Least Recently Used (LRU) cache implementation.
ManyRelation<T extends Table>
Many relation field between two tables.
MapHeaderStore
The reference MutableHeaderStore, a map from name to values.
MapRuntimeParameters
Runtime parameters that can be built from a map of options.
MediaRange
A class representing a media range with an optional quality value.
MemoryUploadedFile
Uploaded file backed by memory.
MemoryUploadStorage
In-memory uploaded file storage.
Message
MessageCentral
The MessageCentral handles communication within the server, and between servers in a cluster. It is especially useful when working with streaming endpoints. The message central can pass on any serializable to a channel. The channel can be listened to by from any place in the server.
MessageCentralAccess
Provides access to the Serverpod's MessageCentral.
MessageCentralServerpodChannels
Channels that are listened to by the Serverpod Framework.
MethodCallContext
Context for a MethodConnector call
MethodCallOpContext
The context of a method call operation.
MethodCallSession
When a call is made to the Server a MethodCallSession object is created. It contains all data associated with the current connection and provides easy access to the database.
MethodConnector
The MethodConnector hooks up a method with its name and the actual call to the method.
MethodMiss<T extends Object>
Indicates that a route exists for the path, but not for the HTTP method.
MethodStreamCallContext
Context for a MethodStreamConnector call
MethodStreamConnector
The MethodStreamConnector hooks up a method with its name and implementation. The method communicates with the client using a websocket connection. Enabling support for streaming return values or parameters.
MethodStreamMessage
A message sent to a method stream.
MethodStreamSerializableException
A serializable exception sent over a method stream.
MethodStreamSession
When a connection is made to the Server to an endpoint method that uses a stream MethodStreamSession object is created. It contains all data associated with the current connection and provides easy access to the database.
MiddlewareObject
An abstract base class for classes that behave like Middleware.
MigrationsApplyResult
Result of applying database migrations via the Insights endpoint.
MimeType
A MIME type representing the format of content.
Miss<T extends Object>
Base class for lookup failures.
MultipartFieldPart
A named form-data part without a filename parameter.
MultipartFilePart
A named form-data part with a filename or filename* parameter, even an empty one.
MultipartFormData
Parsed multipart/form-data form data.
MultipartOtherPart
A part that is neither a MultipartFieldPart nor a MultipartFilePart, such as a part without a name or without form-data disposition.
MultipartPart
A streamed multipart form part.
MultipartUploadDescription
Description for an upload using a multipart HTTP request.
MutableHeaders
The builder side of Headers, a MutableHeaderStore with typed reads and writes.
MutableHeaderStore
A HeaderStore that can be written.
NoCache<K, V>
A no-op Cache that never stores or retrieves values, for opting out of caching in high-cardinality workloads where it costs more than it saves.
NoneExpression<T>
A database expression that returns all rows where none of the related rows match the filtering criteria.
NormalizedPath
Represents a URL path that has been normalized.
NotExpression
A database expression to invert the result of another expression.
NumFormField
A form field accessor that parses values as num.
NumPathParam
A path parameter accessor that parses values as num.
NumQueryParam
A query parameter accessor that parses values as num.
OpaqueOrigin
The opaque origin sentinel, serialized as null.
OpenMethodStreamCommand
A message sent over a websocket connection to open a websocket stream of data to an endpoint method.
OpenMethodStreamResponse
A message sent over a websocket connection to respond to an OpenMethodStreamCommand.
OperationEventContext
Represents the operation that the event was caused by or in relation to. An operation is a client-originated call / operation or a scheduled operation, i.e. a method call, a streaming call, a web call, or a future call.
Order
Defines how to order a database column.
Origin
A Web origin, as defined by the WHATWG Fetch Standard and RFC 6454.
ParameterDescription
Defines a parameter in a MethodConnector.
ParameterValue
A parameter value for the token / quoted-string alternation used pervasively in HTTP headers (RFC 9110 5.6.6: parameters).
PathMiss<T extends Object>
Indicates that no route exists for the requested path.
PathParam<T extends Object>
A read-only accessor for extracting typed path parameters.
PathParameters
Holds path parameters extracted from a matched route.
PathTrie<T extends Object>
A Trie (prefix tree) data structure optimized for matching URL paths.
PermissionsPolicyDirective
A class representing a single Permissions-Policy directive.
PermissionsPolicyHeader
A class representing the HTTP Permissions-Policy header.
PgErrorCode
A class containing constants for PostgreSQL error codes.
PingCommand
A message sent over a websocket connection to check if the connection is still alive. The other end should respond with a PongCommand.
Pipeline
A helper that makes it easy to compose a set of Middleware and a Handler.
PongCommand
A response to a PingCommand.
PostgresDatabaseConfig
PostgreSQL-specific database configuration.
ProtocolDeserialization
Immutable type declarations used to avoid probing unrelated protocols.
ProtocolDeserializationProvider
Optional capability implemented by protocols generated with typed routing.
ProtocolSerialization
The ProtocolSerialization defines a toJsonForProtocol method which makes it possible to limit what fields are serialized when communicating over the protocol.
QueryParam<T extends Object>
A read-only accessor for extracting typed query parameters.
QueryParameters
Provides parameters for direct database queries
QueryParametersNamed
Named parameters for direct database queries.
QueryParametersPositional
Positional parameters for direct database queries
Range
A class representing a single range within a Range header.
RangeHeader
A class representing the HTTP Range header.
ReadOnlyAccessor<T extends Object, K, R>
A read-only accessor for extracting typed values from a keyed storage.
RecurringFutureCallDispatch<T>
Provides type-safe access to recurring future calls on the server. Typically, this class is overriden by a generated class.
RedirectWidget
A WebWidget that renders a HTTP redirect to the provided url.
RedisConfig
Configuration for Redis.
RedisController
The RedisController maintains an active connection to the Redis server. It handles caching, publishing, and subscriptions of strings. If the connection is broken the controller automatically tries to reconnect. Messages sent across Redis are best effort and not guaranteed to be delivered, if a message fails to be sent it will not retry.
RedisHealthIndicator
Built-in health indicator that checks Redis connectivity.
ReferrerPolicyHeader
A class representing the HTTP Referrer-Policy header.
RelicApp
RelicServer
RelicWebSocket
An relic specific interface for bi-directional communication over web-sockets.
Request
An HTTP request to be processed by a Relic Server application.
RequestFactory
Builds the Request for an AdapterExchange.
RequestTarget
The path and query of a request, as received.
Response
The response returned by a Handler.
Result
A sealed base class representing the result of handling a request.
RetryAfterHeader
A class representing the HTTP Retry-After header.
RevokedAuthenticationAuthId
Message sent when an authentication key id is revoked.
RevokedAuthenticationScope
Message sent when authentication scopes for a user are revoked.
RevokedAuthenticationUser
Message sent when all authentication for a user is revoked.
Route
A Route defines a destination in Serverpod's web server. It will handle a call and generate an appropriate response by manipulating the Request object. You override Route, or more likely it's subclass WidgetRoute to create your own custom routes in your server.
Router<T extends Object>
A URL router that maps path patterns to values of type T.
RouterMatch<T extends Object>
A successful route match: the route a request takes and what the path lookup extracted.
RuntimeListMigrationArtifactStore
A MigrationArtifactStore backed by a fixed list that is used to apply MigrationVersionSql instances at runtime.
RuntimeParameters
Base class for runtime parameters group to apply to the database.
RuntimeParametersBuilder
Builder class for runtime parameters that provides discoverable factory methods. This enables the callback pattern: setRuntimeParameters((params) => ...)
SameSite
Cookie cross-site availability configuration.
Savepoint
A savepoint in a transaction.
Scope
Used to define who can access an Endpoint. Authenticated users can be associated with a Scope, if the same scope is defined in the Endpoint the user is granted access. The scope is defined by its name.
SearchPathsConfig
Search path configuration for database schema resolution.
SecFetchDestHeader
A class representing the HTTP Sec-Fetch-Dest header.
SecFetchModeHeader
A class representing the HTTP Sec-Fetch-Mode header.
SecFetchSiteHeader
A class representing the HTTP Sec-Fetch-Site header.
SecurityContextConfig
Configuration for the security context.
SerializableModel
The SerializableModel is the base interface for all serializable objects in Serverpod, except primitives.
SerializationManager
The SerializationManager is responsible for creating objects from a serialization, but also for serializing objects. This class is typically extended by generated code.
Server
Handling incoming calls and routing them to the correct Endpoint methods.
ServerConfig
Configuration for a server.
ServerHealthMetric
Represents a snapshot of a specific health metric. An entry is written every minute for each server. All health data can be accessed through Serverpod Insights.
ServerHealthMetricInclude
ServerHealthMetricIncludeList
ServerHealthMetricRepository
ServerHealthMetricTable
ServerHealthMetricUpdateTable
Serverpod
The Serverpod handles all setup and manages the main Server. In addition to the user managed server, it also runs a server for handling the DistributedCache and other connections through the InsightsEndpoint.
ServerpodConfig
Parser for the Serverpod configuration file.
ServerpodRunMode
Defines valid run modes for the Serverpod.
ServerpodStartupIndicator
Built-in health indicator that checks if Serverpod has completed startup.
Session
When a call is made to the Server a Session object is created. It contains all data associated with the current connection and provides easy access to the database.
SessionLogConfig
Configuration for session logging.
SessionLogUtils
A collection of utils for the database backed session logs.
SetCookie
A single HTTP Set-Cookie cookie: a name/value pair plus its attributes.
SetCookieHeader
The HTTP Set-Cookie response header: the ordered set of SetCookies a response sets.
SpaRoute
Route for serving Single Page Applications (SPAs) with fallback support.
SparseVector
Represents a sparse vector that stores only non-zero elements.
SqliteDatabaseConfig
SQLite-specific database configuration.
SqliteErrorCode
A class containing constants for SQLite error codes.
StaticHandler
A HandlerObject that serves static files from a directory or a single file.
StaticRoute
Route for serving static assets.
StorageAccess
Collects methods for accessing cloud storage.
StoreFileOptions
Options used when the server stores a file directly.
StreamOpContext
The context of a stream operation / message.
StreamParameterDescription<T>
Description of a stream parameter.
StrictTransportSecurityHeader
Represents the HTTP Strict-Transport-Security (HSTS) header for managing HSTS settings.
StringFormField
A form field accessor that returns the value as is.
Table<T_ID>
Represents a database table.
TableRow<T_ID>
Holds data corresponding to a row in the database. Concrete classes are typically generated. Instances of TableRow can also be serialized and either passed to clients or cached.
TEHeader
A class representing the HTTP TE header.
Templates
Loads and caches templates.
TemplateWidget
A WebWidget based on a HTML template. The name of the template should correspond to a template file in your server's web/templates directory. Set the custom values of the template by populating the values field. If values are set that aren't Strings, the toString method will be called on the value. The templates are loaded when the server starts. If you add new templates or modify existing templates, you will need to restart the server for them to take effect.
TemporaryDownloadUrlOptions
Options used to create a temporary download URL.
TempUploadedFile
Uploaded file backed by a temp file on disk.
TempUploadStorage
Temp-file-backed upload storage for dart:io applications.
TeQuality
A class representing a transfer encoding with an optional quality value.
TextDataReceived
Text data received from the peer through the WebSocket.
Token
An HTTP token value per RFC 9110 section 5.6.2.
Token68
An HTTP token68 value per RFC 7235 section 2.1.
TokenValue
A free-form Token value, validated at construction.
Transaction
Holds the state of a running database transaction.
TransactionSettings
Settings for a transaction.
TransferEncoding
A class representing valid transfer encodings.
TransferEncodingHeader
A class representing the HTTP Transfer-Encoding header.
TrieMatch<T>
Represents the successfull result of a lookup.
TupleOrigin
A scheme://host[:port] origin tuple per RFC 6454.
TwoPartExpression
A database expression with two parts.
TypedEventHandler<T extends DiagnosticEvent>
A DiagnosticEventHandler that handles events of a specific type.
UndefinedSentinel
Base for generated copyWith defaults that distinguish omission from null.
UpdateTable<T extends Table>
Base class for database table update operations.
UpgradeHeader
A class representing the HTTP Upgrade header.
UpgradeProtocol
A single protocol entry in an Upgrade header.
UploadDescription
Description for a cloud storage upload.
UploadedFile
A handle to an uploaded file.
UploadedFiles
Uploaded files, read through FormFile accessors.
UploadOptions
Options used when creating a client upload description.
UploadStorage
Storage backend for uploaded file parts.
UrlEncodedFormData
Parsed application/x-www-form-urlencoded form data.
Uuid
uuid for Dart Author: Yulian Kuncheff Released under MIT License.
UuidValue
ValueEncoder
Interface for value encoders.
VaryHeader
A class representing the HTTP Vary header.
Vector
Represents a vector of double values.
VectorDistanceExpression<T>
Vector distance expression for use with pgvector.
VectorIndexQueryOptions
Query options for vector indexes.
WasmHeadersMiddleware
Middleware that adds WebAssembly multi-threading headers to responses.
WebAuthCookieConfig
Configuration for the cookie used to carry the web authentication token.
WebCallOpContext
The context of a web call operation.
WebCallSession
When a request is made to the web server a WebCallSession object is created. It contains all data associated with the current connection and provides easy access to the database.
WebServer
The Serverpod webserver.
WebSocketEvent
An event received from the peer through the WebSocket.
WebSocketMessage
Base class for messages sent over a WebSocket connection.
WebSocketMessageInfo
Interface of WebSocketMessage subclasses that have endpoint, method and connection id info.
WebSocketUpgrade
A Result indicating that a duplex stream connection (e.g., WebSocket) has been established.
WebWidget
The base class for all web widgets. Override this class to create a custom widget type, or use one of the default types which covers most common use cases.
WidgetRoute
A WidgetRoute is the most convenient way to create routes in your server. Override the build method and return an appropriate WebWidget.
XForwardedForHeader
Typed representation of the X-Forwarded-For (XFF) HTTP header.

Enums

AuthenticationFailureReason
The type of failures that can occur during authentication.
CloseReason
The reason a stream was closed.
ConsoleLogFormat
Valid values for console log format.
DatabaseDialect
Database dialect type.
DeferrableConstraint
Defines whether a foreign key constraint is deferrable and, if so, when it is checked by default.
EnumSerialization
ExchangeEnd
How an exchange finished.
FormLimit
A limit in FormLimits.
GinOperatorClass
Operator classes used by GIN indexes. See: https://www.postgresql.org/docs/current/gin.html#GIN-BUILTIN-OPCLASSES
HealthComponentType
Known component types for health indicators.
HealthStatus
The status of a health check.
HttpProtocol
The HTTP version an exchange was received with.
IsolationLevel
Isolation levels for transactions.
IterativeScan
Automatically scan more of the index until enough results are found.
LockBehavior
Specifies the behavior when a lock cannot be immediately acquired.
LockMode
Specifies the type of row-level lock to acquire.
LoggerType
LogLevel
Represents different log levels.
MessageScope
Determines how a message posted to the MessageCentral is delivered.
Method
Represents the HTTP methods used in requests as constants.
MethodStreamReturnType
The type of return value from a MethodStreamConnector.
Namespace
RFC4122 & RFC9562 provided namespaces for v3, v5, and v8 namespace based UUIDs
OpenMethodStreamResponseType
The response to an OpenMethodStreamCommand.
OperationType
Represents the type of "operation" during which the event was caused.
OriginSpace
Denotes whether an event's origin is application (user) space or framework space.
ServerpodLoggingMode
The overarching logging mode of the server. This can be set to either normal or verbose. In normal mode, only important messages are logged, which is the default.
Transport
The transport a Listener accepts connections on.
UploadType
Type of a cloud storage upload.
ValidationMode
The options for UUID Validation strictness
VectorIndexType
Allowed types for vector indexes.

Mixins

AccessorStateMixin<K, R>
Typed reads over a keyed storage, with a cache of decoded values.

Extension Types

DeltaSeconds
A non-negative integer number of seconds, used by HTTP headers that carry delta-seconds values: Max-Age (RFC 9111 5.2.2.1, RFC 6265 5.2.2), Retry-After seconds form (RFC 9110 10.2.3), HSTS max-age (RFC 6797 6.1), and the second form of Retry-After.
SocketAddress

Extensions

Base64Dec on String
Extension for decoding ByteData in protocol.
Base64Enc on ByteData
Extension for encoding ByteData in the protocol.
BigIntJsonExtension on BigInt
Expose toJson on BigInt Expose static fromJson builder
BitJsonExtension on Bit
Expose toJson on Bit
BoolJsonExtension on bool
Expose static fromJson builder for bool that handles bool or int values. Required to handle SQL boolean values that are stored as 0 or 1.
ByteDataJsonExtension on ByteData
Expose toJson on ByteData Expose static fromJson builder
CacheBustingFilenameExtension on CacheBustingConfig
CloneBit on Bit
Adds clone method that create a deep copy of a Bit vector.
CloneByteData on ByteData
Adds clone method that create a deep copy of a ByteData.
CloneHalfVector on HalfVector
Adds clone method that create a deep copy of a HalfVector.
CloneSparseVector on SparseVector
Adds clone method that create a deep copy of a SparseVector.
CloneVector on Vector
Adds clone method that create a deep copy of a ByteData.
ColumnComparisons on ColumnDefinition
Comparison methods for ColumnDefinition.
ColumnOrderingOperations on Column<T>
Extension providing ordering operations for columns.
ConvertToOrderBy on List<Column>
Extension providing a method to convert a list of Columns to a list of Orders.
DatabaseAnalyzerExtensions on DatabaseAnalyzer
Extensions on DatabaseAnalyzer to add functionality not overridden by the concrete analyzer implementations.
DatabaseDefinitionRestrictionsEx on DatabaseDefinition
Extensions on DatabaseDefinitionRestrictions to adapt the database definition for the current dialect.
DatabaseDefinitionUtils on DatabaseDefinition
Utility methods for DatabaseDefinition.
DatetimeExtension on DateTime
Extensions on DateTime.
DateTimeJsonExtension on DateTime
Expose toJson on DateTime Expose static fromJson builder
DurationJsonExtension on Duration
Expose toJson on Duration Expose static fromJson builder
EventSinkEx on EventSink<T>
FilterConstraintGenerator on FilterConstraint
SQL code generation methods for FilterConstraint.
FilterGenerator on Filter
SQL code generation methods for Filter.
ForeignKeyComparisons on ForeignKeyDefinition
Comparison methods for ForeignKeyDefinition.
FormRequestExtension on Request
Form parsing helpers for Request.
ForwardingRequestEx on Request
GeographyGeometryCollectionJsonExtension on GeographyGeometryCollection
Expose toJson on GeographyGeometryCollection and a static fromJson builder.
GeographyLineStringJsonExtension on GeographyLineString
Expose toJson on GeographyLineString and a static fromJson builder.
GeographyPointJsonExtension on GeographyPoint
Expose toJson on GeographyPoint and a static fromJson builder.
GeographyPolygonJsonExtension on GeographyPolygon
Expose toJson on GeographyPolygon and a static fromJson builder.
HalfVectorJsonExtension on HalfVector
Expose toJson on HalfVector
HeadersEntries on Headers
The Map view the previous Headers had, for code that iterates it.
HeadersEx on HeaderValues
HttpResponseExtension on HttpResponse
Extension for io.HttpResponse to write the head from a framing.
IdColumnIterable on Iterable
An extension on iterable for Id columns.
IndexComparisons on IndexDefinition
Comparison methods for IndexDefinition.
IndexElementDefinitionComparison on IndexElementDefinition
Comparison methods for IndexElementDefinition.
ListJsonExtension on List<T>
Expose toJson on List
LookupResultExtension on LookupResult<T>
Extension providing convenient type casting for LookupResult instances.
MapJsonExtension on Map<K, V>
Expose toJson on Map
MiddlewareExtensions on Middleware
Extensions on Middleware to aid in composing Middleware and Handlers.
MutableHeadersEx on MutableHeaders
PathParametersRequestEx on Request
QueryParametersRequestEx on Request
RawEx on Map<K, R>
RelicAppIOServeEx on RelicApp
RequestExtension on Request
Extends Request with useful methods.
RouteEx on Router<T>
RouterHandlerEx on RelicRouter
Extension on RelicRouter that cater specifically to Handlers.
RoutingRequestEx on Request
Extension on Request providing access to routing information.
SessionEx on Request
Session related extension methods for Request.
SetJsonExtension on Set<T>
Expose toJson on Set
SparseVectorJsonExtension on SparseVector
Expose toJson on SparseVector
StreamEx on Stream<T>
TableComparisons on TableDefinition
Comparison methods for TableDefinition.
TableDefinitionRestrictionsEx on List<TableDefinition>
Extensions on TableDefinition to adapt the table definition for the current dialect.
TableDefinitionUtils on TableDefinition
Utility methods for TableDefinition.
TableRowDatabaseJsonExtension on TableRow
Extension on a TableRow to ensure database serialization matches the expected naming of the column in the database
Uint16ListConversionExtensions on Uint16List
Uint8ListConversionExtensions on Uint8List
UriEx on Uri
Extension methods for Uri used in tests and internal utilities.
UriJsonExtension on Uri
Expose toJson on Uri Expose static fromJson builder
UuidValueJsonExtension on UuidValue
Expose toJson on UuidValue Expose static fromJson builder
VectorDatabase on Database
Extension to add vector specific utilities to the database.
VectorJsonExtension on Vector
Expose toJson on Vector
WebAuthCookieBuilder on WebAuthCookieConfig
Builds the relic Set-Cookie headers for the web authentication cookie described by a WebAuthCookieConfig.
WebAuthCookieSession on Session
Web-auth-cookie helpers on Session: decides whether a request wants cookie-based web auth and writes/clears the auth cookie accordingly.

Constants

autoSerializedTypes → const List<String>
All datatypes that are serialized by default. Used internally in Serverpod code generation.
basicAuthSchemeName → const String
The name of the default Serverpod scheme for HTTP "authorization" headers. Note, the scheme name is case-insensitive and should be compared in a case-insensitive manner.
bearerAuthSchemeName → const String
The name of the Bearer scheme for HTTP "authorization" headers. Note, the scheme name is case-insensitive and should be compared in a case-insensitive manner.
currentSchemaVersion → const int
The current schema version of the database definition.
dateTimeHeaderCodec → const HeaderCodec<DateTime>
defaultBooleanFalse → const String
The identifier for the default value to boolean false.
defaultBooleanTrue → const String
The identifier for the default value to boolean true.
defaultDateTimeValueNow → const String
The identifier for the default value to the current timestamp.
defaultIntSerial → const String
Int for the default primary key type.
defaultPrimaryKeyName → const String
The name of the default primary key column.
defaultUuidValueRandom → const String
The identifier for the default value to a random UUID v4.
defaultUuidValueRandomV7 → const String
The identifier for the default value to a random UUID v7.
doNotGenerate → const _DoNotGenerate
Used to annotate endpoint classes and methods that should be ignored by the Serverpod code analyzer and generator.
extensionSerializedTypes → const List<String>
All datatypes that has extensions to support serialization. Used internally in Serverpod code generation.
hasCloneExtensionTypes → const List<String>
List of types that has a clone method extension and therefore can be copied by calling clone().
immutable → const Immutable
Annotation on an immutable class.
intHeaderCodec → const HeaderCodec<int>
methodCodec → const HeaderCodec<Method>
methodListCodec → const HeaderCodec<SplayTreeSet<Method>>
positiveBoolHeaderCodec → const HeaderCodec<bool>
positiveIntHeaderCodec → const HeaderCodec<int>
stringHeaderCodec → const HeaderCodec<String>
stringListCodec → const HeaderCodec<List<String>>
unauthenticatedClientCall → const _UnauthenticatedClientCall
Used to annotate endpoint classes and methods that should not use authentication.
uriHeaderCodec → const HeaderCodec<Uri>
useResult → const UseResult
Annotation on function or property whose value must not be ignored.
webAuthModeCookie → const String
The webAuthModeHeaderName value that selects cookie-based web auth.
webAuthModeCookieTransport → const String
The webAuthModeHeaderName value for cookie transport without authentication: cookies are still carried and may be set (sign-in, JWT refresh), but the main auth cookie must not authenticate the call. Sent by cookie-mode clients for @unauthenticatedClientCall methods.
webAuthModeHeaderName → const String
The request header a web client sets to ask the server to issue the auth token as an HttpOnly cookie (in Set-Cookie).
webBasePathHeaderName → const String
The request header a cookie-mode web client sets to declare the browser-visible base path of the server: the path component of the client's host, e.g. /api behind a prefix-stripping reverse proxy, or /.

Properties

nonMutableTypeNames → List<String>
List of types that are not mutable and therefore do not need to be copied or handled in a copyWith method.
final
templates → Templates
Global access to all templates loaded when starting the webserver.
final

Functions

applyMigrationsAndVerify({required DatabaseSession session, required Directory projectDirectory, required String runMode, required bool applyRepairMigration, required bool applyMigrations}) → Future<MigrationsApplyResult>
Applies pending and/or repair migrations and verifies database integrity.
bindHttpServer(InternetAddress address, {int port = 0, SecurityContext? context, int backlog = 0, bool v6Only = false, bool shared = false}) → Future<HttpServer>
Binds an HTTP server to the given address and port.
catchTopLevelErrors(void callback(), void onError(dynamic error, StackTrace)) → void
Run callback and capture any errors that would otherwise be top-leveled.
createMiddleware({FutureOr<Response?> onRequest(Request)?, FutureOr<Response> onResponse(Response)?, FutureOr<Response> onError(Object error, StackTrace)?}) → Middleware
Creates a Middleware using the provided functions.
createRelationTable<T>({required String relationFieldName, required Column field, required Column foreignField, TableRelation? tableRelation, required T createTable(TableRelation foreignTableRelation)}) → T
Creates a new Table containing TableRelation with information about how the tables are joined.
deleteTrailingEmptyMigrationVersionDirectories(List<String> versions, {required Directory migrationsBaseDirectory, void logWarning(String message)?}) → Future<List<String>>
Deletes the migration version directories at the end of versions that contain no files or subdirectories, e.g. what is left behind when the generated files of a migration are discarded.
encodeDate(DateTime d) → Iterable<String>
Encodes a DateTime to a iterable of string in HTTP date format.
encodeInt(int i) → Iterable<String>
Encode an integer to a iterable of string.
encodeMethod(Method m) → Iterable<String>
encodeMethodList(Iterable<Method> l) → Iterable<String>
Encode a list of methods to a iterable of string.
encodePositiveBool(bool b) → Iterable<String>
Encode a boolean to a iterable of string, if true.
encodePositiveInt(int i) → Iterable<String>
Encode a positive integer to a iterable of string, otherwise throws an error.
encodeString(String s) → Iterable<String>
Encode a string to a iterable of string.
encodeStringList(List<String> i) → Iterable<String>
Encode a list of strings to a iterable of string.
encodeUri(Uri uri) → Iterable<String>
Encode a Uri to a iterable of string.
equalsType<T_ID, Y>() → bool
Checks if the type T is equal to type Y (nullable or non-nullable).
getStaticFileInfo(File file, {MimeTypeResolver? mimeResolver}) → Future<FileInfo>
Public accessor for retrieving FileInfo for a given file.
getType<T>() → Type
Get the type provided as an generic. Useful for getting a nullable type.
httpDate() → String
The Date header value for now, an RFC 9110 5.6.7 IMF-fixdate.
inferDatabaseConfigFromConfigMap(Map configMap, {Map<String, String> environment = const {}}) → DatabaseConfig?
Infer the database config from one run-mode config map (the body of config/<runMode>.yaml), using the same database merging rules as ServerpodConfig.loadFromMap.
inferDatabaseDialectFromConfigMap(Map configMap, {Map<String, String> environment = const {}}) → DatabaseDialect?
Infer the database dialect from one run-mode config map (the body of config/<runMode>.yaml), using the same database merging rules as ServerpodConfig.loadFromMap.
isValidAuthHeaderValue(String value) → bool
Returns true if the provided value is a valid HTTP "authorization" header value (which includes starting with an authentication scheme name).
isWrappedBasicAuthHeaderValue(String value) → bool
Returns true if the provided value is a Serverpod-wrapped auth key.
isWrappedBearerAuthHeaderValue(String value) → bool
Returns true if the provided value is a Bearer auth header value.
joinHeaderValues(List<String>? values) → String?
Multiple header values are joined with commas. See https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-p1-messaging-21#page-22
logMessage(String message, {StackTrace? stackTrace, LoggerType type = LoggerType.info}) → void
Logs a message using print.
logRequests({Logger? logger}) → Middleware
Middleware which prints the time of the request, the elapsed time for the inner handlers, the response's status code and the request URI.
parseBool(String value) → bool
Parses a boolean from the given value and returns it as a bool.
parseDate(String value) → DateTime
Parses a date from the given value and returns it as a DateTime.
parseInt(String value) → int
Parses an integer from the given value and returns it as an int.
parseMethodSet(Iterable<String> values) → SplayTreeSet<Method>
Parses a list of methods from the given values and returns it as a List<Method>.
parseMethodSetFields(List<Uint8List> fields) → SplayTreeSet<Method>
parseMethodSet over the wire bytes of every field.
parsePositiveBool(String value) → bool
Parses a positive boolean from the given value and returns it as a bool.
parsePositiveInt(String value) → int
Parses a positive integer from the given value and returns it as an int.
parseQualifiedTableName(String tableName) → ({String name, String? schema})
Splits a schema.table name. The schema is null for unqualified names.
parseString(String value) → String
Parses a string from the given value and returns it as a String.
parseStringList(Iterable<String> values) → List<String>
Parses a list of strings from the given values and returns it as a List<String>.
parseUri(String value) → Uri
Parses a URI from the given value and returns it as a Uri.
respondWith(Responder responder) → Handler
Creates a Handler that uses the given Responder function to generate a response.
routeWith<T extends Object>(Router<T> router, {bool backtrack = true, bool useHostWhenRouting = false, Handler toHandler(T)?}) → Middleware
Creates middleware that routes requests using the provided router.
unwrapAuthHeaderValue(String? authValue) → String?
Returns the auth key from an auth value that has potentially been wrapped. This operation is the inverse of wrapAsBasicAuthHeaderValue and wrapAsBearerAuthHeaderValue. If null is provided, null is returned.
wrapAsBasicAuthHeaderValue(String key) → String
Returns a value that is compliant with the HTTP auth header format by encoding and wrapping the provided auth key as a Basic auth value.
wrapAsBearerAuthHeaderValue(String token) → String
Returns a value that is compliant with the HTTP auth header format by wrapping the provided token as a Bearer auth value. Unlike Basic auth, Bearer tokens are not Base64 encoded as they are expected to already be in the correct format.

Typedefs

AuthenticationHandler = Future<AuthenticationInfo?> Function(Session session, String token)
Returns authentication information for a given Session and token or null if the key is invalid.
CacheControlFactory = CacheControlHeader? Function(Request req, FileInfo fileInfo)
ColumnSelections<T extends Table> = List<Column> Function(T)
A function that returns a Column for a Table.
ColumnValueListBuilder<T extends UpdateTable<Table>> = List<ColumnValue> Function(T)
A function that returns a list of ColumnValues for a UpdateTable.
ConnectionsInfo = ({int active, int closing, int idle})
Convert<T> = T Function(String value)
The configuration sections for the serverpod configuration file.
DatabaseConfigParser = DatabaseConfig Function(Map dbSetup, Map passwords, String name)
Parser for the database configuration.
DatabaseInterceptor = Database Function(Session session, Database inner)
Replaces the default Database for a Session.
EventHandlerFunction<T extends DiagnosticEvent> = void Function(T event, {required DiagnosticEventContext context, required OriginSpace space})
Function signature type for functions that handle a DiagnosticEvent.
ExchangeSink = FutureOr<void> Function(AdapterExchange exchange)
The function an Adapter hands every exchange to.
Factory<T> = FutureOr<T> Function()
FutureCallSessionBuilder = Session Function(String futureCallName)
A function that builds a Session for a FutureCall.
Handler = FutureOr<Result> Function(Request req)
A function that processes a Request to produce a Result.
HeaderValues = AccessorStateMixin<HeaderName, Iterable<String>>
Typed reads over header values, shared by Headers and MutableHeaders.
HealthCheckHandler = Future<List<ServerHealthMetric>> Function(Serverpod pod, DateTime timestamp)
Performs a set of custom health checks on a Serverpod.
HijackCallback = void Function(StreamChannel<Uint8List>)
A callback function that handles a hijacked connection.
InitializeFutureCall = void Function(FutureCall<SerializableModel> futureCall, String name)
A function that initializes a FutureCall.
Logger = void Function(String message, {StackTrace? stackTrace, LoggerType type})
LogQueryFunction = void Function({required Duration duration, required String? error, required int? numRowsAffected, required String query, required StackTrace stackTrace})
Function type for logging a query.
LogWarningFunction = Future<void> Function(String message)
Function type for logging a warning during the execution of a query.
MessageCentralListenerCallback = void Function(SerializableModel message)
The callback used by listeners of the MessageCentral.
MethodCall = Future Function(Session session, Map<String, dynamic> params)
Calls a named method referenced in a MethodConnector.
MethodStream = dynamic Function(Session session, Map<String, dynamic> params, Map<String, Stream> streamParams)
Calls a named method referenced in a MethodStreamConnector.
Middleware = Handler Function(Handler next)
A function which creates a new Handler by wrapping a Handler.
OrderByBuilder<T extends Table> = Column Function(T)
A function that returns a Column for a Table to be used with order by
OrderByListBuilder<T extends Table> = List<Column> Function(T)
A function that returns a list of Column for a Table to be used with order by list. Use Column.desc() to change the order to descending.
Parameters = Map<Symbol, String>
RawPathParam = String
RawQueryParam = String
RedisCommand = Command
A type alias for the Command class from the redis package.
RedisSubscriptionCallback = void Function(String channel, String message)
Callback when messages are received on a specific channel from Redis.
RelicRouter = Router<Handler>
Just a typedef for better auto-complete ///
Responder = FutureOr<Response> Function(Request)
A simplified handler function that takes a Request and returns a Response.
RouterInjectable = InjectableIn<RelicRouter>
A contract for modular route registration in Relic applications.
RuntimeParametersListBuilder = List<RuntimeParameters> Function(RuntimeParametersBuilder params)
A function that returns a list of RuntimeParameters for configuring database runtime parameters.
TransactionFunction<R> = Future<R> Function(Transaction transaction)
A function performing a transaction, passed to the transaction method.
WebSocketCallback = void Function(RelicWebSocket webSocket)
A callback function invoked when a socket connection is established.
WhereExpressionBuilder<T extends Table> = Expression Function(T)
A function that returns an Expression for a Table to be used with where clauses.
WillCloseListener = FutureOr<void> Function(Session session)
A listener that will be called when the session is about to close.

Exceptions / Errors

AuthHeaderEncodingException
An exception thrown upon erroneous encoding of an auth header.
CloudStorageException
Exception thrown by CloudStorage.
CloudStorageFileAlreadyExistsException
Exception thrown when a file cannot be stored without overwriting an existing file.
CloudStorageFileNotFoundException
Exception thrown when a file does not exist in cloud storage.
CloudStorageUnsupportedOperationException
Exception thrown when a cloud storage operation is not supported.
CronFormatException
Exception thrown when a cron data does not have an expected format and cannot be parsed or processed.
DatabaseException
Exception thrown when an error occurs in the database.
DatabaseForeignKeyViolationException
Exception thrown when a query violates a foreign key constraint..
DatabaseQueryException
Exception thrown when an exception occurs during a database query.
DatabaseUnexpectedResultException
Exception thrown when the result of a database operation is unexpected.
DatabaseUniqueViolationException
Exception thrown when a query violates a unique constraint.
DeserializationClassNameNotFoundException
Exception thrown when no deserialization handler exists for a class name.
DeserializationTypeNotFoundException
Exception thrown when no deserialization type was found during protocol deserialization
EndpointDispatchException
The result of a failed EndpointDispatch.getMethodStreamCallContext, EndpointDispatch.getMethodCallContext or EndpointDispatch.getEndpointConnector call.
EndpointNotFoundException
The endpoint was not found.
ExitException
Exception used to signal a non-recoverable error that should exit the application.
FormException
Base exception for form parsing failures.
FormLimitExceededException
Exception thrown when a configured form parsing limit is exceeded.
HeaderException
HeaderException serves as the common supertype for specific exceptions that can occur when processing HTTP headers.
HijackRefused
What AdapterExchange.hijack throws for a request body the adapter decoded off the wire and the handler did not read to its end.
InvalidEndpointMethodTypeException
The found endpoint method was not of the expected type.
InvalidFormFieldException
Exception thrown when a form field value does not decode.
InvalidHeaderException
Exception thrown for invalid HTTP header values.
InvalidParametersException
The input parameters were invalid.
MalformedFormDataException
Exception thrown when form data is malformed.
MaxBodySizeExceeded
Exception thrown when the body size exceeds the maximum allowed length.
MethodNotFoundException
The endpoint method was not found.
MissingFormFieldException
Exception thrown when a required form field or file is absent.
MissingHeaderException
Exception thrown when a required HTTP header is missing.
NotAuthorizedException
The user is not authorized to access the endpoint.
PasswordMissingException
Exception class for all password missing exceptions.
RollbackToSavepointFailedException
Exception thrown when an attempt to rollback to a savepoint in response to clean up after another exception fails.
SerializableException
This is SerializableException that can be used to pass Domain exceptions from the Server to the Client
SqliteDatabaseLockedException
Exception thrown when a query cannot acquire a lock on the SQLite database.
SqliteMigrationForeignKeyViolationException
Thrown when SQLite PRAGMA foreign_key_check reports one or more rows that violate foreign key constraints.
UnknownMessageException
Exception thrown when an unknown message is received.
UnsupportedFormMediaTypeException
Exception thrown when a request media type is unsupported for form parsing.