Dynamic SQL Object Documentation

$name $this->api->db->dsql()

Object-oriented interface to SQL language. Many objects in Agile Toolkit rely on DSQL.

In Agile Toolkit, DSQL is a built-in "Object Relationship Manager" which implements object-oriented API to interact with SQL database similar to. A typical developer for Agile Toolkit would probably experience no need to interact with DSQL at all. For expert developers DSQL provides an awesome way to extend basic functionality of Models and Views.

DSQL is extensively used by "Model_Table". When compared to alternative Object Relationship Manager implementations, DSQL exhibits several unique attributes and goals.

Goals and Features of DSQL

Collects all information about the query into one object;
Allow do modify existing query dynamically;
Permit use of customizations for different SQL vendors;
Implement effective protection against SQL injections;
Support select, updates, insert and function calls;
Allow using other DSQL object as sub-query;
Well suitable for automated use for models.

What DSQL is not?

In the spirit of Agile Toolkit — all of it's classes are strictly focused on a one simple task, without trying to do everything. Here are things which DSQL will not do and why:

No generation of PHP code
No knowledge of your database
No attempts to change database structure
DSQL is compact and fast

Other Resources