dojox.sql._SQLCrypto._execDecryptSQL
dojo.require("dojox._sql.common");
defined in dojox/_sql/common.js
Usage
function (sql, password, args, callback) (view source)
var strippedSQL = this._stripCryptoSQL(sql); // determine which columns needs decryption; this either // returns the value *, which means all result set columns will // be decrypted, or it will return the column names that need // decryption set on a hashtable so we can quickly test a given // column name; the key is the column name that needs // decryption and the value is 'true' (i.e. needsDecrypt["someColumn"] // would return 'true' if it needs decryption, and would be 'undefined' // or false otherwise) var needsDecrypt = this._determineDecryptedColumns(sql); // execute the SQL var error = false; var resultSet = []; var exp = null; try{ resultSet = dojox.sql.db.execute(strippedSQL, args); }catch(execError){ error = true; exp = execError.message||execError; } // was there an error during SQL execution? if(exp != null){ if(dojox.sql._autoClose){ try{ dojox.sql.close(); }catch(e){} } callback(resultSet, true, exp.toString()); return; } // normalize SQL results into a JavaScript object // we can work with resultSet = dojox.sql._normalizeResults(resultSet); if(dojox.sql._autoClose){ dojox.sql.close(); } // decrypt columns that need it this._decrypt(resultSet, needsDecrypt, password, function(finalResultSet){ callback(finalResultSet, false, null); });
parameter | type | description |
---|---|---|
sql | ||
password | ||
args | ||
callback |