Other Classes

The following classes are available globally.

  • Encapsulates the definitions from a parsed Open Data Protocol (OData) service metadata (CSDL) document.

    See also

    CsdlParser.
    See more

    Declaration

    Swift

    open class CSDLDocument : ObjectBase
  • Exception thrown when an error occurs during the parsing of an Open Data Protocol (OData) service metadata (CSDL) document.

    See also

    CsdlParser.
    See more

    Declaration

    Swift

    open class CSDLError : DataSchemaError
  • Callback which can locate and fetch the text of an Open Data Protocol (OData) service metadata (CSDL) document.

    See also

    CsdlParser.csdlFetcher.
    See more

    Declaration

    Swift

    open class CSDLFetcher : ObjectBase
  • Bitmask flags for CsdlParser.csdlOptions.

    See more

    Declaration

    Swift

    public class CSDLOption
  • Parser for Open Data Protocol (OData) service metadata documents (CSDL). A new parser should be created for each parse call. A parser should not be shared by multiple threads.

    See more

    Declaration

    Swift

    open class CSDLParser : ObjectBase
  • OData CSDL compatibility checker.

    See more

    Declaration

    Swift

    open class CsdlCompatibilityChecker : ObjectBase
  • Encapsulates an Open Data Protocol (OData) metadata reference.

    See more

    Declaration

    Swift

    open class CsdlReference : ObjectBase
  • A list of item type CsdlReference.

    See more

    Declaration

    Swift

    open class CsdlReferenceList : ListBase, Sequence
  • Encapsulates an OData aggregate expression item.

    See more

    Declaration

    Swift

    open class AggregateExpression : ObjectBase
  • A list of item type AggregateExpression.

    See more

    Declaration

    Swift

    open class AggregateExpressionList : ListBase, Sequence
  • Represents the ‘from’ clause in an aggregate transformation item.

    See more

    Declaration

    Swift

    open class AggregateFrom : ObjectBase
  • A list of “aggregate from” transformation items.

    See more

    Declaration

    Swift

    open class AggregateFromList : ListBase, Sequence
  • Represents the method of the aggregate transformation item.

    See more

    Declaration

    Swift

    open class AggregateMethod : ObjectBase
  • Encapsulates an OData aggregate transformation item.

    See more

    Declaration

    Swift

    open class AggregateValue : TransformValue
  • A list of aggregate transformation items.

    See more

    Declaration

    Swift

    open class AggregateValueList : ListBase, Sequence
  • Abstract base class for top and bottom transformation items.

    See more

    Declaration

    Swift

    open class AmountTransform : TransformValue
  • Represents an OData annotation.

    See also

    AnnotationTerm.
    See more

    Declaration

    Swift

    open class Annotation : ObjectBase
  • Encapsulates an OData term definition.

    See also

    Annotation.
    See more

    Declaration

    Swift

    open class AnnotationTerm : ObjectBase
  • DataValue subclass that wraps a value of type binary.

    See more

    Declaration

    Swift

    open class BinaryValue : DataValue
  • DataValue subclass that wraps a value of type boolean.

    See more

    Declaration

    Swift

    open class BooleanValue : DataValue
  • Represents the Bottom* transformation items.

    See more

    Declaration

    Swift

    open class BottomTransform : AmountTransform
  • Abstract base class for byte streams.

    See more

    Declaration

    Swift

    open class ByteStream : StreamBase
  • DataValue subclass that wraps a value of type byte.

    See more

    Declaration

    Swift

    open class ByteValue : DataValue
  • A token for requesting the cancellation of asynchronous requests.

    See more

    Declaration

    Swift

    open class CancelToken : ObjectBase
  • Listener for notification of request cancellation.

    See more

    Declaration

    Swift

    open class CancellationListener : ObjectBase
  • A list of item type CancellationListener.

    See more

    Declaration

    Swift

    open class CancellationListenerList : ListBase, Sequence
  • Encapsulates an OData changed link.

    See also

    ChangeSet.createLink, ChangeSet.updateLink, ChangeSet.deleteLink.
    See more

    Declaration

    Swift

    open class ChangedLink : ObjectBase
  • Abstract base class for char streams, using UTF-16 code units.

    See more

    Declaration

    Swift

    open class CharStream : StreamBase
  • DataValue subclass that wraps a value of type char.

    See more

    Declaration

    Swift

    open class CharValue : DataValue
  • Encapsulates the metadata of an OData complex type.

    See more

    Declaration

    Swift

    open class ComplexType : StructureType
  • Encapsulates an OData complex value.

    See more

    Declaration

    Swift

    open class ComplexValue : StructureBase, ComplexValueOrList
  • A list of item type ComplexValue.

    See more

    Declaration

    Swift

    open class ComplexValueList : ListBase, Codable, ComplexValueOrList, Sequence
  • Abstract base class for data exceptions.

    See more

    Declaration

    Swift

    open class DataError : ErrorBase
  • Format constants for use with data protocols.

    See more

    Declaration

    Swift

    public class DataFormat
  • Exception thrown when data does not match the expected format.

    See more

    Declaration

    Swift

    open class DataFormatError : DataError
  • Encapsulates the metadata of an OData function or action.

    See more

    Declaration

    Swift

    open class DataMethod : ObjectBase
  • Encapsulates the application of an OData method (function or action) to a list of parameters. This is used to represent calls to functions and actionn defined within an entity model, as opposed to QueryFunction which is used to represent calls to builtin functions.

    See more

    Declaration

    Swift

    open class DataMethodCall : ObjectBase
  • Exception thrown when a request fails due to a data network issue.

    See more

    Declaration

    Swift

    open class DataNetworkError : DataError
  • Used together with DataQuery to represent a select, expand or sort item which is a single-part or multi-part path expression. For example, a path whose OData URL representation is “Address/City” might be used to access the “City” property in a complex-typed “Address” property. Also used to represent paths in OData CSDL.

    See more

    Declaration

    Swift

    open class DataPath : PropertyPath, BindingPath
  • Exception thrown when a query cannot be parsed or evaluated.

    See more

    Declaration

    Swift

    open class DataQueryError : DataError
  • Represents an OData data schema.

    See more

    Declaration

    Swift

    open class DataSchema : ObjectBase
  • Exception thrown when a problem is detected with a data schema.

    See more

    Declaration

    Swift

    open class DataSchemaError : DataError
  • Exception thrown when a DataService request fails due to a data service issue.

    See more

    Declaration

    Swift

    open class DataServiceError : DataError
  • Exception thrown when a DataService request fails due to a data storage issue.

    See more

    Declaration

    Swift

    open class DataStorageError : DataError
  • Represents a data type defined by XML Schema Part 2: Datatypes or OData. String, binary, boolean, numeric and calendar types use XML Schema nomenclature. Geography, geometry, complex and entity types use OData nomenclature.

    See more

    Declaration

    Swift

    open class DataType : ObjectBase
  • Abstract base class for wrapper classes that wrap basic data values as objects, as well as calendar values, geography values, geometry values, ComplexValue, EntityValue and ListBase.

    See more

    Declaration

    Swift

    open class DataValue : ObjectBase, Comparable, Hashable
  • A list of item type DataValue.

    See more

    Declaration

    Swift

    open class DataValueList : ListBase, Sequence
  • A map from key type string to value type DataValue?.

    See more

    Declaration

    Swift

    open class DataValueMap : MapBase
  • Constant codes to represent OData versions.

    See more

    Declaration

    Swift

    public class DataVersion
  • Constants to represent days of the week (Monday = 1 to Sunday = 7, using ISO 8601 conventions).

    See more

    Declaration

    Swift

    public class DayOfWeek
  • Represents the XML Schema dayTimeDuration type.

    See more

    Declaration

    Swift

    open class DayTimeDuration : DataValue
  • DataValue subclass that wraps a value of type decimal.

    See more

    Declaration

    Swift

    open class DecimalValue : DataValue
  • A stream of delta items, each of which is either an EntityValue or a ChangedLink. While processing a stream, a delta link may be encountered, but it will not be immediately available to the caller. The deltaLink can be obtained only after the stream is closed.

    Example

    let deltaStream = ...
    while (deltaStream.next())
    {
        if (deltaStream.hasEntity())
        {
            let entity = deltaStream.getEntity()
            // Process entity value.
        }
        else
        {
            let link = deltaStream.getLink()
            // Process changed link.
        }
    }
    deltaStream.close()
    var deltaLink = deltaStream.deltaLink
    // Save delta link for later use.
    
    See more

    Declaration

    Swift

    open class DeltaStream : DataValue
  • DataValue subclass that wraps a value of type double.

    See more

    Declaration

    Swift

    open class DoubleValue : DataValue
  • Represents an OData entity container.

    See more

    Declaration

    Swift

    open class EntityContainer : ObjectBase
  • Encapsulates an OData entity key.

    See more

    Declaration

    Swift

    open class EntityKey : ObjectBase
  • Encapsulates the metadata of an OData entity set. Also used for OData isSingleton entities.

    See also

    DataService.createEntity, DataService.updateEntity, DataService.deleteEntity, DataService.getEntity, DataService.getEntityList.
    See more

    Declaration

    Swift

    open class EntitySet : ObjectBase, BindingPath
  • A stream of entity values.

    See also

    DataService.entityStream, DeltaStream.
    See more

    Declaration

    Swift

    open class EntityStream : ObjectBase
  • Encapsulates the metadata of an OData entity type.

    See more

    Declaration

    Swift

    open class EntityType : StructureType
  • Encapsulates an OData entity value.

    See more

    Declaration

    Swift

    open class EntityValue : StructureBase, BindingPath, EntityValueOrList
  • A list of item type EntityValue.

    See more

    Declaration

    Swift

    open class EntityValueList : ListBase, Codable, EntityValueOrList, Sequence
  • Encapsulates the metadata of an OData enum type.

    See more

    Declaration

    Swift

    open class EnumType : DataType
  • Encapsulates an OData enum value.

    See more

    Declaration

    Swift

    open class EnumValue : DataValue
  • Encapsulates an OData error response.

    See more

    Declaration

    Swift

    open class ErrorResponse : ObjectBase
  • Encapsulates an OData expand item. An expand item indicates a property (or expression) that is used in the $expand system query option.

    See more

    Declaration

    Swift

    open class ExpandItem : ObjectBase
  • Represents an expand transform item.

    See more

    Declaration

    Swift

    open class ExpandTransform : TransformValue
  • Represents a filter transform item.

    See more

    Declaration

    Swift

    open class FilterTransform : TransformValue
  • DataValue subclass that wraps a value of type float.

    See more

    Declaration

    Swift

    open class FloatValue : DataValue
  • A collection of geography values.

    See more

    Declaration

    Swift

    open class GeographyCollection : GeographyValue
  • A sequence of geography points which represents a joined string of lines.

    See more

    Declaration

    Swift

    open class GeographyLineString : GeographyValue
  • A sequence of geography line strings.

    See more

    Declaration

    Swift

    open class GeographyMultiLineString : GeographyValue
  • A sequence of geography points.

    See more

    Declaration

    Swift

    open class GeographyMultiPoint : GeographyValue
  • A sequence of geography polygons.

    See more

    Declaration

    Swift

    open class GeographyMultiPolygon : GeographyValue
  • A geography point.

    See more

    Declaration

    Swift

    open class GeographyPoint : GeographyValue
  • A sequence of geography multi-points which represents a polygon. The first multi-point coordinate is the exterior ring, any others are interior rings.

    See more

    Declaration

    Swift

    open class GeographyPolygon : GeographyValue
  • Declaration

    Swift

    open class GeographyValue : GeospatialValue
  • A list of item type GeographyValue.

    See more

    Declaration

    Swift

    open class GeographyValueList : ListBase, Sequence
  • A collection of geometry values.

    See more

    Declaration

    Swift

    open class GeometryCollection : GeometryValue
  • A sequence of geometry points which represents a joined string of lines.

    See more

    Declaration

    Swift

    open class GeometryLineString : GeometryValue
  • A sequence of geometry line strings.

    See more

    Declaration

    Swift

    open class GeometryMultiLineString : GeometryValue
  • A sequence of geometry points.

    See more

    Declaration

    Swift

    open class GeometryMultiPoint : GeometryValue
  • A sequence of geometry polygons.

    See more

    Declaration

    Swift

    open class GeometryMultiPolygon : GeometryValue
  • A geometry point.

    See more

    Declaration

    Swift

    open class GeometryPoint : GeometryValue
  • A sequence of geometry multi-points which represents a polygon.

    See more

    Declaration

    Swift

    open class GeometryPolygon : GeometryValue
  • Declaration

    Swift

    open class GeometryValue : GeospatialValue
  • A list of item type GeometryValue.

    See more

    Declaration

    Swift

    open class GeometryValueList : ListBase, Sequence
  • Abstract base class for geospatial (geography/geometry) data values.

    See more

    Declaration

    Swift

    open class GeospatialValue : DataValue
  • Represents the XML Schema dateTime type with zone offset.

    See more

    Declaration

    Swift

    open class GlobalDateTime : DataValue
  • Represents a group transform item.

    See more

    Declaration

    Swift

    open class GroupTransform : TransformValue
  • Encapsulates an OData GUID value.

    See more

    Declaration

    Swift

    open class GuidValue : DataValue
  • DataValue subclass that wraps a value of type int.

    See more

    Declaration

    Swift

    open class IntValue : DataValue
  • DataValue subclass that wraps a value of type integer.

    See more

    Declaration

    Swift

    open class IntegerValue : DataValue
  • Object to discover server-only navigation properties between a source entity type, a target entity type and a join entity type. The source is the entity containing the navigation property which owns this JoinSetRelations instance. The target is the entity which is connected to the sorce entity with the navigation property. JoinSet is an entity between the source and the target. This exists only on the server side, and connects the source and the target entities.

    See more

    Declaration

    Swift

    open class JoinSetRelations : ObjectBase
  • A list of item type PointCoordinates.

    See more

    Declaration

    Swift

    open class LineStringCoordinates : ListBase, Sequence
  • Base class for strongly-typed lists.

    See more

    Declaration

    Swift

    open class ListBase : DataValue
  • Represents the XML Schema date type without zone offset.

    See more

    Declaration

    Swift

    open class LocalDate : DataValue
  • Represents the XML Schema dateTime type without zone offset.

    See more

    Declaration

    Swift

    open class LocalDateTime : DataValue
  • Represents the XML Schema time type without zone offset.

    See more

    Declaration

    Swift

    open class LocalTime : DataValue
  • DataValue subclass that wraps a value of type long.

    See more

    Declaration

    Swift

    open class LongValue : DataValue
  • Base class for strongly-typed maps.

    See more

    Declaration

    Swift

    open class MapBase : ObjectBase
  • A lock for ensuring thread-safe access to mutable service metadata.

    See more

    Declaration

    Swift

    open class MetadataLock : ObjectBase
  • Constants to represent months of the year.

    See more

    Declaration

    Swift

    public class MonthOfYear
  • A list of item type LineStringCoordinates.

    See more

    Declaration

    Swift

    open class MultiLineStringCoordinates : ListBase, Sequence
  • A list of item type PointCoordinates.

    See more

    Declaration

    Swift

    open class MultiPointCoordinates : ListBase, Sequence
  • A list of item type PolygonCoordinates.

    See more

    Declaration

    Swift

    open class MultiPolygonCoordinates : ListBase, Sequence
  • Represents an OData navigation property.

    See more

    Declaration

    Swift

    open class NavigationProperty : Property
  • Encapsulates an OData parameter.

    See more

    Declaration

    Swift

    open class Parameter : ObjectBase
  • A list of item type Parameter.

    See more

    Declaration

    Swift

    open class ParameterList : ListBase, Sequence
  • Annotations that are associated with a CSDL target path that is a child of a CSDL model element.

    See more

    Declaration

    Swift

    open class PathAnnotations : ObjectBase
  • Represents an N-dimensional point. Note that some coordinate reference systems will support only x and y dimensions.

    See more

    Declaration

    Swift

    open class PointCoordinates : ListBase, Sequence
  • A list of item type LineStringCoordinates.

    See more

    Declaration

    Swift

    open class PolygonCoordinates : ListBase, Sequence
  • Encapsulates the metadata of an OData structural or navigation property. Used for properties of complex and entity types.

    See more

    Declaration

    Swift

    open class Property : PropertyPath
  • A list of item type Property.

    See more

    Declaration

    Swift

    open class PropertyList : ListBase, Sequence
  • Abstract base class for Property and DataPath. Values of type PropertyPath are typically used in query construction.

    See also

    DataQuery.select, DataQuery.expand, DataQuery.orderBy.
    See more

    Declaration

    Swift

    open class PropertyPath : QueryValue
  • A list of item type PropertyPath.

    See more

    Declaration

    Swift

    open class PropertyPathList : ListBase, Sequence
  • A map from key type string to value type PropertyPath.

    See more

    Declaration

    Swift

    open class PropertyPathMap : MapBase
  • An alias reference for a data value.

    See more

    Declaration

    Swift

    open class QueryAlias : DataValue
  • Encapsulates the boolean value of an OData logical operator. Used to wrap the results of logical QueryOperator in a type-safe manner.

    See also

    DataQuery.queryFilter, DataQuery.filter.

    Example using proxy classes

    open func queryWithFilterExample() throws -> Void {
        let service = self.service
        let query = DataQuery()
            .select(Customer.customerID, Customer.companyName, Customer.contactName)
            .filter(Customer.country.equal("Germany")
                .and(Customer.contactName.greaterEqual("N")))
        // Alternate syntax using convenience operators:
        // let query = DataQuery()
        //     .select(Customer.customerID, Customer.companyName, Customer.contactName)
        //     .filter(Customer.country == "Germany" && Customer.contactName >= "N")
        let customers = try service.fetchCustomers(matching: query)
        self.showCustomers(customers)
    }
    

    Example using dynamic API

    open func queryWithFilterExample() throws -> Void {
        let service = self.service
        let customersEntitySet = service.entitySet(withName: "Customers")
        let customerEntityType = customersEntitySet.entityType
        let customerIDProperty = customerEntityType.property(withName: "CustomerID")
        let companyNameProperty = customerEntityType.property(withName: "CompanyName")
        let contactNameProperty = customerEntityType.property(withName: "ContactName")
        let countryProperty = customerEntityType.property(withName: "Country")
        let query = DataQuery()
            .select(customerIDProperty, companyNameProperty, contactNameProperty)
            .from(customersEntitySet)
            .filter(countryProperty.equal("Germany")
                .and(contactNameProperty.greaterEqual("N")))
        // Alternate syntax using convenience operators:
        // let query = DataQuery()
        //     .select(customerIDProperty, companyNameProperty, contactNameProperty)
        //     .from(customersEntitySet)
        //     .filter(countryProperty == "Germany" && contactNameProperty >= "N")
        let customers = try service.executeQuery(query).entityList()
        self.showCustomers(customers)
    }
    
    See more

    Declaration

    Swift

    open class QueryFilter : DataValue
  • Represents a OData query function. Query functions are typically used within DataQuery.filter. QueryFunctionCall can be constructed using static calls on QueryFunction or, more conveniently, by chained calls on QueryValue.

    Example using proxy classes (with QueryFunction static calls)

    open func queryFunctionExample() throws -> Void {
        let service = self.service
        let query = DataQuery()
            .filter(QueryFunction.contains(QueryFunction.toLower(Customer.address),
                searchValue: StringValue.of("king")))
        let customers = try service.fetchCustomers(matching: query)
        self.showCustomers(customers)
    }
    

    Example using proxy classes (with QueryValue chained calls)

    open func queryValueFunctionExample() throws -> Void {
        let service = self.service
        let query = DataQuery().filter(Customer.address.toLower().contains("king"))
        let customers = try service.fetchCustomers(matching: query)
        self.showCustomers(customers)
    }
    
    See more

    Declaration

    Swift

    open class QueryFunction : ObjectBase
  • Encapsulates the application of an OData query function to a list of arguments.

    See more

    Declaration

    Swift

    open class QueryFunctionCall : DataValue
  • Constants for QueryFunction.code.

    See more

    Declaration

    Swift

    public class QueryFunctionCode
  • Represents a OData query operator. Query operators are typically used within DataQuery.filter. QueryOperatorCall can be constructed using static calls on QueryOperator or, more conveniently, by chained calls on QueryValue.

    Example using proxy classes (with QueryOperator static calls)

    open func queryOperatorExample() throws -> Void {
        let service = self.service
        let query = DataQuery()
            .filter(QueryOperator.greaterEqual(QueryOperator.multiply(OrderDetail.quantity,
                OrderDetail.unitPrice),
                DecimalValue.of(DecimalFunction.fromInt(1000))))
        let details = try service.fetchOrderDetails(matching: query)
        self.showDetails(details)
    }
    

    Example using proxy classes (with QueryValue chained calls)

    open func queryValueOperatorExample() throws -> Void {
        let service = self.service
        let query = DataQuery()
            .filter(OrderDetail.quantity.multiply(OrderDetail.unitPrice)
                .greaterEqual(BigDecimal(1000)))
        // Alternate syntax using overloaded operators:
        // let query = DataQuery().filter(OrderDetail.quantity * OrderDetail.unitPrice >= 1000)
        let details = try service.fetchOrderDetails(matching: query)
        self.showDetails(details)
    }
    
    See more

    Declaration

    Swift

    open class QueryOperator : ObjectBase
  • Encapsulates the application of an OData query operator to a list of arguments.

    See more

    Declaration

    Swift

    open class QueryOperatorCall : DataValue
  • Constants for QueryOperator.code.

    See more

    Declaration

    Swift

    public class QueryOperatorCode
  • Holds a data query and its result value. Allows conversion of the result to optional/required/list values for basic, complex and entity types.

    See more

    Declaration

    Swift

    open class QueryResult : ObjectBase
  • Exception thrown when a query result cannot be converted to the expected type.

    See more

    Declaration

    Swift

    open class QueryResultError : DataError
  • A data type reference for use in a query.

    See more

    Declaration

    Swift

    open class QueryType : DataValue
  • Base class for paths and properties as well as wrapped constant values and query function/operation calls. Intended to allow convenient cascaded application of query functions/operators in fluent query construction.

    See more

    Declaration

    Swift

    open class QueryValue : DataValue
  • Exception thrown when an asynchronous request is cancelled.

    See more

    Declaration

    Swift

    open class RequestCancelledError : DataError
  • Options for processing of data requests. If request options are used for repeatable requests, a new request options object should be used for each distinct request (or the repeatability properties should be reset before object re-use). The repeated execution of a failed request should re-use the original request options object without repeatable being reset beforehand.

    See more

    Declaration

    Swift

    open class RequestOptions : ObjectBase
  • Holds the path to a data service resource.

    See more

    Declaration

    Swift

    open class ResourcePath : ObjectBase
  • Encapsulates an OData select item. A select item indicates a property (or expression) that is used in the $select system query option.

    See more

    Declaration

    Swift

    open class SelectItem : ObjectBase
  • Base class for strongly-typed sets.

    See more

    Declaration

    Swift

    open class SetBase : ObjectBase
  • DataValue subclass that wraps a value of type short.

    See more

    Declaration

    Swift

    open class ShortValue : DataValue
  • Represents a type definition for an underlying basic type.

    See more

    Declaration

    Swift

    open class SimpleType : DataType
  • Encapsulates an OData sort item. A sort item indicates a property (or expression) that is used in the $orderby system query option.

    See also

    DataQuery.sortItems, DataQuery.orderBy, DataQuery.thenBy.
    See more

    Declaration

    Swift

    open class SortItem : ObjectBase
  • Abstract base class for streams.

    See also

    ByteStream, CharStream.
    See more

    Declaration

    Swift

    open class StreamBase : DataValue
  • Represents a link to the value of a media entity resource or a stream-typed property.

    See more

    Declaration

    Swift

    open class StreamLink : DataValue
  • Encapsulates the metadata of an OData stream property.

    See more

    Declaration

    Swift

    open class StreamProperty : Property
  • A map from key type string to value type string.

    See more

    Declaration

    Swift

    open class StringMap : MapBase
  • DataValue subclass that wraps a value of type string.

    See more

    Declaration

    Swift

    open class StringValue : DataValue
  • Represents an OData structural property.

    See more

    Declaration

    Swift

    open class StructuralProperty : Property
  • Common base class for ComplexValue and EntityValue.

    See more

    Declaration

    Swift

    open class StructureBase : DataValue, Codable
  • Common base class for ComplexType and EntityType.

    See more

    Declaration

    Swift

    open class StructureType : DataType
  • A list of item type StructureType.

    See more

    Declaration

    Swift

    open class StructureTypeList : ListBase, Sequence
  • A map from key type string to value type StructureType.

    See more

    Declaration

    Swift

    open class StructureTypeMap : MapBase
  • Represents the Top* transformation items.

    See more

    Declaration

    Swift

    open class TopTransform : AmountTransform
  • Encapsulates an OData transformation item defined in OData Data Aggregation. A TransformValue indicates an expression that is used in the $apply system query option.

    See more

    Declaration

    Swift

    open class TransformValue : QueryValue
  • A list of transformation items.

    See more

    Declaration

    Swift

    open class TransformValueList : ListBase, Sequence
  • Encapsulates the metadata of custom OData type facets.

    See more

    Declaration

    Swift

    open class TypeFacets : ObjectBase
  • DataValue subclass that wraps a value of type unsignedByte.

    See more

    Declaration

    Swift

    open class UnsignedByte : DataValue
  • DataValue subclass that wraps a value of type unsignedShort.

    See more

    Declaration

    Swift

    open class UnsignedShort : DataValue
  • Represents the XML Schema yearMonthDuration type.

    See more

    Declaration

    Swift

    open class YearMonthDuration : DataValue
  • A data service provider that synchronizes data between a local SQL database on a mobile client device and a remote OData service. Occasional download and upload calls may be used to synchronize data changes when the mobile client device is online. The local SQL database can subsequently be queried and updated through the associated SQLDatabaseProvider when the mobile client device is offline. The remote OData service can be cloud-based or on-premise, but will typically be accessed via a cloud-based intermediary which enables connectivity between the mobile client device and the remote OData service. Connectivity between the mobile client device and the remote OData service can be achieved through the associated OnlineODataProvider via SAP Mobile Services and/or SAP BTP Connectivity. The OData service should be enabled for OData change tracking, so that download calls can efficiently obtain only the changed data. If the OData service does not support change tracking, then Mobile Back-End Tools can be used to enable change tracking, either by using a delta-enabled cache database, or by using a delta-enabled existing database. Mobile Back-end Tools can also be used to provide an OData service with a delta-enabled cache database, wrapping a non-OData backend system which is accessible using HTTPS (for REST APIs or SOAP services), JDBC (for SQL databases), or SAP Java Connector (for ABAP systems). The EntitySet.downloadWithoutDeltaLinks property can be set to true to enable client-side change tracking, however this is only appropriate for application prototyping or for production scenarios with a limited amount of data to be downloaded. Client applications should wrap this provider with a DataService (or OfflineDataService) for convenient consumption, including the use of async methods and proxy classes.

    See also

    open, client-side download queries, server-side download queries, OfflineDataService.downloadWithoutDeltaLinks, OfflineDataService.downloadQueriesCanOverlap, OfflineDataService.noDefaultEntityDownload, OfflineDataService.noDefaultStreamDownload.

    Example using proxy classes

    open func setupService() throws -> Void {
        let onlineProvider = OnlineODataProvider(serviceName: "HealthService",
            serviceRoot: "http://health.example.com:8080")
        let localDatabase = SQLDatabaseProvider(serviceName: "HealthDB",
            databaseURL: "sqlite:~/health.db")
        let offlineProvider = CloudSyncProvider(onlineProvider: onlineProvider,
            offlineStore: localDatabase)
        offlineProvider.encryptionKey = self.dbEncryptionKey()
        offlineProvider.createIndex(HealthService.patients, Patient.dateOfBirth,
            Patient.lastName)
        self.healthService = HealthService(provider: offlineProvider)
        try self.healthService.open()
    }
    

    Example using dynamic API

    open func setupService() throws -> Void {
        let onlineProvider = OnlineODataProvider(serviceName: "HealthService",
            serviceRoot: "http://health.example.com:8080")
        let localDatabase = SQLDatabaseProvider(serviceName: "HealthDB",
            databaseURL: "sqlite:~/health.db")
        let offlineProvider = CloudSyncProvider(onlineProvider: onlineProvider,
            offlineStore: localDatabase)
        offlineProvider.encryptionKey = self.dbEncryptionKey()
        offlineProvider.createDynamicIndex("Patients", "dateOfBirth")
        self.healthService = OfflineDataService(provider: offlineProvider)
        try self.healthService.open()
    }
    
    See more

    Declaration

    Swift

    open class CloudSyncProvider : ObjectBase, DataSyncProvider
  • Encapsulates an OData data service.

    See also

    DataQuery.

    Example using proxy classes

    open func dataServiceExample() throws -> Void {
        let provider = OnlineODataProvider(serviceName: "NorthwindService",
            serviceRoot: "http://services.odata.org/V4/Northwind/Northwind.svc/")
        let service = NorthwindService(provider: provider)
        let query = DataQuery()
            .select(Customer.customerID, Customer.companyName, Customer.contactName)
            .orderBy(Customer.companyName)
        let customers = try service.fetchCustomers(matching: query)
        self.showCustomers(customers)
        let customer = customers.first!.copy()
        customer.companyName = "Created Inc."
        try service.createEntity(customer)
        customer.companyName = "Updated Inc."
        try service.updateEntity(customer)
        try service.deleteEntity(customer)
    }
    

    Example using dynamic API

    open func dataServiceExample() throws -> Void {
        let provider = OnlineODataProvider(serviceName: "NorthwindService",
            serviceRoot: "http://services.odata.org/V4/Northwind/Northwind.svc/")
        let service = DataService(provider: provider)
        try service.loadMetadata()
        let customersEntitySet = service.entitySet(withName: "Customers")
        let customerEntityType = customersEntitySet.entityType
        let customerIDProperty = customerEntityType.property(withName: "CustomerID")
        let companyNameProperty = customerEntityType.property(withName: "CompanyName")
        let contactNameProperty = customerEntityType.property(withName: "ContactName")
        let query = DataQuery()
            .select(customerIDProperty, companyNameProperty, contactNameProperty)
            .from(customersEntitySet).orderBy(companyNameProperty)
        let customers = try service.executeQuery(query).entityList()
        self.showCustomers(customers)
        let customer = customers.first().copyEntity()
        companyNameProperty.setStringValue(in: customer, to: "Created Inc.")
        try service.createEntity(customer)
        companyNameProperty.setStringValue(in: customer, to: "Updated Inc.")
        try service.updateEntity(customer)
        try service.deleteEntity(customer)
    }
    
    See more

    Declaration

    Swift

    @available(swift 5.5)
    open class DataServiceAsync : ObjectBase
  • A query used to limit the downloading of entities with CloudSyncProvider.

    See also

    OfflineDataService.createDownloadQuery.
    See more

    Declaration

    Swift

    open class DownloadQuery : ObjectBase
  • A list of item type DownloadQuery.

    See more

    Declaration

    Swift

    open class DownloadQueryList : ListBase, Sequence
  • A data query subclass for queries that obtain a response from caller-supplied JSON text.

    See more

    Declaration

    Swift

    open class FromJSON : DataQuery
  • Deprecated. Encapsulates an OData data service. Note: this class provides legacy-style async functions. Use DataService, OnlineDataService or OfflineDataService for Swift.Result-style async functions.

    See more

    Declaration

    Swift

    open class LegacyAnyDataService : ObjectBase
  • Deprecated. Encapsulates an OData data service. Note: this class provides legacy-style async functions. Use DataService, OnlineDataService or OfflineDataService for Swift.Result-style async functions.

    See more

    Declaration

    Swift

    open class LegacyDataService<Provider> where Provider : DataServiceProvider
  • Options for interaction with a data network.

    See more

    Declaration

    Swift

    open class NetworkOptions : ObjectBase
  • A specialization of DataService where the provider is a DataSyncProvider.

    See more

    Declaration

    Swift

    open class OfflineDataService : DataService
  • An specialization of DataService where the provider is a DataSyncProvider, using the async/await style of asynchronous operations.

    See more

    Declaration

    Swift

    @available(swift 5.5)
    open class OfflineDataServiceAsync : DataServiceAsync
  • A specialization of DataService where the provider is an OnlineODataProvider.

    See more

    Declaration

    Swift

    open class OnlineDataService : DataService
  • An specialization of DataService where the provider is an OnlineODataProvider, using the async/await style of asynchronous operations.

    See more

    Declaration

    Swift

    @available(swift 5.5)
    open class OnlineDataServiceAsync : DataServiceAsync
  • Generalized operation progress information, e.g. for network download / upload operations.

    See more

    Declaration

    Swift

    open class OperationProgress : ObjectBase
  • Represents a pending request from client to server, retained on the client during offline operation until it can be successfully uploaded to the server, or cancelled by the application.

    See more

    Declaration

    Swift

    open class PendingRequest : ObjectBase
  • A list of item type PendingRequest.

    See more

    Declaration

    Swift

    open class PendingRequestList : ListBase, Sequence
  • Exception thrown by SQL functions when an error occurs.

    See more

    Declaration

    Swift

    open class SQLDatabaseError : DataStorageError
  • An implementation of DataServiceProvider using a SQL database. A remote OData service is not required in order to use this provider. The underlying database software is SQLite (SQLCipher).

    See more

    Declaration

    Swift

    open class SQLDatabaseProvider : ObjectBase, DataServiceProvider
  • Options for interaction with a data service.

    See more

    Declaration

    Swift

    open class ServiceOptions : ObjectBase
  • Options for offline storage of data from a DataService.

    See more

    Declaration

    Swift

    open class StorageOptions : ObjectBase
  • Contains information about a synchronization event, such as download or upload.

    See more

    Declaration

    Swift

    open class SyncEvent : ObjectBase
  • A list of item type SyncEvent.

    See more

    Declaration

    Swift

    open class SyncEventList : ListBase, Sequence
  • Request options for OfflineDataService.download and OfflineDataService.upload.

    See more

    Declaration

    Swift

    open class SyncOptions : ObjectBase
  • A utility class for formatting OData values as JSON strings.

    See more

    Declaration

    Swift

    public class ToJSON
  • Exception thrown by DataSyncProvider.upload when one or more pending requests cannot be uploaded due to a backend failure. The message for this exception will not be localized. Please use the properties (failureCount, successCount, notSentCount) for error handling and user notification.

    See also

    OfflineDataService.getFailedRequests, to list the failed requests after an UploadException has been thrown.
    See more

    Declaration

    Swift

    open class UploadError : DataError
  • Arbitrary precision decimal value.

    See more

    Declaration

    Swift

    open class BigDecimal : ObjectBase
    extension BigDecimal: Equatable, Comparable
  • Arbitrary precision integer value.

    See more

    Declaration

    Swift

    open class BigInteger : ObjectBase
    extension BigInteger: Equatable, Comparable
  • An exception thrown if HttpRequest.send cannot be completed due to a network error, or when one of the HTTP functions is used in an inappropriate manner or with invalid parameters.

    See more

    Declaration

    Swift

    open class HTTPError : DataNetworkError
  • Encapsulates a map of HTTP cookies.

    See more

    Declaration

    Swift

    open class HTTPCookies : ObjectBase
  • Encapsulates a map of HTTP headers, allowing case-insensitive lookup.

    See more

    Declaration

    Swift

    open class HTTPHeaders : ObjectBase
  • Utility functions for asserting/converting query result into a single item.

    See more

    Declaration

    Swift

    public class Single