com.apama.memorystore
Event Schema


Represents the schema for a table in the store, specifying the field names, types, and other behavioural information about the table.

The fields and types sequences must be the same length as one another, specifying the names of fields and their corresponding types.

Never construct a Schema using a "Schema(...)" expression. Instead, always create a variable initialized to "new Schema", and then set parameters individually with separate statements. This ensures that your code will continue to work without modification if a subsequent version of the MemoryStore adds more parameters to the Schema event.
See Also:
com.apama.memorystore.Store.prepare() - The schema for a table is specified when it is prepared.

Field summary
 sequence<string>fields

A sequence specifying the name of each field in this table.
 sequence<string>types

A sequence specifying the type of each field in this table.
 booleanexposeMemoryView

Legacy option - exposed views are no longer supported. Do not use this field.
 booleanexposePersistentView

Legacy option - exposed views are no longer supported. Do not use this field.
 stringmemoryViewDisplayName

Legacy option - exposed views are no longer supported. Do not use this field.
 stringmemoryViewDescription

Legacy option - exposed views are no longer supported. Do not use this field.
 stringpersistentViewDisplayName

Legacy option - exposed views are no longer supported. Do not use this field.
 stringpersistentViewDescription

Legacy option - exposed views are no longer supported. Do not use this field.
 
Action summary
 sequence<string>static normalizeTypes(sequence<string> types)

Normalize a sequence of types to those accepted by Memory Store.
 com.apama.memorystore.Schemastatic schemaFromAny(any prototype)

Convert the supplied types into a valid MemoryStore table Schema.
 
Field detail

exposeMemoryView

boolean exposeMemoryView
Legacy option - exposed views are no longer supported. Do not use this field.

exposePersistentView

boolean exposePersistentView
Legacy option - exposed views are no longer supported. Do not use this field.

fields

sequence<stringfields
A sequence specifying the name of each field in this table.

For looking up the index of a specific field name, use Table.getFieldIndex() which is more efficient than using indexOf() on the fields sequence.
See Also:
com.apama.memorystore.Table.getFieldIndex() - for efficiently obtaining the index of a field.

memoryViewDescription

string memoryViewDescription
Legacy option - exposed views are no longer supported. Do not use this field.

memoryViewDisplayName

string memoryViewDisplayName
Legacy option - exposed views are no longer supported. Do not use this field.

persistentViewDescription

string persistentViewDescription
Legacy option - exposed views are no longer supported. Do not use this field.

persistentViewDisplayName

string persistentViewDisplayName
Legacy option - exposed views are no longer supported. Do not use this field.

types

sequence<stringtypes
A sequence specifying the type of each field in this table.

Permitted types are currently: 'integer', 'boolean', 'float', 'string' and 'decimal'.

This sequence must have the same length as the fields sequence.
Action detail

normalizeTypes

sequence<string> static normalizeTypes(sequence<string> types)
Normalize a sequence of types to those accepted by Memory Store.

Converts anything other than integer, float, boolean and decimal to string.
Parameters:
types - Type string sequence to normalize
Returns:
Sequence of normalized string types
Since:
10.1

schemaFromAny

com.apama.memorystore.Schema static schemaFromAny(any prototype)
Convert the supplied types into a valid MemoryStore table Schema.

Field types that are not supported by MemoryStore are converted to strings.
Parameters:
prototype
Returns:
The MemoryStore table Schema.
Since:
10.1