Namespace: Consultingwerk.Util
Class 
DatabaseHelper Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:DatabaseHelper
Purpose:Provides helper routines working with the database
Syntax:Static methods only, private constructor to disallow
instance creation
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Tue Jan 18 20:36:21 CET 2011



Top Method Summary
Options Name Purpose
+ INTEGER DatabaseNumber (character) Returns the sequence number of a database the ABL session is connected to. This sequence number can be used for functions like LDBNAME or the return-value of the GetRecordsReads() method in this class
+ RECID GetDictDbRecid () Returns the RECID of the _DB record
+ INT64 GetRecordReads () Returns an int64 array containing the _ActSummary._Summary-RecReads for every connected database
+ INT64 GetRecordReads (int64[]) Returns an int64 array containing the _ActSummary._Summary-RecReads for every connected database substracted by the values in a start array.
+ CHARACTER UnabbreviatedFieldName (character, character) Returns the unabbreviated field name based on an abbreviated field name
+ CHARACTER UnabbreviatedTableName (character) Returns the unabbreviated table name based on an abbreviated table name
+ CHARACTER UnabbreviatedTableName (character, character) Returns the unabbreviated table name based on an abbreviated table name

Top Constructor Summary
Options Name Purpose
# DatabaseHelper () Constructor for the DatabaseHelper class


Method Detail
Top

PUBLIC INTEGER DatabaseNumber (character)

Purpose: Returns the sequence number of a database the ABL session is connected
to. This sequence number can be used for functions like LDBNAME or
the return-value of the GetRecordsReads() method in this class
Notes:

Parameters:
pcDatabaseName CHARACTER
The logical database name to return the connect sequence number for
Returns INTEGER
The sequence number of a database the ABL session is connected to or ? when the DB is not connected
Top

PUBLIC RECID GetDictDbRecid ()

Purpose: Returns the RECID of the _DB record
Notes: Required for invoking some of the data dictionary, data admin API's

Returns RECID
The RECID of the DICTDB _DB record
Top

PUBLIC INT64 GetRecordReads ()

Purpose: Returns an int64 array containing the _ActSummary._Summary-RecReads
for every connected database
Notes:

Returns INT64
The INT64[] containing the _ActSummary._Summary-RecReads per connected DB
Top

PUBLIC INT64 GetRecordReads (int64[])

Purpose: Returns an int64 array containing the _ActSummary._Summary-RecReads
for every connected database substracted by the values in a start
array.
Notes: This function is useful for computing the actual number of records
read since the GetRecordsReads() (no parameter) methods was called

Parameters:
iStart INT64
An INT64[] containing the start offset for the records read
Returns INT64
The INT64[] containing the _ActSummary._Summary-RecReads per connected DB since the offset was taken
Top

PUBLIC CHARACTER UnabbreviatedFieldName (character, character)

Purpose: Returns the unabbreviated field name based on an abbreviated field
name
Notes:

Parameters:
pcTableName CHARACTER
The table name (possibly abbreviated)
pcFieldName CHARACTER
The field name (possibly abbreviated)
Returns CHARACTER
The unabbreviated field name
Top

PUBLIC CHARACTER UnabbreviatedTableName (character)

Purpose: Returns the unabbreviated table name based on an abbreviated table
name
Notes:

Parameters:
pcTableName CHARACTER
The abbreviated table name, optionally with DB prefix
Returns CHARACTER
The unabbreviated buffer name (including database name)
Top

PUBLIC CHARACTER UnabbreviatedTableName (character, character)

Purpose: Returns the unabbreviated table name based on an abbreviated table
name
Notes:

Parameters:
pcDatabaseName CHARACTER
The database name
pcTableName CHARACTER
The abbreviated table name
Returns CHARACTER
The unabbreviated buffer name (including database name)


Constructor Detail
Top

PROTECTED DatabaseHelper ()

Purpose: Constructor for the DatabaseHelper class
Notes: Disallow instance creation



©2006-2016 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       26.08.2016 08:46:18