Package gnue :: Package common :: Package datasources :: Module GDataSource
[show private | hide private]

Module gnue.common.datasources.GDataSource

Classes for the datasource object tree.
Classes
GConnection A connection defined in the XML instead of in connections.conf.
GCSortField A field within a sort order definition.
GCSortOrder The sort order definition for a datasource.
GDataSource Class that handles DataSources.
GSql The definition of a raw SQL query string.
GStaticSet A set of static data.
GStaticSetField A field in a static data row.
GStaticSetRow A row of static data.
_DataSourceWrapper  

Exceptions
AppServerResourceError Abstract base class for errors when loading appserver resources.
InvalidResourceTypeError Invalid resource type for an appserver resource.
InvalidURLError Invalid URL for an appserver resource.
ResourceNotFoundError Requested appserver resource not found.

Function Summary
  DataSourceWrapper(connections, fields, attributes, init, sql)
Wrapper function to use datasources outside an XML tree.
  getAppserverResource(url, paramDict, connections)
Load an appserver resource.
  getXMLelements(updates)

Function Details

DataSourceWrapper(connections=None, fields=[], attributes={}, init=True, sql='')

Wrapper function to use datasources outside an XML tree.
Parameters:
connections - Connection manager (GConnections.GConnections instance).
fields - List of field names to bind to the database.
attributes - Dictionary of attributes to set for the datasource (all XML attributes can be used).
init - If set to False, does not initialize the datasource object.
sql - Optional raw SQL.

getAppserverResource(url, paramDict, connections)

Load an appserver resource.

Appserver resources are XML definitions that are generated by appserver.
Parameters:
url - Resource URL. Must be in format appserver://<connection>/<resourcetype>/<resourcename>
paramDict - Parameters to provide when requesting the resource. Valid parameters depend on the resource type.
connections - Connection manager that can be used to connect to the appserver backend.

getXMLelements(updates={})



GNUe Home

Private API

Developer's Corner