%Library.GlobalEdit
persistent class %Library.GlobalEdit extends %Library.Persistent, %SYSTEM.Help
SQL Table Name: %Library.GlobalEdit
Property Inventory
- Collation
- DatabaseBlockSize
- Directory
- Exists
- FirstDataBlock
- GrowthBlock
- IsEmpty
- IsKeep
- Name
- Permission
- PointerBlock
- ResourceName
- System
Method Inventory
- CheckGlobalIntegrity()
- CheckIntegrity()
- CollationPrompt()
- CollationSet()
- Compact()
- CompactGlobal()
- CompareRange()
- Create()
- DeleteDirectoryEntry()
- FirstDataBlockGet()
- GetGlobalCountBySubscript()
- GetGlobalSize()
- GetGlobalSizeBySubscript()
- GrowthBlockPrompt()
- GrowthBlockSet()
- IsKeepPrompt()
- IsKeepSet()
- KillRange()
- NameSet()
- Open()
- PointerBlockPrompt()
- PointerBlockSet()
Parameters
parameter DEFAULTCONCURRENCY = 0;
Inherited description: DEFAULTCONCURRENCY is the default value for the concurrency formal argument
defined for %Open, %OpenId, %Delete and %DeleteId methods. It is not the default
value of the %Concurrency property of persistent classes. If the value of the actual
concurrency argument passed to any of the above methods is -1 then the formal argument value will
be set to the value of the DEFAULTCONCURRENCY parameter value defined for the class.
Properties
property Collation as %Library.Collate;
Collation of the global.
Property methods: CollationCollationListClose(), CollationCollationListExecute(), CollationCollationListFetch(), CollationDisplayToLogical(), CollationGet(), CollationGetLocalName(), CollationGetLocalNumber(), CollationGetSystemDefaultName(), CollationGetSystemDefaultNumber(), CollationIsValid(), CollationIsValidName(), CollationIsValidNumber(), CollationLogicalToDisplay(), CollationMakeArray(), CollationNormalize(), CollationSet(), CollationSetLocalName(), CollationSetLocalNumber()
property DatabaseBlockSize as %Integer (VALUELIST = ",2048,4096,8192,16384,32768,65536") [ InitialExpression = $$$8k , ReadOnly ];
Block size of the database the global is in.
Property methods: DatabaseBlockSizeDisplayToLogical(), DatabaseBlockSizeGet(), DatabaseBlockSizeIsValid(), DatabaseBlockSizeLogicalToDisplay(), DatabaseBlockSizeNormalize()
property Directory as %SysPath [ ReadOnly ];
Directory global is located in.
Property methods: DirectoryDisplayToLogical(), DirectoryGet(), DirectoryIsValid(), DirectoryLogicalToDisplay(), DirectoryLogicalToOdbc(), DirectoryNormalize()
property Exists as Security.Datatype.BooleanYN [ ReadOnly ];
Global directory entry exists.
Property methods: ExistsDisplayToLogical(), ExistsGet(), ExistsIsValid(), ExistsLogicalToDisplay(), ExistsLogicalToOdbc(), ExistsNormalize()
property FirstDataBlock as %Integer [ Calculated ];
First data block of the global.
Note referencing this property causes a $D(global) and I/O to occur.
Note referencing this property causes a $D(global) and I/O to occur.
Property methods: FirstDataBlockDisplayToLogical(), FirstDataBlockIsValid(), FirstDataBlockLogicalToDisplay(), FirstDataBlockNormalize()
property GrowthBlock as %Integer;
Growth block for the global.
Property methods: GrowthBlockDisplayToLogical(), GrowthBlockGet(), GrowthBlockIsValid(), GrowthBlockLogicalToDisplay(), GrowthBlockNormalize()
property IsEmpty as Security.Datatype.BooleanYN [ ReadOnly ];
Global contains no data.
Property methods: IsEmptyDisplayToLogical(), IsEmptyGet(), IsEmptyIsValid(), IsEmptyLogicalToDisplay(), IsEmptyLogicalToOdbc(), IsEmptyNormalize()
property IsKeep as Security.Datatype.BooleanYN;
Keep global directory attributes when deleted.
Property methods: IsKeepDisplayToLogical(), IsKeepGet(), IsKeepIsValid(), IsKeepLogicalToDisplay(), IsKeepLogicalToOdbc(), IsKeepNormalize()
property Name as %String;
Name of the global.
Property methods: NameDisplayToLogical(), NameGet(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize()
property Permission as Security.Datatype.Permission [ ReadOnly ];
Current permission on the global.
This is the "RW" value that the process who has this
instance open has access to it.
Property methods: PermissionDisplayToLogical(), PermissionExternalToInternal(), PermissionGet(), PermissionInternalToExternal(), PermissionIsValid(), PermissionLogicalToDisplay(), PermissionLogicalToOdbc(), PermissionNormalize()
property PointerBlock as %Integer;
Top pointer block of the global.
Property methods: PointerBlockDisplayToLogical(), PointerBlockGet(), PointerBlockIsValid(), PointerBlockLogicalToDisplay(), PointerBlockNormalize()
property ResourceName as %String [ ReadOnly ];
Resource name of the global.
Property methods: ResourceNameDisplayToLogical(), ResourceNameGet(), ResourceNameIsValid(), ResourceNameLogicalToDisplay(), ResourceNameLogicalToOdbc(), ResourceNameNormalize()
property System as %String [ ReadOnly ];
System name where global resides.
Property methods: SystemDisplayToLogical(), SystemGet(), SystemIsValid(), SystemLogicalToDisplay(), SystemLogicalToOdbc(), SystemNormalize()
Methods
classmethod CheckGlobalIntegrity(Directory As %String = "", Name As %String, StopAfterAnyError As %Boolean) as %Status
This checks the integrity of a single global. The return value contains information about the global
This checks the integrity of a global. The return value contains information about the global
classmethod CollationPrompt(Prompt, Obj)
method Compact(PercentFull As %Integer = 90, ByRef MbProcessed As %Float, ByRef MbCompressed As %Float, MbToCompress As %Integer = 0, ByRef LastGlobalReference As %String = "") as %Status
Compact a global.
PercentFull - How full each data page should be, 50-100
MbProcessed - How many MB of the global was processed
MbCompressed - How many MB was it compressed to
MbToCompress - How many MB of the global to compress in this call (0=ALL)
LastGlobalReference - Last reference, "" = completed
Typical useage is as follows, which compacts the data pages to 80%full, and returns the amount of data processed, and the size it was compacted to:
s x=##Class(%GlobalEdit).Open("X",dbdirectory)
s t=x.Compact(80,.CurrSize,.NewSize)
Note that this function can be called repeatedly for the same global so that it can be done in chunks by using the last two parameters. The following example does 10MB chunks of the global at a time and accumulates and displays a status:
s x=##Class(%GlobalEdit).Open("X",dbdirectory)
s TotalCurrSize=0,TotalNewSize=0
do {
s t=x.Compact(80,.CurrSize,.NewSize,10,.LastReference)
s TotalCurrSize=TotalCurrSize+CurrSize
s TotalNewSize=TotalNewSize+NewSize
w !,"Global "_x.Name_" processed="_TotalCurrSize_", compacted to="_TotalNewSize
} while LastReference'=""
PercentFull - How full each data page should be, 50-100
MbProcessed - How many MB of the global was processed
MbCompressed - How many MB was it compressed to
MbToCompress - How many MB of the global to compress in this call (0=ALL)
LastGlobalReference - Last reference, "" = completed
Typical useage is as follows, which compacts the data pages to 80%full, and returns the amount of data processed, and the size it was compacted to:
s x=##Class(%GlobalEdit).Open("X",dbdirectory)
s t=x.Compact(80,.CurrSize,.NewSize)
Note that this function can be called repeatedly for the same global so that it can be done in chunks by using the last two parameters. The following example does 10MB chunks of the global at a time and accumulates and displays a status:
s x=##Class(%GlobalEdit).Open("X",dbdirectory)
s TotalCurrSize=0,TotalNewSize=0
do {
s t=x.Compact(80,.CurrSize,.NewSize,10,.LastReference)
s TotalCurrSize=TotalCurrSize+CurrSize
s TotalNewSize=TotalNewSize+NewSize
w !,"Global "_x.Name_" processed="_TotalCurrSize_", compacted to="_TotalNewSize
} while LastReference'=""
classmethod CompactGlobal(Name As %String, Directory As %String = {$zu(12, "")}, PercentFull As %Integer = 90, ByRef MbProcessed As %Integer, ByRef MbCompressed As %Integer, MbToCompress As %Integer = 0, ByRef LastGlobalReference As %String = "") as %Status
Compact a global.
See the method Compact for details on parameters.
See the method Compact for details on parameters.
classmethod CompareRange(SrcDirectory As %String, DstDirectory As %String, StartingNode As %String, EndingNode As %String, MaxDifferences As %Integer = 0, MaxMBToCompare As %Integer = 0, Flags As %Integer = 7, ByRef Differences As %String) as %Status
SrcDirectory - Directory where the source nodes are located
DstDirectory - Directory where the destination nodes are located
StartingNode - Node where the compare is started - X(100)
EndingNode - Node where the compare finishes - X(500)
MaxDifferences - Maximum number of differences to return. The compare returns if this number of differences is exceeded. Default = 0, return all differences. If the limit is exceeded, the error $$$ERROR($$$MaxDifferencesReached) is returned. The caller may then call this function again using the returned Last node processed as the StartingNode to get the next set of differences.
MaxMBToCompare - Maximum amount of MB of SrcDirectory to process. The compare returns if we reach the maximum MB compared. Default = 0, compare all the nodes in the range. If this limit is exceeded, the error $$$ERROR($$$MaxMBToCompare) is returned. The caller may then call this function again using the returned Last node processed as the StartingNode to get the next set of differences.
Flags - Bit string of compare options.
Bit 0 - Return Data values
Bit 1 - Format Node names using %Library.Utility:FormatReference()
Bit 2 - Format Data values using %Library.Utility:FormatString()
Return Values:
Differences - Array of differences
Differences - Number of differences
Differences(0) - $lb(LastNodeProcessed,BlocksChecked,NodesChecked,MBChecked,BlockSize)
LastNodeProcessed - Last node processed in the compare. May be used as the StartingNode if the method is called again.
BlocksChecked - Number of Blocks in the SrcDirectory processed
NodesChecked - Number of Nodes in the SrcDirectory processed
NumMB - Number of MB in the SrcDirectory processed
BlockSize - Blocksize of the SrcDirectory
Differences(1..x,1) - Global name. Always returned, may be formatted if specified in the Flags parameter
Differences(1..x,2) - Reason for difference
1 - Value Different
2 - Node in source but not destination
3 - Node in destination but not source
Differences(1..x,3) - Source data value or "" if source does not exist. Only returned if specified in the Flags parameter. May be formatted if specified in the Flags parameter
Differences(1..x,4) - Destination data value or "" if source does not exist. Only returned if specified in the Flags parameter. May be formatted if specified in the Flags parameter
DstDirectory - Directory where the destination nodes are located
StartingNode - Node where the compare is started - X(100)
EndingNode - Node where the compare finishes - X(500)
MaxDifferences - Maximum number of differences to return. The compare returns if this number of differences is exceeded. Default = 0, return all differences. If the limit is exceeded, the error $$$ERROR($$$MaxDifferencesReached) is returned. The caller may then call this function again using the returned Last node processed as the StartingNode to get the next set of differences.
MaxMBToCompare - Maximum amount of MB of SrcDirectory to process. The compare returns if we reach the maximum MB compared. Default = 0, compare all the nodes in the range. If this limit is exceeded, the error $$$ERROR($$$MaxMBToCompare) is returned. The caller may then call this function again using the returned Last node processed as the StartingNode to get the next set of differences.
Flags - Bit string of compare options.
Bit 0 - Return Data values
Bit 1 - Format Node names using %Library.Utility:FormatReference()
Bit 2 - Format Data values using %Library.Utility:FormatString()
Return Values:
Differences - Array of differences
Differences - Number of differences
Differences(0) - $lb(LastNodeProcessed,BlocksChecked,NodesChecked,MBChecked,BlockSize)
LastNodeProcessed - Last node processed in the compare. May be used as the StartingNode if the method is called again.
BlocksChecked - Number of Blocks in the SrcDirectory processed
NodesChecked - Number of Nodes in the SrcDirectory processed
NumMB - Number of MB in the SrcDirectory processed
BlockSize - Blocksize of the SrcDirectory
Differences(1..x,1) - Global name. Always returned, may be formatted if specified in the Flags parameter
Differences(1..x,2) - Reason for difference
1 - Value Different
2 - Node in source but not destination
3 - Node in destination but not source
Differences(1..x,3) - Source data value or "" if source does not exist. Only returned if specified in the Flags parameter. May be formatted if specified in the Flags parameter
Differences(1..x,4) - Destination data value or "" if source does not exist. Only returned if specified in the Flags parameter. May be formatted if specified in the Flags parameter
classmethod Create(Namespace As %String = "", Name As %String, Collation As %String, GrowthBlock As %Integer, PointerBlock As %Integer, Keep As %Boolean, JournalState As %Integer, ByRef Exists As %Boolean) as %Status
Create a global with specified characteristics. Parameter Namespace can be a namespace or a directory. If it is a namespace global mapping rules will apply.
classmethod DeleteDirectoryEntry(Directory, Global) as %Status
Delete a directory entry for a global if the global does not exist.
This should be called with Switch 10 set if the global is possibly being accessed by users.
Parameters:
Directory - Directory where the global lives.
Global - Name of the global to delete the directory entry for.
Note: You must have write access to the database to delete the directory entry.
This should be called with Switch 10 set if the global is possibly being accessed by users.
Parameters:
Directory - Directory where the global lives.
Global - Name of the global to delete the directory entry for.
Note: You must have write access to the database to delete the directory entry.
method FirstDataBlockGet() as %Integer
classmethod GetGlobalCountBySubscript(Directory As %String, StartingNode As %String, EndingNode As %String = "", ByRef Size As %String = 0)
Return the number of global nodes in the range, and journal sizing information.
This method will return the number of global nodes in the range, and the sizes of data within that range. It will also return information about the amount of journal space which would be used if the range were merged into a different database, or moved via a DataMove operation.
Parameters:
Directory - Directory where global is located.
StartNode - Starting node of global. Note that you can specify ^GLOBAL(BEGIN) to mean the start of the global. This would include ^GLOBAL itself. You can also specify ^GLOBAL("XXX"_$c(1)_"*next)" to mean start counting after global ^GLOBAL("XXX").
EndNode - End Node of global. The returned sizes do not include the EndNode. Note that you can specify ^GLOBAL(END) to mean through the end of the global. An EndNode value of null, or equal to the value of StartNode will return the size of StartNode and all children of StartNode.
Return Values:
The method will return a %Status value of success, or an error.
The array Size returns data and estimated journal sizes in both blocks and MB for the specified global range.
If the global does not exist the sizes will all be set to 0. If any error occurs, sizes will not be set.
Size=Number of data nodes
Size("DataSize","Bytes")=Size of global data in bytes
Size("DataSize","MB")=Size of global data in MB
Size("KeySize","Bytes")=Size of global keys in bytes
Size("KeySize","MB")=Size of global keys in MB
Size("TotalNodeSize","Bytes")=Total size of all global data in bytes (Datasize + KeySize)
Size("TotalNodeSize","MB")=Total size of all global data in MB (Datasize + KeySize)
Size("JournalOverHead","Bytes")=Estimate of size of journal overhead in bytes
Size("JournalOverHead","MB")=Estimate of size of journal overhead in MB
Size("TotalJournalSize","Bytes")=Estimate of total journal size in bytes
Size("TotalJournalSize","MB")=Estimate of total journal size in MB
Examples:
Find the counts of global ^DATA
s Status=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\iris\mgr\user\","DATA","",.Size)
Find the counts of global ^DATA("Jones")
s x=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\iris\mgr\user\","DATA(""Jones"")","",.Size)
Find the count of nodes between nodes ^DATA("Jones") up to but not including ^DATA("Smith","zzzzz")
s x=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\iris\mgr\user\","DATA(""Jones"")","DATA(""Smith"",""zzzzz"")",.Size)
Find the count of all the nodes after after node ^X(500)
s x=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\db1\","^X(500"_$c(1)_"*next)","^X(END)",.Size)
Find the count of all the nodes from the beginning of the global up to but not including ^X(500)
s x=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\db1\","^X(BEGIN)","^X(500)",.Size)
This method will return the number of global nodes in the range, and the sizes of data within that range. It will also return information about the amount of journal space which would be used if the range were merged into a different database, or moved via a DataMove operation.
Parameters:
Directory - Directory where global is located.
StartNode - Starting node of global. Note that you can specify ^GLOBAL(BEGIN) to mean the start of the global. This would include ^GLOBAL itself. You can also specify ^GLOBAL("XXX"_$c(1)_"*next)" to mean start counting after global ^GLOBAL("XXX").
EndNode - End Node of global. The returned sizes do not include the EndNode. Note that you can specify ^GLOBAL(END) to mean through the end of the global. An EndNode value of null, or equal to the value of StartNode will return the size of StartNode and all children of StartNode.
Return Values:
The method will return a %Status value of success, or an error.
The array Size returns data and estimated journal sizes in both blocks and MB for the specified global range.
If the global does not exist the sizes will all be set to 0. If any error occurs, sizes will not be set.
Size=Number of data nodes
Size("DataSize","Bytes")=Size of global data in bytes
Size("DataSize","MB")=Size of global data in MB
Size("KeySize","Bytes")=Size of global keys in bytes
Size("KeySize","MB")=Size of global keys in MB
Size("TotalNodeSize","Bytes")=Total size of all global data in bytes (Datasize + KeySize)
Size("TotalNodeSize","MB")=Total size of all global data in MB (Datasize + KeySize)
Size("JournalOverHead","Bytes")=Estimate of size of journal overhead in bytes
Size("JournalOverHead","MB")=Estimate of size of journal overhead in MB
Size("TotalJournalSize","Bytes")=Estimate of total journal size in bytes
Size("TotalJournalSize","MB")=Estimate of total journal size in MB
Examples:
Find the counts of global ^DATA
s Status=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\iris\mgr\user\","DATA","",.Size)
Find the counts of global ^DATA("Jones")
s x=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\iris\mgr\user\","DATA(""Jones"")","",.Size)
Find the count of nodes between nodes ^DATA("Jones") up to but not including ^DATA("Smith","zzzzz")
s x=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\iris\mgr\user\","DATA(""Jones"")","DATA(""Smith"",""zzzzz"")",.Size)
Find the count of all the nodes after after node ^X(500)
s x=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\db1\","^X(500"_$c(1)_"*next)","^X(END)",.Size)
Find the count of all the nodes from the beginning of the global up to but not including ^X(500)
s x=##Class(%GlobalEdit).GetGlobalCountBySubscript("c:\db1\","^X(BEGIN)","^X(500)",.Size)
classmethod GetGlobalSize(Directory As %String, GlobalName As %String, ByRef Allocated As %Integer, ByRef Used As %Integer, fast As %Boolean = 0) as %Status
Get size of this global
'Allocated' - total size, in MB, of blocks allocated for the global.
'Used' - total used data, in MB, for the global.
'fast' - TRUE : faster return, it won't return the value of 'Used'.
FALSE - slower return,, it returns values for both 'Allocated' and 'Used'.
'Allocated' - total size, in MB, of blocks allocated for the global.
'Used' - total used data, in MB, for the global.
'fast' - TRUE : faster return, it won't return the value of 'Used'.
FALSE - slower return,, it returns values for both 'Allocated' and 'Used'.
classmethod GetGlobalSizeBySubscript(Directory As %String, StartingNode As %String, EndingNode As %String = "", ByRef Size As %String = 0)
Return the size of a global or range of nodes in a global.
This method will return the size of a global based on the number of database blocks the global resides in.
Parameters:
Directory - Directory where global is located.
StartNode - Staring node of global. Note that you can specify ^GLOBAL(BEGIN) to mean the start of the global. This would include ^GLOBAL itself. You can also specify ^GLOBAL("XXX"_$c(1)_"*next)" to mean start counting after global ^GLOBAL("XXX").
EndNode - End Node of global. The returned sizes do not include the EndNode. Note that you can specify ^GLOBAL(END) to mean through the end of the global. An EndNode value of null, or equal to the value of StartNode will return the size of StartNode and all children of StartNode.
Size - Maximum number of MB to count. If the size of the global exceeds this value, calculation stops, and an error is returned. If undefined or set to 0, then the entire range is counted. Be careful to reset this for multiple calls to the method.
Return Values:
The method will return a %Status value of success, or an error.
The array Size returns the amount of data in both blocks and MB, for each level of the global, as well as the size of big string data, and a total. If the global does not exist the sizes will all be set to 0. If any error occurs, sizes will not be set.
Size=Total size in MB of the global range
Size("Blocks","1")=# Blocks in level 1
Size("Blocks","2")=# Blocks in level 2
Size("Blocks","3")=# Blocks in level 3
Size("Blocks","BigStrings")=# Big String Blocks
Size("Blocks","Total")=Total # Blocks in global range
Size("MB","1")=# MB in level 1
Size("MB","2")=# MB in level 2
Size("MB","3")=# MB in level 3
Size("MB","BigStrings")=# Big String MB
Size("MB","Total")=Total # MB in global range
Examples:
Find the size of global ^DATA
s Status=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\132u1\mgr\user\","DATA","",.Size)
Find the size of data ^DATA("Jones")
s x=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\132u1\mgr\user\","DATA(""Jones"")","",.Size)
Find the size of data between nodes ^DATA("Jones") up to but not including ^DATA("Smith","zzzzz")
s x=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\132u1\mgr\user\","DATA(""Jones"")","DATA(""Smith"",""zzzzz"")",.Size)
Find the size of all the data after after node ^X(500)
s x=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\db1\","^X(500"_$c(1)_"*next)","^X(END)",.Size)
Find the size of all the data from the beginning of the global up to but not including ^X(500)
s x=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\db1\","^X(BEGIN)","^X(500)",.Size)
This method will return the size of a global based on the number of database blocks the global resides in.
Parameters:
Directory - Directory where global is located.
StartNode - Staring node of global. Note that you can specify ^GLOBAL(BEGIN) to mean the start of the global. This would include ^GLOBAL itself. You can also specify ^GLOBAL("XXX"_$c(1)_"*next)" to mean start counting after global ^GLOBAL("XXX").
EndNode - End Node of global. The returned sizes do not include the EndNode. Note that you can specify ^GLOBAL(END) to mean through the end of the global. An EndNode value of null, or equal to the value of StartNode will return the size of StartNode and all children of StartNode.
Size - Maximum number of MB to count. If the size of the global exceeds this value, calculation stops, and an error is returned. If undefined or set to 0, then the entire range is counted. Be careful to reset this for multiple calls to the method.
Return Values:
The method will return a %Status value of success, or an error.
The array Size returns the amount of data in both blocks and MB, for each level of the global, as well as the size of big string data, and a total. If the global does not exist the sizes will all be set to 0. If any error occurs, sizes will not be set.
Size=Total size in MB of the global range
Size("Blocks","1")=# Blocks in level 1
Size("Blocks","2")=# Blocks in level 2
Size("Blocks","3")=# Blocks in level 3
Size("Blocks","BigStrings")=# Big String Blocks
Size("Blocks","Total")=Total # Blocks in global range
Size("MB","1")=# MB in level 1
Size("MB","2")=# MB in level 2
Size("MB","3")=# MB in level 3
Size("MB","BigStrings")=# Big String MB
Size("MB","Total")=Total # MB in global range
Examples:
Find the size of global ^DATA
s Status=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\132u1\mgr\user\","DATA","",.Size)
Find the size of data ^DATA("Jones")
s x=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\132u1\mgr\user\","DATA(""Jones"")","",.Size)
Find the size of data between nodes ^DATA("Jones") up to but not including ^DATA("Smith","zzzzz")
s x=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\132u1\mgr\user\","DATA(""Jones"")","DATA(""Smith"",""zzzzz"")",.Size)
Find the size of all the data after after node ^X(500)
s x=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\db1\","^X(500"_$c(1)_"*next)","^X(END)",.Size)
Find the size of all the data from the beginning of the global up to but not including ^X(500)
s x=##Class(%GlobalEdit).GetGlobalSizeBySubscript("c:\db1\","^X(BEGIN)","^X(500)",.Size)
classmethod GrowthBlockPrompt(Prompt, Obj)
classmethod IsKeepPrompt(Prompt, Obj)
classmethod KillRange(Directory As %String, StartingNode As %String, EndingNode As %String) as %Status
Kill a subscripted range of a single global in a single database.
This method will kill a range of globals node of a single global in a single database. The starting and ending global name must be the same. When a range is specified, the global is killed from the starting node up to but not including the ending node. The exception to this is if the starting and ending node is the same then that global is killed. The start and end nodes must not contain namespace specifications. Process private globals are not supported. Note that this method ignores all namespace specifications.
Parameters:
Directory - Location of global to kill.
StartingNode - First node of global range to kill. Note that you can specify ^GLOBAL(BEGIN) to mean the start of the global. This includes the global ^GLOBAL itself You can also specify ^GLOBAL("XXX"_$c(1)_"*next)" to mean start deleting after global ^GLOBAL("XXX").
EndingNode - Ending node of global range to kill, up to, but not including this node. Note that you can specify ^GLOBAL(END) to mean through the end of the global.
Return Values:
The method will return a %Status value of success, or an error.
Examples:
Kill nodes between ^X(1,5) and ^X(1,50), not including ^X(1,50)
s Status=##Class(%GlobalEdit).KillRange("c:\db1\","^X(1,5),"^X(1,50)")
Kill node ^X(500) and all subnodes
s Status=##Class(%GlobalEdit).KillRange("c:\db1\","^X(500),"^X(500)")
Kill everything after node ^X(500)
s Status=##Class(%GlobalEdit).KillRange("c:\db1\","^X(500"_$c(1)_"*next)","^X(END)")
Kill everything from the beginning of the node up to but not including ^X(500)
s Status=##Class(%GlobalEdit).KillRange("c:\db1\","^X(BEGIN)","^X(500)")
This method will kill a range of globals node of a single global in a single database. The starting and ending global name must be the same. When a range is specified, the global is killed from the starting node up to but not including the ending node. The exception to this is if the starting and ending node is the same then that global is killed. The start and end nodes must not contain namespace specifications. Process private globals are not supported. Note that this method ignores all namespace specifications.
Parameters:
Directory - Location of global to kill.
StartingNode - First node of global range to kill. Note that you can specify ^GLOBAL(BEGIN) to mean the start of the global. This includes the global ^GLOBAL itself You can also specify ^GLOBAL("XXX"_$c(1)_"*next)" to mean start deleting after global ^GLOBAL("XXX").
EndingNode - Ending node of global range to kill, up to, but not including this node. Note that you can specify ^GLOBAL(END) to mean through the end of the global.
Return Values:
The method will return a %Status value of success, or an error.
Examples:
Kill nodes between ^X(1,5) and ^X(1,50), not including ^X(1,50)
s Status=##Class(%GlobalEdit).KillRange("c:\db1\","^X(1,5),"^X(1,50)")
Kill node ^X(500) and all subnodes
s Status=##Class(%GlobalEdit).KillRange("c:\db1\","^X(500),"^X(500)")
Kill everything after node ^X(500)
s Status=##Class(%GlobalEdit).KillRange("c:\db1\","^X(500"_$c(1)_"*next)","^X(END)")
Kill everything from the beginning of the node up to but not including ^X(500)
s Status=##Class(%GlobalEdit).KillRange("c:\db1\","^X(BEGIN)","^X(500)")
Set the Global name.
If prefaced by a "^" strip it off
If prefaced by a "^" strip it off
classmethod Open(Name As %String, Directory As %String = {$zu(12, "")}, System As %String = "", concurrency As %Integer = -1, ByRef sc As %Status = $$$OK) as %ObjectHandle
Open an instance of a global.
classmethod PointerBlockPrompt(Prompt, Obj)
Indexes
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %AddToSyncSet()
- %BuildDeferredIndices()
- %BuildIndices()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %ComposeOid()
- %ConstructClone()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
- Help()