Chapter 6 Wrapped Class Reference
Documentation for the following classes appear in this section:
Note that the class inheritance tree diagram for the Database (DB) wrapped classes is relatively flat, meaning that these classes share very few inheritance relationships, thus no inheritance diagram is provided here.
Section 6.1.3, "Attribute Manager - Abstract" page 118
Adds an attribute attrName of type attrType to the class className. In a relational database this is equivalent to adding a field to a table. Returns TRUE if the attribute is added to the class, otherwise FALSE.on Commit
Sends a commit transaction message to the database which saves all changes made to the database since the last commit and automatically begins a new transaction. Commit must be called before a DBdatabase instance is destroyed if changes are to be saved. Only applies to those database systems that support transactions.on CreateAppObj: string className, list arguments return handle
This method returns a handle to an application object of type className constructed on the heap. The method is used to create instances of classes retrieved from the database. For example, it can retrieve a row from a database table or the results from a query. The number and type of the values in arguments determines which constructors are used. If there are no arguments, the default constructor is used.on CreateClass: string className, list attributes return boolean
Causes the creation of a new class called className in the schema database. The list attributes contains a list of lists. Each of these sublists is made up of two strings. The first item specifies the attribute name and the second item specifies the attribute type. Returns TRUE if the class is created, FALSE if creation fails.on CreateObj: string className, list attributes, list data return handle
Creates an instance of the class className in the database and returns a handle to the newly created database object. The returned handle will be a handle to an object of class DBobject. The list attributes contains a list of attribute names for which initial data values will be specified and the data contains the corresponding data values in the order specified in the list of attribute names.on CreateSubClass: string className, list superClasses, list attributes return boolean
Similar to CreateClass, but allows the specification of a list of superclasses, which contains the list of class names from which the newly created class should inherit. The list may contain no class names. The list of attributes contains additional attribute names for which data values will be entered. Returns true upon successful creation of the subclass classname, and false otherwise.on DeleteClass: string className return boolean
Removes the definition of the class named className from the database schema. Returns TRUE if successful, otherwise FALSE. Also necessarily removes all objects of this class.on Execute: handle hQuery return handle
Executes the query specified by hQuery, a handle to an object of type DBquery. The query specification is pre-processed appropriately for the component database type before the query is executed. A handle to a DBcursor object is retuned from which the results may be retrieved.on ExecuteStr: string query return handle
The string query is send directly to the database for execution. No pre-processing of the query is carried out. A handle to a DBcursor object is returned.on GetAllClasses: return list
returns a list of the names of all the classes/tables in the component databaseon GetBaseClasses: return list
Returns a list of the names of all the base classes (classes that have no superclasses) that are defined in the database schema.on GetPersistentRoot: string rootName return handle
Returns a handle to the database object pointed to by the persistent root named rootName, or NULL if the root does not exist in the database. The handle is to an object of class DBobject.on GetPersistenRoots: return list
Returns a list of the names of all the persistent roots defined in the database. The list will be empty if no roots are defined or if the database does not support the notion of persistent roots.on Login: string userName, string password return boolean
Enables the user to specify a username and password when connecting to the database. This method is usually called before a connection to the database is opened. However, it may be called before and/or after Open. It can also be called later to change the username under which database operations are carried out. Returns TRUE if the username and password are accepted successfully and false otherwise.on Open: string databaseName, string server, string location, string type return boolean
Opens a connection to the component database named databaseName that is located on the machine specified in the string server and can be located by means of the string location. If the string containing server is an empty string then the database is presumed to reside on the local machine. Similarly, location is an empty string when it is not required to specify the component database. The string type specifies which type of database is being used. Currently, the supported types for UNIX are ODBC, O2, PG95, UniSQL, and MSQL. The supported types for Windows NT include Oracle, dBase, Foxpro and MS Access. A description of each type available is located after the class interface descriptions. The method returns TRUE if a connection is established and FALSE if the connection fails.on Store: handle hObject return boolean
Stores an ADL object instance, referenced by the handle hObject, in the database so that it can be retrieved later. The class information for the object to be stored is stored first only if this is the first instance of that class to be stored in the open database. Returns TRUE if the object is stored successfully.on StoreAs: handle hObject, string objName return boolean
Similar to Store, but stores the object specified by the handle hObject along with a persistent name objName. This persistent name, objName can be used as an identifier during retrieval.on StoreClassOnly: handle hObject return boolean
Stores only the ADL class definition for the object retrieved by the handle hObject. It doesn't store individual instance information. Returns TRUE if the class definition is stored successfully.on RefreshStructure
Reread the database schema definition from the database. This is only necessary if updates are made outside of the multidatabase environment. Changes made within the environment are automatically reflected in the schema.on Retrieve: handle hObject, list theList return handle
Retrieves an ADL object instance from the database which is referenced by the database handle hObject. The list is used to hold special constructor arguments, such as handle to a parent widget when a widget object is being retrieved. Returns a handle to the retrieved object.on RetrieveByName: string className, string objName, list theList return handle
Retrieves an ADL object instance from the database which is of class className and identified by the persistent name objName. If the object cannot be found in the database a NULL handle is returned.on RetrieveClassOnly: string className, handle parentClass return handle
Retrieves the definition of the application class className from the database and loads it into the environment so that instances of that class can be created. The class is created as a nested class of parentClass. A handle to the class is returned. This handle will be NULL if the class is not successfully created.
A list of attributes defined for the class is returned. The list is composed of two sublists. The first sublist is a list of attribute names. The second is a list of the data types of these attributes.on GetMethods: return list
Returns a list of all the methods defined for the class. The returned list contains a sublist for each method. This sublist itself contains three elements. The first element is the name of the method. The second is a string specifying the return type of the method. The third element is a list of strings specifying, in order, the parameter types for the method.on GetSubClasses: return list
Returns a list of the names of all the subclasses of the class.on GetSuperClasses: return list
Returns a list of the names of all the superclasses of the class.
Returns the class name of the object class to which the object belongs.on GetAttribute: string attribute_name return any
Returns the value of the specified attribute for that object.on SetAttribute: string attribute, any value return boolean
Set the value of the named attribute to value and returns TRUE if successful assignment.on Call: string method_name, list arguments return any
Calls the specified method on the object using the list of arguments specified and returns the result of the method invocation.on Drop: return boolean
Deletes the object from the database and returns TRUE if the action was successful.
Creates a DBset and initializes its contents to the values found in the list. The contents of the list must be a database-recognized type, such as integer, real, etc. (toDTobject, DTdate etc.).on GetList: return list
Returns the set in the form of a list.on SetList: list values
Sets the contents of the set to the values in the list.on AddElement: any value
Adds an element to the set of the specified type and value.
Returns TRUE if the query executed successfully, otherwise FALSE. This value should be checked before attempting to retrieve the results.on RowCount: return integer
Returns the number of entries in the result set.on ColumnCount: return integer
This method returns the number of elements in an entry of the result set.on TypeList: return list
Returns the data types of the elements of a result entry.on Next: return list
Moves the cursor forward one entry in the result set and returns the value of that entry. Initially Next returns the data values for the first row of the cursor. If Next is used beyond the number of result rows in the cursor, an empty list is returned.on Prev: return list
Moves the cursor to the previous entry in the result set and returns that entry. If Prev is used back beyond the first result row of the cursor, an empty list is returned.on OpenAt: integer position return list
Moves the cursor to the result entry at position and returns that entry. If it is outside the range of the cursor, an empty list is returned.on IsLast: return boolean
Returns TRUE if the cursor is currently positioned at the last result in the set. A subsequent execution of the method Next would result in an error.on Position: return integer
Returns the position to which the cursor currently points. First row is at position 1.
select name, age salary
from person, project
where name='John' and projectID=3345
order by 3
The query class enables the query to be specified as a string or built up from its component parts. The query is subject to pre-processing by the multidatabase system.
Sets the list of class names from which the query result will be generated.on SetQryOrderBy: list orderList
Sets the order in which the results will appear.on SetQrySelect: list selectList
Sets the list of attributes from which the query result will be generated.on SetQryText: string queryText
Sets the text of the entire query. The query will automatically be broken down into its component parts.on SetQryWhere: list whereList
Sets the list of conditions which govern result generation.on GetQryOrderBy: return list
Returns the order in which the results will be listed.on GetQrySelect: return list
Returns the list of attributes from which the query result will be generated.on GetQryText: return string
Returns the complete text of the query. This will be automatically generated from the component parts if necessary.on GetQryWhere: return list
Returns the list of conditions which governs result generation.on Bind: integer n, any value
A parameter in a query can be specified by a question mark (?) when the query is constructed. This mark must be replaced by an appropriate value before the query is executed. This method replaces the parameter marked by the nth question mark with value.on BindAll: list values
This function replaces all the question marks in the query with the values from the supplied list in order.
Returns a handle to a DBbinary object where the binary information is stored in the file locations specified by the method parameters.upon CreateAsBinary: string pathName, string fileName, string hostName return handle
Creates a DBbinary object where the binary information is read from the file location specified by the method parameters and stored internally to the object.on GetFile: return string
If the binary data is stored as a reference to an external file. GetFile returns the external filename.on GetHost: return string
If the binary data is stored as a reference to an external file. GetFile returns machine name where the file is stored.on GetPath: return string
If the binary data is stored as a reference to an external file. GetPath returns a path to the external file.on IsBinary: return boolean
Returns TRUE if the binary data is stored internally to the object. Returns FALSE if the binary data is stored as a reference to an external file.
Returns a handle to a DBmedia object.
Returns a handle to a DBimage object that is located on the hostname machine at the location pathname in filename.on GetImage: return handle
Returns a handle to an MMimage object that has been constructed from the information contained in the DBimage object.
Creates a DBdate and initializes the value of the date.on SetDate: integer day, integer month, integer year
Sets the value of the date.on GetDateStr: return string
Returns the date in the form of a string such as '13/10/1994'.on GetDateList: return list
Returns the date in the form of a list of integers, {month, day, year}.
Creates a DBtime and initializes the value of the time.on SetTime: integer hour, integer minute, integer second
Sets the value of the time.on GetTimeStr: return string
Returns the time (24 hour clock) in the form of a string such as '14:03:22'.on GetTimeList: return list
Returns the date in the form of a list of integers, {hour, minute, second}.
Creates a DBtimestamp and initializes the value of the timestamp.on GetTstampList: return list
Returns a list composed of two elements, a handle to a DBdate object and a handle to a DBtime object.on SetTstamp: handle date, handle time
Sets the value of the timestamp.on GetTstampStr: return string
Returns the timestamp in the form of a string such as '05:04:03 13/10/1994'.
Creates a DBmonetary and initializes the amount of the monetary value.on SetAmount: real amount
Sets the amount of the monetary value.on GetAmount: return real
Returns the amount of the monetary value.
Generated with Harlequin WebMaker