VCL
[ class tree: VCL ] [ index: VCL ] [ all elements ]

Class: CustomQuery

Source Location: /dbtables.inc.php

Class Overview

Object
   |
   --Persistent
      |
      --Component
         |
         --DataSet
            |
            --DBDataSet
               |
               --CustomTable
                  |
                  --CustomQuery

Base class for Query.


Variables

Methods


Child classes:

Query
Query represents a dataset with a result set that is based on an SQL statement.
StoredProc
StoredProc encapsulates a stored procedure in an application.

Inherited Variables

Inherited Methods

Class: CustomTable

CustomTable::buildQuery()
Builds the query to execute
CustomTable::defaultHasAutoInc()
CustomTable::defaultOrder()
CustomTable::defaultOrderField()
CustomTable::defaultTableName()
CustomTable::dumpHiddenKeyFields()
Dump hidden html fields with the key fields of this dataset
CustomTable::getHasAutoInc()
CustomTable::InternalDelete()
CustomTable::InternalPost()
CustomTable::readAssociativeFieldValues()
Return an array containg the row values
CustomTable::readFieldProperties()
Get field properties
CustomTable::readKeyFields()
Return an array with Key fields for the table
CustomTable::readOrder()
Specifies the ordering of the query, ascendant or descendant
CustomTable::readOrderField()
Specifies the field to order this table for
CustomTable::readTableName()
Name of the table you want to access
CustomTable::setHasAutoInc()
CustomTable::writeOrder()
CustomTable::writeOrderField()
CustomTable::writeTableName()

Class: DBDataSet

DBDataSet::CheckDatabase()
Checks if the assigned database is an object
DBDataSet::defaultDatabase()
DBDataSet::fieldget()
Returns the value of a field on the dataset
DBDataSet::fieldset()
Sets the value of a field on the dataset
DBDataSet::InternalClose()
DBDataSet::InternalFirst()
DBDataSet::InternalLast()
DBDataSet::InternalOpen()
DBDataSet::loaded()
DBDataSet::MoveBy()
DBDataSet::readDatabase()
Specifies the database object to be used to connect to the server
DBDataSet::readEOF()
If true, the pointer is at the end of the dataset
DBDataSet::readFieldCount()
Number of fields on the current record
DBDataSet::readFields()
Field array (name=>value) of the current record
DBDataSet::readRecordCount()
Number of records in the dataset
DBDataSet::writeDatabase()
DBDataSet::__get()
Overriden to allow get field values as properties
DBDataSet::__set()
Overriden to allow get field values as properties

Class: DataSet

