public/javascripts/yui/datasource/datasource.js
function(oRequest, oCallback, oCaller) {
    var tId = DS._nTransactionId++;
    this.fireEvent("requestEvent", {tId:tId,request:oRequest,callback:oCallback,caller:oCaller});
    
    // If there are no global pending requests, it is safe to purge global callback stack and global counter
    if(util.ScriptNodeDataSource._nPending === 0) {
        util.ScriptNodeDataSource.callbacks = [];
        util.ScriptNodeDataSource._nId = 0;
    }
    
    // ID for this request
    var id = util.ScriptNodeDataSource._nId;
    util.ScriptNodeDataSource._nId++;
    
    // Dynamically add handler function with a closure to the callback stack
    var oSelf = this;
    util.ScriptNodeDataSource.callbacks[id] = function(oRawResponse) {
        if((oSelf.asyncMode !== "ignoreStaleResponses")||
                (id === util.ScriptNodeDataSource.callbacks.length-1)) { // Must ignore stale responses
                
            // Try to sniff data type if it has not been defined
            if(oSelf.responseType === DS.TYPE_UNKNOWN) {
                if(YAHOO.lang.isArray(oRawResponse)) { // array
                    oSelf.responseType = DS.TYPE_JSARRAY;
                }
                 // xml
                else if(oRawResponse.nodeType && oRawResponse.nodeType == 9) {
                    oSelf.responseType = DS.TYPE_XML;
                }
                else if(oRawResponse.nodeName && (oRawResponse.nodeName.toLowerCase() == "table")) { // table
                    oSelf.responseType = DS.TYPE_HTMLTABLE;
                }    
                else if(YAHOO.lang.isObject(oRawResponse)) { // json
                    oSelf.responseType = DS.TYPE_JSON;
                }
                else if(YAHOO.lang.isString(oRawResponse)) { // text
                    oSelf.responseType = DS.TYPE_TEXT;
                }
            }

            oSelf.handleResponse(oRequest, oRawResponse, oCallback, oCaller, tId);
        }
        else {
        }
    
        delete util.ScriptNodeDataSource.callbacks[id];
    };
    
    // We are now creating a request
    util.ScriptNodeDataSource._nPending++;
    var sUri = this.liveData + oRequest + this.generateRequestCallback(id);
    sUri = this.doBeforeGetScriptNode(sUri);
    this.getUtility.script(sUri,
            {autopurge: true,
            onsuccess: util.ScriptNodeDataSource._bumpPendingDown,
            onfail: util.ScriptNodeDataSource._bumpPendingDown});

    return tId;
}
function(oRequest, oCallback, oCaller) {
    var tId = DS._nTransactionId++;
    this.fireEvent("requestEvent", {tId:tId,request:oRequest,callback:oCallback,caller:oCaller});
    
    // If there are no global pending requests, it is safe to purge global callback stack and global counter
    if(util.ScriptNodeDataSource._nPending === 0) {
        util.ScriptNodeDataSource.callbacks = [];
        util.ScriptNodeDataSource._nId = 0;
    }
    
    // ID for this request
    var id = util.ScriptNodeDataSource._nId;
    util.ScriptNodeDataSource._nId++;
    
    // Dynamically add handler function with a closure to the callback stack
    var oSelf = this;
    util.ScriptNodeDataSource.callbacks[id] = function(oRawResponse) {
        if((oSelf.asyncMode !== "ignoreStaleResponses")||
                (id === util.ScriptNodeDataSource.callbacks.length-1)) { // Must ignore stale responses
                
            // Try to sniff data type if it has not been defined
            if(oSelf.responseType === DS.TYPE_UNKNOWN) {
                if(YAHOO.lang.isArray(oRawResponse)) { // array
                    oSelf.responseType = DS.TYPE_JSARRAY;
                }
                 // xml
                else if(oRawResponse.nodeType && oRawResponse.nodeType == 9) {
                    oSelf.responseType = DS.TYPE_XML;
                }
                else if(oRawResponse.nodeName && (oRawResponse.nodeName.toLowerCase() == "table")) { // table
                    oSelf.responseType = DS.TYPE_HTMLTABLE;
                }    
                else if(YAHOO.lang.isObject(oRawResponse)) { // json
                    oSelf.responseType = DS.TYPE_JSON;
                }
                else if(YAHOO.lang.isString(oRawResponse)) { // text
                    oSelf.responseType = DS.TYPE_TEXT;
                }
            }

            oSelf.handleResponse(oRequest, oRawResponse, oCallback, oCaller, tId);
        }
        else {
        }
    
        delete util.ScriptNodeDataSource.callbacks[id];
    };
    
    // We are now creating a request
    util.ScriptNodeDataSource._nPending++;
    var sUri = this.liveData + oRequest + this.generateRequestCallback(id);
    sUri = this.doBeforeGetScriptNode(sUri);
    this.getUtility.script(sUri,
            {autopurge: true,
            onsuccess: util.ScriptNodeDataSource._bumpPendingDown,
            onfail: util.ScriptNodeDataSource._bumpPendingDown});

    return tId;
}
function ( oRequest , oCallback , oCaller ) { var tId = DS . _nTransactionId ++ ; this . fireEvent ( "requestEvent" , { tId : tId , request : oRequest , callback : oCallback , caller : oCaller } ) ; // If there are no global pending requests, it is safe to purge global callback stack and global counter if ( util . ScriptNodeDataSource . _nPending === 0 ) { util . ScriptNodeDataSource . callbacks = [ ] ; util . ScriptNodeDataSource . _nId = 0 ; } // ID for this request var id = util . ScriptNodeDataSource . _nId ; util . ScriptNodeDataSource . _nId ++ ; // Dynamically add handler function with a closure to the callback stack var oSelf = this ; util . ScriptNodeDataSource . callbacks [ id ] = function ( oRawResponse ) { if ( ( oSelf . asyncMode !== "ignoreStaleResponses" ) || ( id === util . ScriptNodeDataSource . callbacks . length - 1 ) ) { // Must ignore stale responses // Try to sniff data type if it has not been defined if ( oSelf . responseType === DS . TYPE_UNKNOWN ) { if ( YAHOO . lang . isArray ( oRawResponse ) ) { // array oSelf . responseType = DS . TYPE_JSARRAY ; } // xml else if ( oRawResponse . nodeType && oRawResponse . nodeType == 9 ) { oSelf . responseType = DS . TYPE_XML ; } else if ( oRawResponse . nodeName && ( oRawResponse . nodeName . toLowerCase ( ) == "table" ) ) { // table oSelf . responseType = DS . TYPE_HTMLTABLE ; } else if ( YAHOO . lang . isObject ( oRawResponse ) ) { // json oSelf . responseType = DS . TYPE_JSON ; } else if ( YAHOO . lang . isString ( oRawResponse ) ) { // text oSelf . responseType = DS . TYPE_TEXT ; } } oSelf . handleResponse ( oRequest , oRawResponse , oCallback , oCaller , tId ) ; } else { } delete util . ScriptNodeDataSource . callbacks [ id ] ; } ; // We are now creating a request util . ScriptNodeDataSource . _nPending ++ ; var sUri = this . liveData + oRequest + this . generateRequestCallback ( id ) ; sUri = this . doBeforeGetScriptNode ( sUri ) ; this . getUtility . script ( sUri , { autopurge : true , onsuccess : util . ScriptNodeDataSource . _bumpPendingDown , onfail : util . ScriptNodeDataSource . _bumpPendingDown } ) ; return tId ; }
Overriding method passes query to Get Utility. The returned
response is then forwarded to the handleResponse function.

@method makeConnection
@param oRequest {Object} Request object.
@param oCallback {Object} Callback object literal.
@param oCaller {Object} (deprecated) Use oCallback.scope.
@return {Number} Transaction ID.
Overriding method passes query to Get Utility . The returned response is then forwarded to the handleResponse function .