DataType
open class DataType: ObjectBase
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.
-
Constant type code for the
string
data type.Declaration
Swift
public static let string: Int = (1 as Int)
-
Constant type code for the
binary
data type.Declaration
Swift
public static let binary: Int = (2 as Int)
-
Constant type code for the
boolean
data type.Declaration
Swift
public static let boolean: Int = (3 as Int)
-
Constant type code for the
char
data type.Declaration
Swift
public static let char: Int = (4 as Int)
-
Constant type code for the
byte
data type.Declaration
Swift
public static let byte: Int = (5 as Int)
-
Constant type code for the
short
data type.Declaration
Swift
public static let short: Int = (6 as Int)
-
Constant type code for the
int
data type.Declaration
Swift
public static let int: Int = (7 as Int)
-
Constant type code for the
long
data type.Declaration
Swift
public static let long: Int = (8 as Int)
-
Constant type code for the
integer
data type.Declaration
Swift
public static let integer: Int = (9 as Int)
-
Constant type code for the
decimal
data type.Declaration
Swift
public static let decimal: Int = (10 as Int)
-
Constant type code for the
float
data type.Declaration
Swift
public static let float: Int = (11 as Int)
-
Constant type code for the
double
data type.Declaration
Swift
public static let double: Int = (12 as Int)
-
Constant type code for the
unsignedByte
data type.Declaration
Swift
public static let unsignedByte: Int = (13 as Int)
-
Constant type code for the
unsignedShort
data type.Declaration
Swift
public static let unsignedShort: Int = (14 as Int)
-
Constant type code for the
unsignedInt
data type.Declaration
Swift
public static let unsignedInt: Int = (15 as Int)
-
Constant type code for the
unsignedLong
data type.Declaration
Swift
public static let unsignedLong: Int = (16 as Int)
-
Constant type code for an enum type.
Declaration
Swift
public static let enumValue: Int = (17 as Int)
-
Constant type code for the
GuidValue
data type.Declaration
Swift
public static let guidValue: Int = (18 as Int)
-
Constant type code for the
ByteStream
data type.Declaration
Swift
public static let byteStream: Int = (19 as Int)
-
Constant type code for the
CharStream
data type.Declaration
Swift
public static let charStream: Int = (20 as Int)
-
Constant type code for the
StreamLink
data type.Declaration
Swift
public static let streamLink: Int = (21 as Int)
-
Constant type code for the
LocalDate
data type.Declaration
Swift
public static let localDate: Int = (22 as Int)
-
Constant type code for the
LocalTime
data type.Declaration
Swift
public static let localTime: Int = (23 as Int)
-
Constant type code for the
LocalDateTime
data type.Declaration
Swift
public static let localDateTime: Int = (24 as Int)
-
Constant type code for the
GlobalDateTime
data type.Declaration
Swift
public static let globalDateTime: Int = (25 as Int)
-
Constant type code for the
DayTimeDuration
data type.Declaration
Swift
public static let dayTimeDuration: Int = (26 as Int)
-
Constant type code for the
YearMonthDuration
data type.Declaration
Swift
public static let yearMonthDuration: Int = (27 as Int)
-
Constant type code for the
GeographyValue
data type.Declaration
Swift
public static let geographyValue: Int = (31 as Int)
-
Constant type code for the
GeographyPoint
data type.Declaration
Swift
public static let geographyPoint: Int = (32 as Int)
-
Constant type code for the
GeographyMultiPoint
data type.Declaration
Swift
public static let geographyMultiPoint: Int = (33 as Int)
-
Constant type code for the
GeographyLineString
data type.Declaration
Swift
public static let geographyLineString: Int = (34 as Int)
-
Constant type code for the
GeographyMultiLineString
data type.Declaration
Swift
public static let geographyMultiLineString: Int = (35 as Int)
-
Constant type code for the
GeographyPolygon
data type.Declaration
Swift
public static let geographyPolygon: Int = (36 as Int)
-
Constant type code for the
GeographyMultiPolygon
data type.Declaration
Swift
public static let geographyMultiPolygon: Int = (37 as Int)
-
Constant type code for the
GeographyCollection
data type.Declaration
Swift
public static let geographyCollection: Int = (38 as Int)
-
Constant type code for the
GeometryValue
data type.Declaration
Swift
public static let geometryValue: Int = (41 as Int)
-
Constant type code for the
GeometryPoint
data type.Declaration
Swift
public static let geometryPoint: Int = (42 as Int)
-
Constant type code for the
GeometryMultiPoint
data type.Declaration
Swift
public static let geometryMultiPoint: Int = (43 as Int)
-
Constant type code for the
GeometryLineString
data type.Declaration
Swift
public static let geometryLineString: Int = (44 as Int)
-
Constant type code for the
GeometryMultiLineString
data type.Declaration
Swift
public static let geometryMultiLineString: Int = (45 as Int)
-
Constant type code for the
GeometryPolygon
data type.Declaration
Swift
public static let geometryPolygon: Int = (46 as Int)
-
Constant type code for the
GeometryMultiPolygon
data type.Declaration
Swift
public static let geometryMultiPolygon: Int = (47 as Int)
-
Constant type code for the
GeometryCollection
data type.Declaration
Swift
public static let geometryCollection: Int = (48 as Int)
-
Constant type code for the
Edm.PrimitiveType
abstract data type.Declaration
Swift
public static let edmPrimitive: Int = (49 as Int)
-
Constant type code for the
object
data type.Declaration
Swift
public static let object: Int = (50 as Int)
-
Constant type code for the
ComplexValue
data type.Declaration
Swift
public static let complexValue: Int = (51 as Int)
-
Constant type code for the
EntityValue
data type.Declaration
Swift
public static let entityValue: Int = (52 as Int)
-
Constant type code for the
ListBase
data type.Declaration
Swift
public static let list: Int = (60 as Int)
-
Constant type code for the
DataValueList
data type.Declaration
Swift
public static let dataValueList: Int = (61 as Int)
-
Constant type code for the
ComplexValueList
data type.Declaration
Swift
public static let complexValueList: Int = (62 as Int)
-
Constant type code for the
EntityValueList
data type.Declaration
Swift
public static let entityValueList: Int = (63 as Int)
-
Constant type code for the
DeltaStream
data type.Declaration
Swift
public static let deltaStream: Int = (64 as Int)
-
Constant type code for
DataPath
.Declaration
Swift
public static let path: Int = (80 as Int)
-
Constant type code for an OData CSDL
Path
expression.Declaration
Swift
public static let pathExpression: Int = (81 as Int)
-
Constant type code for an OData CSDL
AnnotationPath
.Declaration
Swift
public static let annotationPath: Int = (82 as Int)
-
Constant type code for an OData CSDL
PropertyPath
.Declaration
Swift
public static let structuralPath: Int = (83 as Int)
-
Constant type code for an OData CSDL
NavigationPropertyPath
.Declaration
Swift
public static let navigationPath: Int = (84 as Int)
-
Constant type code for an OData CSDL
AnyPropertyPath
.Declaration
Swift
public static let propertyPath: Int = (85 as Int)
-
Constant type code for an OData CSDL
TargetPath
.Declaration
Swift
public static let targetPath: Int = (86 as Int)
-
Constant type code for a dynamic (structural or navigation) path.
Declaration
Swift
public static let dynamicPath: Int = (87 as Int)
-
Constant type code for
QueryAlias
.Declaration
Swift
public static let queryAlias: Int = (90 as Int)
-
Constant type code for
QueryFilter
.Declaration
Swift
public static let queryFilter: Int = (91 as Int)
-
Constant type code for
QueryFunctionCall
.Declaration
Swift
public static let queryFunctionCall: Int = (92 as Int)
-
Constant type code for
QueryOperatorCall
.Declaration
Swift
public static let queryOperatorCall: Int = (93 as Int)
-
The
unknown
type.Declaration
Swift
public static let unknown: DataType = DataType._new1_in_DataType("unknown", DataType.codeUnknown)
-
Default initializer.
Declaration
Swift
override public init()
-
If this type is a derived simple, complex, entity or enum type, then the base type. Otherwise throw an exception.
See also
isDerived
.Declaration
Swift
open var baseType: DataType
-
A numeric code to represent this data type.
See also
constants
.Declaration
Swift
open var code: Int
-
Throws
UndefinedException
if there is no basic type with the specified code.See also
constants
.Declaration
Swift
open class func forCode(_ code: Int) -> DataType
Parameters
code
Data type code.
Return Value
the data type for a basic type code.
-
Throws
UndefinedException
if there is no basic type with the specified name.See also
forCode
.Declaration
Swift
open class func forName(_ name: String) -> DataType
Parameters
name
Data type name. Note: for optimial performance, types should be looked up by code.
Return Value
the data type for a basic type name.
-
true
if this type is a basic type (not a complex, entity, list or stream type).Declaration
Swift
open var isBasic: Bool
-
true
if this type is a basic list type.Declaration
Swift
open var isBasicList: Bool
-
true
if this type is a calendar type. Calendar types are also basic types.See also
isBasic
Declaration
Swift
open var isCalendar: Bool
-
true
if this is a complex type.See also
ComplexType
.Declaration
Swift
open var isComplex: Bool
-
true
if this is a complex list type.Declaration
Swift
open var isComplexList: Bool
-
true
if this type is a derived simple, complex, entity or enum type.Declaration
Swift
open var isDerived: Bool
-
true
if this is an entity type.See also
EntityType
.Declaration
Swift
open var isEntity: Bool
-
true
if this is an entity list type.Declaration
Swift
open var isEntityList: Bool
-
true
if this type is an enum type.Declaration
Swift
open var isEnum: Bool
-
true
if this is an enum list type.Declaration
Swift
open var isEnumList: Bool
-
true
if this type is a geography type. Geography types are also basic types.See also
isBasic
Declaration
Swift
open var isGeography: Bool
-
true
if this type is a geometry type. Geometry types are also basic types.See also
isBasic
Declaration
Swift
open var isGeometry: Bool
-
true
if this type is a geospatial (geography/geometry) type. Geospatial types are also basic types.Declaration
Swift
open var isGeospatial: Bool
-
true
if this type is a GUID type.Declaration
Swift
open var isGuid: Bool
-
true
if this is a list type.See also
ListBase
.Declaration
Swift
open var isList: Bool
-
true
if this type is a number type.Declaration
Swift
open var isNumber: Bool
-
true
if this type is a path type.Declaration
Swift
open var isPath: Bool
-
true
if this is a stream type.Declaration
Swift
open var isStream: Bool
-
true
if this type is an unsigned type.Declaration
Swift
open var isUnsigned: Bool
-
If this type is a list type, then the item type. Otherwise throw an exception.
See also
isList
.Declaration
Swift
open var itemType: DataType
-
Declaration
Swift
open class func listOf(item: DataType) -> DataType
Parameters
item
The item type.
Return Value
The data type for a list of the specified item type.
-
The name of this data type.
Declaration
Swift
open var name: String
-
Declaration
Swift
override open func toString() -> String
Return Value
The name of this data type.