Loading TOC...

es functions

The table below lists all the es built-in functions (in this namespace: http://marklogic.com/entity-services).

You can also view these functions broken down by category:

This module contains the Entity Services API, which enables you to define logical entity-relationship models and instantiate them for use in your applications. For details, see the Entity Services Developer's Guide.

To use the es module as part of your own XQuery module, include the following line in your XQuery prolog:

import module namespace es = "http://marklogic.com/entity-services" at "/MarkLogic/entity-services/entity-services.xqy";

The library namespace prefix es is not predefined in the server.

23 functions
Function nameDescription
es:add-attachmentsA utility function used by generated code to add one or more nodes to an instance as attachments.
es:copy-attachmentsA utility function used in a generated version translator module to copy attachment data from a source instance to a destination instance.
es:database-properties-generateGenerate a database configuration artifact from a basic model.
es:extract-arrayConvert one or more source nodes into an array by invoking a function on each of the elements.
es:extraction-template-generateGenerate a Template Driven Extraction (TDE) template you can use to render entity instance data into rows for querying with the Optic API or SQL.
es:init-instanceA utility function used by generated code to initialize an instance data structure with data common across all entities of a given type, such as a type indicator.
es:init-sourceReturn the root node of an entity instance or document.
es:init-translation-sourceA utility function used in a generated version translator module to initialize the context for converting instances from one version to another.
es:instance-converter-generateGenerate an XQuery library module containing stub code for converting source data to entity instances.
es:instance-from-documentExtract an in-memory entity instance from its envelope document as a map:map () .
es:instance-get-attachmentsExtract attachments from an entity service document.
es:instance-json-from-documentExtract an entity instance from its envelope document, as JSON.
es:instance-xml-from-documentExtract a canonical entity instance from its envelope document, as XML.
es:model-from-xmlCreate a basic model from an XML model descriptor, without validating the input descriptor for correctness.
es:model-get-test-instancesGenerate entity instances of each entity type in a basic model.
es:model-to-xmlSerialize a basic model as an XML element.
es:model-validateValidates an entity services model descriptor.
es:optionalAdd a key-value pair to a map, if the value exists, and return the modified input map.
es:schema-generateGenerate an XSD schema that can be used to validate instance data.
es:search-options-generateGenerate a set of query options that can be used to query your entity instances using several MarkLogic server-side and client APIs.
es:serialize-attachmentsA utility function used to serialize the attachments on an instance into either JSON or XML envelopes.
es:version-translator-generateGenerate a module that can be used to translate instances conforming to one version of a model into instances conforming to another version
es:with-namespaceA utility function used to decorate an XML instance with namespace information during extraction.
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy