API Reference > ecschema-Metadata > Metadata > SchemaKey SchemaKey Class Beta The SchemaKey contains a Schemas name and version. Methods Name Description constructor(name: string, version: ECVersion): SchemaKey constructor(name: string, readVersion?: number, writeVersion?: number, minorVersion?: number): SchemaKey compareByName(rhs: undefined | string | SchemaKey): boolean compareByVersion(rhs: SchemaKey): number Compares two schema versions. matches(rhs: SchemaKey, matchType: SchemaMatchType = SchemaMatchType.Identical): boolean toJSON(): SchemaKeyProps Save this SchemaKey's properties to an object for serializing to JSON. toString(padZeroes: boolean = true): string Creates a string, in the format 'RR.ww.mm', representing this SchemaKey. fromJSON(props: SchemaKeyProps): SchemaKey Static Deserializes a SchemaKeyProps JSON object into a SchemaKey object. parseString(fullName: string): SchemaKey Static Properties Name Type Description _version Protected ECVersion minorVersion Accessor ReadOnly number name Accessor ReadOnly string readVersion Accessor ReadOnly number version Accessor ReadOnly ECVersion writeVersion Accessor ReadOnly number Defined in core/ecschema-metadata/src/SchemaKey.ts Line 96 Last Updated: 12 June, 2024