Skip to main content

%SYS.DatabaseQuery

Class %SYS.DatabaseQuery Extends %SYSTEM.Help [ Abstract, System = 4 ]

Provides database queries from other namespaces than %SYS.

Parameters

DOMAIN

Parameter DOMAIN = "%Utility";

Default Localization Domain

Methods

GetDatabaseFreeSpace

ClassMethod GetDatabaseFreeSpace(Directory As %String, ByRef FreeSpace As %Float) As %Status

Calculate remaining free space in a database.

Parameters:
Directory - Physical directory of the database.
Freespace - (byref) Returned # of MB of freespace in the directory.

Note: This requires %Admin_Operate:USE permission

GetFreeSpace

ClassMethod GetFreeSpace(Directory As %String, ByRef FreeSpace As %Float, ByRef FreeBlocks As %Integer) As %Status

Calculate remaining free space in a database.

Parameters:
Directory - Physical directory of the database.
Freespace - (byref) Returned # of MB of freespace in the directory.
FreeBlocks - (byref) Returned # of blocks of freespace in the directory.

Note: This requires %Admin_Operate:USE permission

FreeSpaceExecute

ClassMethod FreeSpaceExecute(ByRef qHandle As %Binary, Mask As %String = "*") As %Status [ Internal ]

Provides a freespace list of all local databases mounted in this configuration.

Note that calculating the free space may take a while.
Parameters:
Mask="*" or $lb(directory1,directory2,...)
For the FreeSpace Report, You can also enter the following in order to select by database name:
"String,String1" - Any name matching one of these elements
"String*" - Any Name starting with "String"
"String,String1*,String2" - Any Name matching one of these elements, or starting with "String1"
Notes: Databases which are not mounted are not returned by this query.
This requires %Admin_Operate:USE permission

FreeSpaceFetch

ClassMethod FreeSpaceFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal ]

FreeSpaceClose

ClassMethod FreeSpaceClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = FreeSpaceExecute ]