# Class TableSchema

An implementation of Schema that directly mirrors the equivalent properties on Table.

#### Hierarchy (view full)

- Schema
  - TableSchema

#####
Index

### Constructors

constructor

### Properties

_handles
_primaryKeyField
_tableBindings
_tableExtension
_watchHandles
@eventTypes
fieldExtensions
fields

### Accessors

displayField
geometryType
hasGeometry
parent
primaryKeyField
spatialReference
timeZone
typeIdField
types

### Methods

_bindSettingToTableProperty
_createFieldCollection
_getCollectionSetting
_getNestedSettings
_getSerializableProperties
_getSetting
_hasSettingIncludingAncestor
_onTableResolved
_setParent
_setSetting
_toPropertyDef
assignProperties
assignPropertiesAsync
createAllFieldInfos
createPopupTemplate
destroy
findFieldByName
finishAssignProperties
getDefault
getDefaults
getSerializableProperties
isModified
reset
toJSON
createFieldInfoFromField

##
Constructors

### constructor

- new TableSchema(tableExtension): TableSchema

- #### Parameters

  - tableExtension: TableExtension<TableExtensionProperties>

  #### Returns TableSchema

  Overrides Schema.constructor

##
Properties

### `Protected` `Readonly`_handles

_handles: Handles<unknown, ResourceHandle>

Inherited from Schema._handles

### `Protected`_primaryKeyField

_primaryKeyField: string

A cache of the primary key field name used to speed up lookup.

Inherited from Schema._primaryKeyField

### `Protected` `Readonly`_tableBindings

_tableBindings: Map<keyof TableSchema,
| "listMode"
| "title"
| "url"
| "id"
| "gdbVersion"
| "destroy"
| "@eventTypes"
| "set"
| "emit"
| "hasEventListener"
| "on"
| "addHandles"
| "hasHandles"
| "removeHandles"
| "watch"
| "clone"
| "fields"
| "outFields"
| "hasM"
| "hasZ"
| "popupTemplate"
| "labelingInfo"
| "renderer"
| "opacity"
| "spatialReference"
| "mode"
| "elevationInfo"
| "visible"
| "refreshInterval"
| "labelsVisible"
| "maxScale"
| "popupEnabled"
| "floorInfo"
| "source"
| "sourceJSON"
| "objectIdField"
| "geometryType"
| "types"
| "templates"
| "orderBy"
| "definitionExpression"
| "minScale"
| "timeInfo"
| "featureReduction"
| "globalIdField"
| "createPopupTemplate"
| "createQuery"
| "getField"
| "getFieldDomain"
| "queryExtent"
| "queryFeatureCount"
| "queryFeatures"
| "queryObjectIds"
| "getAtOrigin"
| "originOf"
| "revertAllToOrigin"
| "revertToOrigin"
| "isFulfilled"
| "isRejected"
| "isResolved"
| "when"
| "cancelLoad"
| "load"
| "fullExtent"
| "parent"
| "persistenceEnabled"
| "visibilityTimeExtent"
| "createLayerView"
| "fetchAttributionData"
| "customParameters"
| "blendMode"
| "legendEnabled"
| "apiKey"
| "save"
| "saveAs"
| "portalItem"
| "copyright"
| "layerId"
| "effect"
| "queryAttributeBins"
| "refresh"
| "timeExtent"
| "timeOffset"
| "useViewTime"
| "dateFieldsTimeZone"
| "displayField"
| "historicMoment"
| "returnM"
| "returnZ"
| "displayFilterEnabled"
| "displayFilterInfo"
| "formTemplate"
| "attributeTableTemplate"
| "screenSizePerspectiveEnabled"
| "trackInfo"
| "featureEffect"
| "typeIdField"
| "editingEnabled"
| "addAttachment"
| "applyEdits"
| "deleteAttachments"
| "queryAttachments"
| "queryRelatedFeatures"
| "queryRelatedFeaturesCount"
| "updateAttachment"
| "queryTopFeatures"
| "charts"
| "dynamicDataSource"
| "fieldConfigurations"
| "createFieldConfigurations"
| "getFeatureTitle"
| "getFeatureType"
| "getFieldAlias"
| "getFieldConfiguration"
| "queryTopFeatureCount"
| "queryTopFeaturesExtent"
| "queryTopObjectIds"> = ...

Maps schema properties to equivalent properties on the table.

### `Protected` `Readonly`_tableExtension

_tableExtension: TableExtension<TableExtensionProperties>

TableExtension that this schema belongs to.

### `Protected` `Readonly`_watchHandles

_watchHandles: ResourceHandle[] = []

A set of watch handles that get cleaned up when the class instance is destroyed.

Inherited from Schema._watchHandles

### @eventTypes

@eventTypes: SchemaEvents

#### Deprecated

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

Inherited from Schema.@eventTypes

### `Readonly` fieldExtensions

fieldExtensions: FieldExtensionCollection

The field extensions associated with each field of the schema.

Inherited from Schema.fieldExtensions

### `Readonly` fields

fields: FieldCollection

A collection of Field objects describing each field in the schema.

Inherited from Schema.fields

##
Accessors

### displayField

- get displayField(): string

- The name of the field containing the display name of the feature.

  #### Returns string

  Inherited from Schema.displayField

- set displayField(value): void

- #### Parameters

  - value: string

  #### Returns void

  Inherited from Schema.displayField

### geometryType

- get geometryType(): GeometryType

- The type of geometry. This property will be undefined if the data is not spatial.

  #### Returns GeometryType

  Overrides Schema.geometryType

- set geometryType(value): void

- The type of geometry. This property will be undefined if the data is not spatial.

  #### Parameters

  - value: GeometryType

  #### Returns void

  Overrides Schema.geometryType

### hasGeometry

- get hasGeometry(): boolean

- Whether the schema has spatial data.

  #### Returns boolean

  Inherited from Schema.hasGeometry

### parent

- get parent(): this

- The parent settings that these settings will inherit from.

  #### Returns this

  Inherited from Schema.parent

- set parent(value): void

- #### Parameters

  - value: this

  #### Returns void

  Inherited from Schema.parent

### primaryKeyField

- get primaryKeyField(): string

- The name of the field containing the feature's primary key (value that uniquely identifies a feature).

  #### Returns string

  Inherited from Schema.primaryKeyField

- set primaryKeyField(value): void

- #### Parameters

  - value: string

  #### Returns void

  Inherited from Schema.primaryKeyField

### spatialReference

- get spatialReference(): SpatialReference

- The spatial reference of the schema. Can be defined using a well-known ID (WKID) or well-known text (WKT).

  #### Returns SpatialReference

  Overrides Schema.spatialReference

- set spatialReference(value): void

- The spatial reference of the schema. Can be defined using a well-known ID (WKID) or well-known text (WKT).

  #### Parameters

  - value: SpatialReference

  #### Returns void

  Overrides Schema.spatialReference

### timeZone

- get timeZone(): string

- The time zone that the data is stored in. The default is UTC.

  #### Returns string

  Inherited from Schema.timeZone

- set timeZone(value): void

- #### Parameters

  - value: string

  #### Returns void

  Inherited from Schema.timeZone

### typeIdField

- get typeIdField(): string

- The name of the field holding the type ID or subtypes for the features.

  #### Returns string

  Inherited from Schema.typeIdField

- set typeIdField(value): void

- #### Parameters

  - value: string

  #### Returns void

  Inherited from Schema.typeIdField

### types

- get types(): Collection<FeatureType>

- A collection of types or subtypes for the features.

  #### Returns Collection<FeatureType>

  Inherited from Schema.types

##
Methods

### `Protected`_bindSettingToTableProperty

- _bindSettingToTableProperty(setting, tableProperty?): void

