OpenWGA 7.10 - TMLScript reference


Object:

Database

Description

This object defines the common base functionality of App and DataSource, which is available to both types of databases. 

OpenWGA never serves objects of this raw type but only the subtypes described above.

Retrieval WGA.database()
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Properties and methods
Name Purpose
accessLevel Returns the access level that the current user has on this database
db() Returns the WGAPI database object for the database
dbKey Returns the database key of the database
domain() Returns the Domain to which the database belongs
getPublisherOption(name) Retrieves the value of a publisher option
isAnonymous() Returns if the user in anonymously logged in to this database
isAuthor() Returns if the user has at least access level AUTHOR on this database
isChiefEditor() Returns if the user has at least access level CHIEFEDITOR on this database
isEditor() Returns if the user has at least access level EDITOR on this database
isManager() Returns if the user has access level MANAGER on this database
isOpen() Returns if a session is open on this database
isReader() Returns if the user has at least access level READER on this database
query(queryType, query, [attributes, [queryParams, [context]]])
query(query [,config])
Performs a query on the database