Table of Contents

TXDataBaseModule Class

Base class for the XData server modules, holding the settings that apply to every request the module receives.

Remarks

A module answers the requests addressed to its base URL. For each one it creates a request handler, lets the handler process the request, and destroys it afterwards. This class defines the settings and the entity set permissions; the concrete Aurelius-based module is XData.Server.Module.TXDataServerModule.

Syntax

Unit: XData.Module.Base

TXDataBaseModule = class(THttpServerModule);

Constructors

Name Description
Create Creates a module that publishes a model at a base URL.

Methods

Name Description
ProcessRequest Processes a request addressed to this module.
SetEntitySet​Permissions Defines the operations allowed on an entity set.

Properties

Name Description
AccessControl​Allow​Origin Gets or sets the client hosts for which CORS is enabled.
DefaultExpandLevel Gets or sets the minimum level up to which associated entities are expanded (included inline) in JSON responses.
EnableEntity​KeyAs​Segment Indicates whether single entities can also be addressed using the URL format /entityset/id, in addition to the default /entityset(id).
EntityLoopHandling Gets or sets how circular references between entities are handled when writing JSON responses.
FlushMode Gets or sets whether the object manager flushes all pending changes or only the entity being processed, when saving the changes requested by the client.
InstanceLoopHandling Gets or sets how circular references between plain objects are handled when writing JSON responses.
Password Gets or sets the password required by HTTP basic authentication.
PostMode Gets or sets how the module applies a POST request to the database.
ProxyListLoadDepth Gets or sets the maximum depth at which many-valued lazy associations are automatically loaded when building the response.
ProxyLoadDepth Gets or sets the maximum depth at which single-valued lazy associations are automatically loaded when building the response.
PutMode Gets or sets how the module applies a PUT request to the database.
RoutingPrecedence Gets or sets which endpoint wins when the URL of an automatic CRUD endpoint conflicts with the URL of a service operation.
SerializeInstanceRef Gets or sets when an instance reference is used in JSON responses for an object that appears more than once.
SerializeInstance​Type Gets or sets when the object type is included in JSON responses.
UnknownMember​Handling Gets or sets how the module behaves when the JSON received from the client contains a property that is not known for that request.
UserName Gets or sets the user name required by HTTP basic authentication.