UNPKG

@sap/xsodata

Version:

Expose data from a HANA database as OData V2 service with help of .xsodata files.

63 lines (45 loc) 1.41 kB
'use strict'; //API exports.ResourceSegment = ResourceSegment; exports.MetadataSegment = MetadataSegment; exports.BatchSegment = BatchSegment; exports.BatchSegment = BatchSegment; exports.CountSegment = CountSegment; exports.ValueSegment = ValueSegment; exports.LinksSegment = LinksSegment; exports.ServiceSegment = ServiceSegment; //Code function ServiceSegment(position) { this.position = position; } function MetadataSegment(identifier, position) { this.identifier = identifier; this.position = position; } function BatchSegment(identifier, position) { this.identifier = identifier; this.position = position; } function ValueSegment(identifier, position) { this.identifier = identifier; this.position = position; } function CountSegment(identifier, position) { this.identifier = identifier; this.position = position; } function LinksSegment(identifier, position) { this.identifier = identifier; this.position = position; } function ResourceSegment(identifier, keyValues, position) { this.identifier = identifier; this.keys = keyValues ? keyValues : null; this.position = position; } ResourceSegment.prototype.toString = function toString() { return "ResourceSegment: " + this.identifier; }; ResourceSegment.prototype.toLongString = function toLongString() { return "ResourceSegment: " + JSON.stringify(this, 4, "\t"); };