DataSet::__construct()
DataSet::append()
Adds a new, empty record to the end of the dataset.
DataSet::beginInsertAppend()
Begins an insert/append operation
DataSet::cancel()
Cancels modifications to the active record if those changes are not yet posted.
DataSet::checkActive()
Checks to see if the database connection is active.
DataSet::checkBrowseMode()
Automatically posts or cancels data changes when the active record changes.
DataSet::checkCanModify()
Checks to see if the dataset can be modified.
DataSet::checkOperation()
Checks if an specific operation can be made, if not, calls $ErrorEvent
DataSet::checkParentState()
Sets the parent dataset in edit state
DataSet::clearBuffers()
Clear buffers associated with the dataset
DataSet::close()
Closes a dataset.
DataSet::closeCursor()
Close the cursor for this dataset
DataSet::controlsDisabled()
Indicates whether data-aware controls update their display to reflect changes to the dataset.
DataSet::dataEvent()
Used to notify attached datasets about an specific event
DataSet::defaultActive()
DataSet::defaultBOF()
DataSet::defaultCanModify()
DataSet::defaultDataSetField()
DataSet::defaultEOF()
DataSet::defaultFilter()
DataSet::defaultLimitCount()
DataSet::defaultLimitStart()
DataSet::defaultMasterFields()
DataSet::defaultModified()
DataSet::defaultOnAfterCancel()
DataSet::defaultOnAfterClose()
DataSet::defaultOnAfterDelete()
DataSet::defaultOnAfterEdit()
DataSet::defaultOnAfterInsert()
DataSet::defaultOnAfterOpen()
DataSet::defaultOnAfterPost()
DataSet::defaultOnBeforeCancel()
DataSet::defaultOnBeforeClose()
DataSet::defaultOnBeforeDelete()
DataSet::defaultOnBeforeEdit()
DataSet::defaultOnBeforeInsert()
DataSet::defaultOnBeforeOpen()
DataSet::defaultOnBeforePost()
DataSet::defaultOnCalcFields()
DataSet::defaultOnDeleteError()
DataSet::defaultOnFilterRecord()
DataSet::defaultOnNewRecord()
DataSet::defaultOnPostError()
DataSet::defaultRecKey()
DataSet::defaultRecNo()
DataSet::defaultRecordCount()
DataSet::defaultState()
DataSet::delete()
Deletes the active record and positions the dataset on the next record.
DataSet::DisableControls()
Disables data display in data-aware controls associated with the dataset.
DataSet::doInternalOpen()
Performs an internal open of the dataset
DataSet::edit()
Enables editing of data in the dataset.
DataSet::EnableControls()
Enable controls attached to the datasource
DataSet::endInsertAppend()
Finishes an insert/append operation
DataSet::first()
Moves to the first record in the dataset.
DataSet::getLimitCount()
Defines how many records will be shown
DataSet::getLimitStart()
Defines the starting record to filter the dataset with
DataSet::initRecord()
To initialize the current record
DataSet::insert()
Inserts a new, empty record in the dataset.
DataSet::internalAddRecord()
DataSet::internalCancel()
To be overriden to perform a cancel() operation
DataSet::internalClose()
Override this method to perform the closing of the dataset
DataSet::internalDelete()
To be overriden to perform a delete() operation
DataSet::internalEdit()
To be overriden to perform a edit() operation
DataSet::internalFirst()
To be overriden to perform a first() operation
DataSet::internalHandleException()
Override this method to handle exceptions
DataSet::internalInitFieldDefs()
Override this method to init field definitions. Not used.
DataSet::internalInitRecord()
DataSet::internalInsert()
To be overriden to perform a insert() operation
DataSet::internalLast()
To be overriden to perform a last() operation
DataSet::internalOpen()
Override this method to perform the opening of the dataset
DataSet::internalPost()
To be overriden to perform a post() operation
DataSet::internalRefresh()
To be overriden to perform a refresh() operation
DataSet::isCursorOpen()
Override this method to return if the cursor is open or not
DataSet::last()
Moves to the last record in the dataset.
DataSet::loaded()
DataSet::moveBy()
Moves to another record relative to the active record in the dataset.
DataSet::next()
Moves to the next record in the dataset.
DataSet::open()
Opens the dataset.
DataSet::openCursor()
Opens the cursor for the dataset
DataSet::OpenCursorComplete()
Finishes the open cursor operation
DataSet::post()
Implements a virtual method to write a modified record to the database or change log.
DataSet::prior()
Moves to the previous record in the dataset.
DataSet::readActive()
Specifies whether or not a dataset is open.
DataSet::readBOF()
Indicates whether the first record in the dataset is active.
DataSet::readCanModify()
Indicates whether an application can insert, edit, and delete data in a table.
DataSet::readDataSetField()
Indicates the persistent DataSetField object that owns a nested dataset.
DataSet::readEOF()
Indicates whether a dataset is positioned at the last record.
DataSet::readFieldCount()
Indicates the number of field components associated with the dataset.
DataSet::readFields()
This property returns an array with the field names and values
DataSet::readFilter()
Specifies the text of the current filter for a dataset.
DataSet::readMasterFields()
Specifies one or more fields in a master table to link with corresponding fields in this table in order to establish a master-detail relationship between the tables.
DataSet::readMasterSource()
Specifies the name of the data source for a dataset to use as a master table in establishing a detail-master relationship between this table and another one.
DataSet::readModified()
Indicates whether the active record is modified.
DataSet::readOnAfterCancel()
Occurs after an application completes a request to cancel modifications to the active record.
DataSet::readOnAfterClose()
Occurs after an application closes a dataset.
DataSet::readOnAfterDelete()
Occurs after an application deletes a record.
DataSet::readOnAfterEdit()
Occurs after an application starts editing a record.
DataSet::readOnAfterInsert()
Occurs after an application inserts a new record.
DataSet::readOnAfterOpen()
Occurs after an application completes opening a dataset and before any data access occurs.
DataSet::readOnAfterPost()
Occurs after an application writes the active record to the database or change log and returns to browse state.
DataSet::readOnBeforeCancel()
Occurs before an application executes a request to cancel changes to the active record.
DataSet::readOnBeforeClose()
Occurs immediately before the dataset closes.
DataSet::readOnBeforeDelete()
Occurs before an application attempts to delete the active record.
DataSet::readOnBeforeEdit()
Occurs before an application enters edit mode for the active record.
DataSet::readOnBeforeInsert()
Occurs before an application enters insert mode.
DataSet::readOnBeforeOpen()
Occurs before an application executes a request to open a dataset.
DataSet::readOnBeforePost()
Occurs before an application posts changes for the active record to the database or change log.
DataSet::readOnCalcFields()
Occurs when an application recalculates calculated fields.
DataSet::readOnDeleteError()
Not used, reserved for future use
DataSet::readOnFilterRecord()
Not used, reserved for future use
DataSet::readOnNewRecord()
Not used, reserved for future use
DataSet::readOnPostError()
Not used, reserved for future use
DataSet::readRecKey()
Specifies the record key for this dataset
DataSet::readRecNo()
Indicates the current record in the dataset.
DataSet::readRecordCount()
Indicates the total number of records associated with the dataset.
DataSet::readState()
Indicates the current operating mode of the dataset.
DataSet::refresh()
Re-fetches data from the database to update a dataset’s view of data.
DataSet::serialize()
DataSet::setLimitCount()
DataSet::setLimitStart()
DataSet::unserialize()
DataSet::updateRecord()
Ensures that data-aware controls and detail datasets reflect record updates.
DataSet::writeActive()
DataSet::writeCanModify()
DataSet::writeDataSetField()
DataSet::writeFilter()
DataSet::writeMasterFields()
DataSet::writeMasterSource()
DataSet::writeModified()
DataSet::writeOnAfterCancel()
DataSet::writeOnAfterClose()
DataSet::writeOnAfterDelete()
DataSet::writeOnAfterEdit()
DataSet::writeOnAfterInsert()
DataSet::writeOnAfterOpen()
DataSet::writeOnAfterPost()
DataSet::writeOnBeforeCancel()
DataSet::writeOnBeforeClose()
DataSet::writeOnBeforeDelete()
DataSet::writeOnBeforeEdit()
DataSet::writeOnBeforeInsert()
DataSet::writeOnBeforeOpen()
DataSet::writeOnBeforePost()
DataSet::writeOnCalcFields()
DataSet::writeOnDeleteError()
DataSet::writeOnFilterRecord()
DataSet::writeOnNewRecord()
DataSet::writeOnPostError()
DataSet::writeRecKey()
DataSet::writeRecNo()
DataSet::writeState()