- Binds a setting to an equivalent property on the table.

  #### Parameters

  - setting: keyof TableSchema

    The name of the setting to bind.

  - `Optional` tableProperty:
    | "listMode"
    | "title"
    | "url"
    | "id"
    | "gdbVersion"
    | "destroy"
    | "@eventTypes"
    | "set"
    | "emit"
    | "hasEventListener"
    | "on"
    | "addHandles"
    | "hasHandles"
    | "removeHandles"
    | "watch"
    | "clone"
    | "fields"
    | "outFields"
    | "hasM"
    | "hasZ"
    | "popupTemplate"
    | "labelingInfo"
    | "renderer"
    | "opacity"
    | "spatialReference"
    | "mode"
    | "elevationInfo"
    | "visible"
    | "refreshInterval"
    | "labelsVisible"
    | "maxScale"
    | "popupEnabled"
    | "floorInfo"
    | "source"
    | "sourceJSON"
    | "objectIdField"
    | "geometryType"
    | "types"
    | "templates"
    | "orderBy"
    | "definitionExpression"
    | "minScale"
    | "timeInfo"
    | "featureReduction"
    | "globalIdField"
    | "createPopupTemplate"
    | "createQuery"
    | "getField"
    | "getFieldDomain"
    | "queryExtent"
    | "queryFeatureCount"
    | "queryFeatures"
    | "queryObjectIds"
    | "getAtOrigin"
    | "originOf"
    | "revertAllToOrigin"
    | "revertToOrigin"
    | "isFulfilled"
    | "isRejected"
    | "isResolved"
    | "when"
    | "cancelLoad"
    | "load"
    | "fullExtent"
    | "parent"
    | "persistenceEnabled"
    | "visibilityTimeExtent"
    | "createLayerView"
    | "fetchAttributionData"
    | "customParameters"
    | "blendMode"
    | "legendEnabled"
    | "apiKey"
    | "save"
    | "saveAs"
    | "portalItem"
    | "copyright"
    | "layerId"
    | "effect"
    | "queryAttributeBins"
    | "refresh"
    | "timeExtent"
    | "timeOffset"
    | "useViewTime"
    | "dateFieldsTimeZone"
    | "displayField"
    | "historicMoment"
    | "returnM"
    | "returnZ"
    | "displayFilterEnabled"
    | "displayFilterInfo"
    | "formTemplate"
    | "attributeTableTemplate"
    | "screenSizePerspectiveEnabled"
    | "trackInfo"
    | "featureEffect"
    | "typeIdField"
    | "editingEnabled"
    | "addAttachment"
    | "applyEdits"
    | "deleteAttachments"
    | "queryAttachments"
    | "queryRelatedFeatures"
    | "queryRelatedFeaturesCount"
    | "updateAttachment"
    | "queryTopFeatures"
    | "charts"
    | "dynamicDataSource"
    | "fieldConfigurations"
    | "createFieldConfigurations"
    | "getFeatureTitle"
    | "getFeatureType"
    | "getFieldAlias"
    | "getFieldConfiguration"
    | "queryTopFeatureCount"
    | "queryTopFeaturesExtent"
    | "queryTopObjectIds"

    The name of the equivalent property on the table, if it differs from the setting.

  #### Returns void

### `Protected`_createFieldCollection

- _createFieldCollection(): Collection<Field>

- Creates the backing collection for fields.

  #### Returns Collection<Field>

### `Protected`_getCollectionSetting

- _getCollectionSetting<T>(setting): Collection<T>

- Gets the value for a setting that represents a collection.

  #### Type Parameters

  - T

  #### Parameters

  - setting: keyof TableSchema

    The setting name.

  #### Returns Collection<T>

  Inherited from Schema._getCollectionSetting

### `Protected`_getNestedSettings

- _getNestedSettings<T>(setting, factory): T

- Gets a property which is itself an instance of Settings.

  #### Type Parameters

  - T extends Settings<unknown>

  #### Parameters

  - setting: keyof TableSchema

    The setting name.

  - factory: (() => T)

    A factory for creating the nested settings.

    - - (): T

      - #### Returns T

  Inherited from Schema._getNestedSettings

### `Protected`_getSerializableProperties

- _getSerializableProperties(): PropertyDefs<SchemaProperties>

- The property keys and their metadata that are used to implement serializing and deserializing the class instance.

  #### Returns PropertyDefs<SchemaProperties>

  Inherited from Schema._getSerializableProperties

### `Protected`_getSetting

- _getSetting<K>(setting, defaultValue?): TableSchema[K]

- Gets the value for a setting.

  #### Type Parameters

  - K extends keyof TableSchema

  #### Parameters

  - setting: K

    The setting name.

  - `Optional` defaultValue: TableSchema[K]

    The default value if the setting is not explicitly set.

  #### Returns TableSchema[K]

  Overrides Schema._getSetting

### `Protected`_hasSettingIncludingAncestor

- _hasSettingIncludingAncestor<K>(setting): boolean

- Determines whether the specified setting has been modified locally or by any parent of the current settings instance.

  #### Type Parameters

  - K extends keyof TableSchema

  #### Parameters

  - setting: K

    The setting to check.

  #### Returns boolean

  Overrides Schema._hasSettingIncludingAncestor

### `Protected`_onTableResolved

- _onTableResolved(table): void

- Invoked as soon as a table is available.

  #### Parameters

  - table: FeatureLayer

    The newly resolved table instance.

  #### Returns void

### `Protected`_setParent

- _setParent(parent): void

