commit bbbb24331555e06f464a47579fc6a425c4d41d03
parent 93652a137cf25526c2ed5480f9adfda409128897
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 3 Jun 2006 20:06:57 +0000
Accept 'null':true as bound parameter type
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/chrome/chromeFiles/content/scholar/xpcom/db.js b/chrome/chromeFiles/content/scholar/xpcom/db.js
@@ -169,16 +169,23 @@ Scholar.DB = new function(){
if (statement && params){
for (var i=0; i<params.length; i++){
+ // Int
if (typeof params[i]['int'] != 'undefined'){
Scholar.debug('Binding parameter ' + (i+1) + ' of type int: ' +
params[i]['int'],5);
statement.bindInt32Parameter(i,params[i]['int']);
}
+ // String
else if (typeof params[i]['string'] != 'undefined'){
Scholar.debug('Binding parameter ' + (i+1) + ' of type string: "' +
params[i]['string'] + '"',5);
statement.bindUTF8StringParameter(i,params[i]['string']);
}
+ // Null
+ else if (typeof params[i]['null'] != 'undefined'){
+ Scholar.debug('Binding parameter ' + (i+1) + ' of type NULL', 5);
+ statement.bindNullParameter(i);
+ }
}
}
return statement;