Class: Component

Component::__construct()
Component constructor
Component::ajaxCall()
Dumps the javascript code to make an ajax call to the server.
Component::callEvent()
Calls a server event.
Component::defaultName()
Component::defaultTag()
Component::dumpChildrenFormItems()
This method is called by the page just after dumping the starting form tag.
Component::dumpChildrenHeaderCode()
Dumps the header code for all the children
Component::dumpChildrenJavascript()
Dumps the javascript code for all the children
Component::dumpFormItems()
Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components
Component::dumpHeaderCode()
Dumps header code required
Component::dumpHiddenKeyFields()
Dumps hidden field values for the key record
Component::dumpJavascript()
Dumps the javascript code needed by this component
Component::dumpJSEvent()
Dumps javascript code for an event
Component::fixupProperty()
Resolves the right reference to an object property
Component::generateAjaxEvent()
Returns the javascript code to generate an ajax call.
Component::getName()
Specifies the name for the component. The name is used as an identifier and should be unique.
Component::getTag()
A versatile property of every Component that can be used in any way you want
Component::hasValidDataField()
Returns true if a valid data field is attached to the component
Component::init()
Initializes a component
Component::insertComponent()
Inserts a component into the component's collection
Component::loaded()
Initializes the component after the form file has been read into memory.
Component::loadedChildren()
Calls childrens loaded
Component::loadResource()
Loads this component from a string
Component::preinit()
Method called before init()
Component::readAccessibility()
Provides accessibility info to the embedded RPC engine.
Component::readComponentCount()
Indicates the number of components owned by the component.
Component::readComponents()
Lists all the components owned by this component.
Component::readControlState()
A flag to know the state of the control, csLoading, csDesigning
Component::readDataFieldValue()
This property returns the value of the datafield if any.
Component::readFromResource()
Reads a component from a resource file
Component::readNamePath()
Specifies the path to uniquely identify a component, qualified by the owner when required.
Component::readOwner()
Indicates the component that is responsible for streaming and freeing this component.
Component::removeComponent()
Removes a component from the component's collection
Component::serializeChildren()
Serializes all children
Component::setName()
Component::setTag()
Component::unserializeChildren()
Unserializes all children by calling unserialize for all the components
Component::updateDataField()
Updates the field on the dataset attached, if any
Component::writeControlState()