- Sets the parent settings that these settings will inherit from.

  #### Parameters

  - parent: TableSchema

    The parent settings to inherit from.

  #### Returns void

  Inherited from Schema._setParent

### `Protected`_setSetting

- _setSetting<K>(setting, value): void

- Sets the value for a setting. This will override any inherited value for the setting.

  #### Type Parameters

  - K extends keyof TableSchema

  #### Parameters

  - setting: K

    The setting name.

  - value: TableSchema[K]

    The setting value.

  #### Returns void

  Overrides Schema._setSetting

### `Protected`_toPropertyDef

- _toPropertyDef<T>(def): PropertyDef<T>

- Converts the value to a PropertyDef object.

  #### Type Parameters

  - T

  #### Parameters

  - def: PropertyDefSerializeMode | PropertyDefSerializeMode[] | PropertyDef<T>

    The value to convert.

  #### Returns PropertyDef<T>

  Inherited from Schema._toPropertyDef

### assignProperties

- assignProperties(properties): void

- #### Parameters

  - properties: Partial<unknown>

  #### Returns void

  #### Inherit Doc

  Inherited from Schema.assignProperties

### assignPropertiesAsync

- assignPropertiesAsync(properties): Promise<void>

- #### Parameters

  - properties: Partial<unknown>

  #### Returns Promise<void>

  #### Inherit Doc

  Inherited from Schema.assignPropertiesAsync

### createAllFieldInfos

- createAllFieldInfos(): FieldInfo[]

- Creates an array of FieldInfos that includes all fields within the Schema.

  #### Returns FieldInfo[]

  Inherited from Schema.createAllFieldInfos

### createPopupTemplate

- createPopupTemplate(): PopupTemplate

- Generates an esri PopupTemplate from the fields in this schema.

  #### Returns PopupTemplate

  Inherited from Schema.createPopupTemplate

### destroy

- destroy(): void

- Cleans up resources used by the schema.

  #### Returns void

  Overrides Schema.destroy

### findFieldByName

- findFieldByName(name): Field

- Finds a field by field name.

  #### Parameters

  - name: string

    The name of the field to search for.

  #### Returns Field

  The matching field, or `undefined` if there is no match.

  Inherited from Schema.findFieldByName

### finishAssignProperties

- finishAssignProperties(): Promise<void>

- #### Returns Promise<void>

  #### Inherit Doc

  Inherited from Schema.finishAssignProperties

### getDefault

- getDefault<K>(key): unknown

- #### Type Parameters

  - K extends never

  #### Parameters

  - key: K

  #### Returns unknown

  #### Inherit Doc

  Inherited from Schema.getDefault

### getDefaults

- getDefaults(): SchemaProperties

- #### Returns SchemaProperties

  #### Inherit Doc

  Inherited from Schema.getDefaults

### getSerializableProperties

- getSerializableProperties(serializeMode?): PropertyDefs<unknown>

- Returns the serializable properties.

  #### Parameters

  - serializeMode: SerializeMode = "all"

    Optional. If specified, only properties that support the given serialization mode will be returned.

  #### Returns PropertyDefs<unknown>

  Inherited from Schema.getSerializableProperties

### isModified

- isModified(): boolean

- Determines whether the settings have been locally modified in any way.

  #### Returns boolean

  Inherited from Schema.isModified

- isModified(setting): boolean

- Determines whether the specified setting has been locally modified, and is thus overriding any inherited value.

  #### Parameters

  - setting: keyof TableSchema

    The setting to check.

  #### Returns boolean

  Inherited from Schema.isModified

### reset

- reset(): void

- Removes all local overrides, resetting all settings to their inherited values, if any.

  #### Returns void

  Inherited from Schema.reset

- reset(setting): void

- Removes a local override for a setting and resets it to its inherited value, if any.

  #### Parameters

  - setting: keyof TableSchema

    The setting to reset.

  #### Returns void

  Inherited from Schema.reset

### toJSON

- toJSON(serializeMode?): SchemaProperties

- #### Parameters

  - serializeMode: SerializeMode = "all"

  #### Returns SchemaProperties

  #### Inherit Doc

  Inherited from Schema.toJSON

### `Static` createFieldInfoFromField

- createFieldInfoFromField(field): FieldInfo

- Generates a popup template field info object from an esri field.

  #### Parameters

  - field: Field

    The field to generate the field info object from.

  #### Returns FieldInfo

  Inherited from Schema.createFieldInfoFromField