This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > %SYS namespace > Config.NLS.SubTables

Config.NLS.SubTables

persistent class Config.NLS.SubTables extends %Library.Persistent, %XML.Adaptor, %SYSTEM.Help

SQL Table Name: Config_NLS.SubTables

The objects of this class contain the data points for tables of type XLT, COL, Case and the input side of Mode tables.
The name of a sub-table is a string with three pieces separated by "-": type-from-to

Warning!

Only sub-tables whose names have a "from" or "to" piece beginning with "y" (e.g. "XLT-yEBCDIC-Unicode" or "XLT-Latin1-yPrinter") or that end with a dot followed by 4 digits (e.g. "XLT-CP1250-Unicode.0001") are considered custom sub-tables and are preserved during system upgrades. All other sub-tables are restored to their original state and any changes to them made with methods from this class will be lost in an upgrade.

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property Description as %String (MAXLEN = 128);
Description of the SubTable.
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property FromTo as array of %String;
Each node of this array contains one mapping. Both the index and the value of the node can be either a single character code (e.g. "168") or a comma-separated list of codes (e.g. "251,128,65"). For collation tables, the value can contain a disambiguator (e.g. "65,65;1").
Property methods: FromToBuildValueArray(), FromToCollectionToDisplay(), FromToCollectionToOdbc(), FromToDisplayToCollection(), FromToDisplayToLogical(), FromToGet(), FromToGetObject(), FromToGetObjectId(), FromToGetStored(), FromToGetSwizzled(), FromToIsValid(), FromToLogicalToDisplay(), FromToLogicalToOdbc(), FromToNormalize(), FromToOdbcToCollection(), FromToSet(), FromToSetObject(), FromToSetObjectId()
property Name as %String (MAXLEN = 64, MINLEN = 1) [ Required ];
The name of a sub-table contains 3 parts separated by "-": type, source encoding and target encoding.