Class: Persistent

Persistent::allowserialize()
This method provides an opportunity for the component developer to prevent the serialization/unserialization of a property.
Persistent::assign()
Assigns the source properties to this object.
Persistent::assignError()
Raises an assignation error.
Persistent::assignTo()
Assigns this object to another object.
Persistent::inSession()
This method determines if this object exists in the current session.
Persistent::readNamePath()
Used to serialize/unserialize. It returns the full path to identify this component.
Persistent::readOwner()
Owner of the component.
Persistent::serialize()
Stores this object into the session.
Persistent::unserialize()
This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Class: Object

Object::__construct()
Constructs an object and initializes its data before the object is first used.
Object::className()
Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
Object::classNameIs()
Determines whether an object is of a specific type.
Object::classParent()
Returns the type of the immediate ancestor of a class.
Object::inheritsFrom()
Determines the relationship of two object types.
Object::methodExists()
Check if a method exists declared on this object instance.
Object::readProperty()
Reads a property from the streams
Object::__get()
To virtualize properties
Object::__set()
To virtualize properties

Class Details

[line 1120]
Base class for Query.

Query represents a dataset with a result set that is based on an SQL statement.

Use Query to access one or more tables in a database using SQL statements. Query components can be used with remote database servers (such as Sybase, SQL Server, Oracle, Informix, DB2, and InterBase), with local tables (Paradox, InterBase, dBASE, Access, and FoxPro), and with ODBC-compliant databases.

Query components are useful because they can:

Access more than one table at a time (called a “join” in SQL).

Automatically access a subset of rows and columns in its underlying table(s), rather than always returning all rows and columns.




[ Top ]


Class Variables

$_sql = array()

[line 1122]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


method buildQuery [line 1190]

void buildQuery( )



Overridden in child classes as:

StoredProc::buildQuery()

Overrides CustomTable::buildQuery() (Builds the query to execute)

[ Top ]

method defaultParams [line 1188]

void defaultParams( )



[ Top ]

method defaultSQL [line 1156]

void defaultSQL( )



[ Top ]

method Prepare [line 1172]

void Prepare( )

Sends a query to the server for optimization prior to execution.

Call Prepare to have a remote database server allocate resources for the query and to perform additional optimizations.

If the query will only be executed once, the application does not need to explicitly call Prepare. Executing an unprepared query generates these calls automatically. However, if the same query is to be executed repeatedly, it is more efficient to prevent these automatic calls by calling Prepare explicitly.

Note: When you change the text of a query at runtime, the query is automatically closed and unprepared.




Overridden in child classes as:

StoredProc::Prepare()

[ Top ]

method readParams [line 1186]

array readParams( )

Contains the parameters for a query’s SQL statement.

Access Params at runtime to view and set parameter names and values dynamically (at design time use the editor for the Params property to set parameter information). Index specifies the array element to access.




[ Top ]

method readSQL [line 1137]

array readSQL( )

Contains the text of the SQL statement to execute for the query.

Use SQL to provide the SQL statement that a query component executes when its Open method is called. At design time the SQL property can be edited by invoking the String List editor in the Object Inspector.

The SQL property may contain only one complete SQL statement at a time. In general, multiple “batch” statements are not allowed unless a particular server supports them.




[ Top ]

method writeParams [line 1187]

void writeParams( $value)



Parameters:

   $value  

[ Top ]

method writeSQL [line 1138]

void writeSQL( $value)



Parameters:

   $value  

[ Top ]


Documentation generated on Sat, 13 Jun 2009 10:51:27 -0700 by phpDocumentor 1.4.1