Accept 'null':true as bound parameter type

This commit is contained in:
Dan Stillman 2006-06-03 20:06:57 +00:00
parent 93652a137c
commit bbbb243315

View file

@ -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;