Examples: "XLT-Latin2-Unicode", "COL-Latin1-German2"
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIndexCheck(), NameIndexDelete(), NameIndexExists(), NameIndexOpen(), NameIndexSQLCheckUnique(), NameIndexSQLExists(), NameIndexSQLFindPKeyByConstraint(), NameIndexSQLFindRowIDByConstraint(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property Type as %Integer (MAXVAL = 6, MINVAL = 0) [ Required ];
Type of sub-table.
  • 0 - SUBSingle
  • 1 - SUBToMulti
  • 2 - SUBFromMulti
  • 3 - SUBMulti
  • 4 - SUBLeadByte
  • 5 - SUBToCol
  • 6 - SUBFromCol
Property methods: TypeDisplayToLogical(), TypeGet(), TypeGetStored(), TypeIsValid(), TypeLogicalToDisplay(), TypeNormalize(), TypeSet(), TypeXSDToLogical()

Methods (Including Private)

classmethod Create(Name, ByRef Properties As %String) as %Status
Creates a SubTable the NLS database.

Parameters:
  • Properties - Array of properties corresponding to the class properties
classmethod Delete(Name As %String) as %Status
Deletes a SubTable.

Parameters:
  • Name - Name of SubTable to delete
classmethod Exists(Name As %String, ByRef SubTable As %ObjectHandle, ByRef Status As %Status) as %Boolean
Checks for the existence of a SubTable in the NLS database.

Parameters:
  • Name - Name of the SubTable to check existence of
Return values:
If Value of the method = 0 (SubTable does not exist, or some error occured)
  • SubTable = Null
  • Status = SubTable "x" does not exist, or other error message
If Value of the method = 1 (SubTable exists)
  • SubTable = Object handle to SubTable
  • Status = $$$OK
classmethod Export(FileName As %String = "SubTablesExport.xml", ByRef NumExported As %Integer, SubTables As %String = "*") as %Status
Exports SubTable Objects to a file in xml format.

Parameters:
  • FileName - Output file name
  • NumExported (byref) - Returns number of SubTable records exported.
  • SubTables - Comma separated list of SubTables to export, "*" = All
classmethod ExportAllToNls(ByRef NumExported As %Integer) as %Status
Exports all SubTable records to ^%nls.

Parameters:
  • NumExported - Number of exported records
classmethod ExportDir(Dir As %String, ByRef NumExported As %Integer, SubTables As %String = "*") as %Status
Exports SubTable Objects to separate xml files.

Parameters:
  • Dir - Directory where the files will be created
  • NumExported (byref) - Returns number of SubTable records exported.
  • SubTables - Comma separated list of SubTables to export, "*" = All
  • classmethod ExportList(FileName As %String = "SubTablesExport.xml", ByRef NumExported As %Integer, ByRef SubTables As %String) as %Status
    Similar to Export() but uses a list of SubTables to export rather than a query. Used internally by Tables.ExportList() and other utilities.

    Parameters:
    • FileName - Output file name
    • NumExported - Number of exported SubTables [out]
    • SubTables - Array of SubTables to export
    classmethod ExportToNls(sub As %String) as %Status
    Exports ONE SubTable record to ^%nls.

    Parameters:
    • Name - SubTable name
    classmethod Get(Name As %String, ByRef Properties As %String) as %Status
    Gets a SubTable's properties from the NLS database.

    Parameters:
    • Name - Name of the SubTable to get
    • Properties - Array of properties. See the Create() method for a full list
    classmethod Import(FileName As %String = "SubTablesExport.xml", ByRef NumImported As %Integer, Flags As %Integer = 0) as %Status
    Imports SubTable records from an xml file.

    Parameters:
    • FileName - Filename to import SubTable records from
    • NumImported (byref) - Returns number of records imported
    • Flags - Control import
      • Bit 0 - Do not import records, just return count
    classmethod ImportAllFromNls(ByRef NumImported As %Integer, Flags As %Integer = 0, Ref As %String = "^%nls") as %Status
    Imports all SubTable records from ^%nls.

    Parameters:
    • NumImported (byref) - Returns number of records imported
    • Flags - Control import
      • Bit 0 - Do not import records, just return count
    • Ref - Source global reference
    classmethod ImportDir(Dir As %String, ByRef NumImported As %String, forcemulticompile As %Boolean = "") as %Status
    Imports subtable files from a directory.

    Parameters:
    • Dir - Directory to import NLS files from
    • NumImported (byref) - Returns number of subtables imported.
    classmethod ImportFromNls(Sub As %String, Ref As %String = "^%nls") as %Status
    Imports SubTable record from ^%nls.

    Parameters:
    • Name - SubTable name
    • Ref - Source global reference
    classmethod Modify(Name As %String, ByRef Properties As %String) as %Status
    Modifies an existing SubTable's properties in the NLS database.

    Parameters:
    • Name - Name of the SubTable to modify
    • Properties - Array of properties to modify.
    • If a specific property is not passed in the properties array, or is the same as the existing value, the value is not modified.

    Queries

    query List(Names As %String)
    Selects Name As %String, Description As %String

    Indexes

    index (NameIndex on Name) [IdKey, Type = key];
    Index methods: NameIndexCheck(), NameIndexDelete(), NameIndexExists(), NameIndexOpen(), NameIndexSQLCheckUnique(), NameIndexSQLExists(), NameIndexSQLFindPKeyByConstraint(), NameIndexSQLFindRowIDByConstraint()

    Inherited Members

    Inherited Methods (Including Private)

    Storage

    Storage Model: CacheStorage (Config.NLS.SubTables)

    ^|"^^"_$ZU(12)|SYS("NLS","SubTablesD")(ID,"FromTo",n)
    =
    FromTo(n)

    Storage Model: CacheStorage (Config.NLS.SubTables)

    ^|"^^"_$ZU(12)|SYS("NLS","SubTablesD")(ID)
    =
    %%CLASSNAME
    Description
    Type
    Subtype
    FeedbackOpens in a new window