Opened 14 years ago
Closed 9 years ago
#6633 closed defect (wontfix)
callback function not getting called when no match found for criteria in select query with use of dojox.sql.DECRYPT
Reported by: | guest | Owned by: | Shane O'Sullivan |
---|---|---|---|
Priority: | low | Milestone: | 1.9 |
Component: | Storage/Flash | Version: | 1.0 |
Keywords: | needsreview | Cc: | |
Blocked By: | Blocking: |
Description
I have Google Gears installed on my machine and trying to store data on local machine in encrypted format
I am using dojox.sql.ENCRYPT/DECRYPT for encryption/decryption flow
I have created MY_DATA_STORE table as follows
var myTable="MY_DATA_STORE";
dojox.sql("CREATE TABLE IF NOT EXISTS " + myTable+ "( "
+ " namespace TEXT, " + " key TEXT, " + " value TEXT " + ")"
);
I have Inserted one record in this table with encrypted data for column whose name is 'key' using dojox.sql.ENCRYPT as follows
var myTable="MY_DATA_STORE";
var mynamespace="testnamespace";
var mykey="mykey1";
var data="This is data for mykey1"
dojox.sql("INSERT INTO "+myTable+" VALUES (?, ?, ENCRYPT(?))",mynamespacee, mykey, data,
"mypassword",
function(results, error, errorMsg){
if(error){
alert("Error in record insertion: "+errorMsg);
}else{
alert("Record insertion done successfully");
}
}
});
I can retrieve the above data using dojox.sql.DECRYPT and specifying key="mykey1" in select query as follows
var myTable="MY_DATA_STORE";
var mynamespace="testnamespace"; var mykey="mykey1";
dojox.sql("SELECT namespace,key,DECRYPT(value) FROM " + myTable+ " where namespace='"+mynamespace+"' and key='"+mykey+"'",
"mypassword", function(results, error, errorMsg){
alert("Inside callback handler function.This alert is not shown");
if(error){
alert(Error in getting required data");
}else{
var resultData=results[0].value; alert("Received Data is:"+resultData);
}
});
Now Issue is that in above select query if I specify any key other than "mykey1", then there is no record in "MY_DATA_STORE" table matching with this key. Hence Ideally callbackhandler function should get invoked and there should be no data in first parameter "results" of callback handler function.
However my observation is that under this scenario, the callback handler function never gets invoked I can not even see alert statement which is first line of callback handler function as follows
alert("Inside callback handler function.This alert is not shown");
I am using dojo 1.0 version.
Thanks
Change History (7)
comment:1 Changed 14 years ago by
Owner: | changed from Adam Peller to Tom Trenka |
---|
comment:2 Changed 14 years ago by
Milestone: | → future |
---|
comment:3 Changed 14 years ago by
Component: | Dojox → Storage/Flash |
---|---|
Milestone: | future → tbd |
Owner: | changed from Tom Trenka to Brad Neuberg |
comment:4 Changed 14 years ago by
Milestone: | tbd → future |
---|
comment:5 Changed 13 years ago by
Owner: | changed from Brad Neuberg to Shane O'Sullivan |
---|
Thank you, Shane
comment:6 Changed 10 years ago by
Keywords: | needsreview added |
---|---|
Priority: | high → low |
comment:7 Changed 9 years ago by
Milestone: | future → 1.9 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
dojox/storage is abandoned/deprecated (work is being done on various modules to support local storage, but not with Gears). Closing as wontfix.
This is a valid bug that should be fixed. However, I'm holding off on non-critical Dojo Offline bugs for 1.4 until a more general Dojo Offline refactoring.