Class net.nextdb.Update
Object
|
+--net.nextdb.Update
- class
net.nextdb.Update
In order to update a certain row you need to know the key for the row. This is a security precaution that data can only be updated and deleted by encrypted keys.
var conn = new net.nextdb.Connection("accountName","databaseName");
var key;
var query = new net.nextdb.Query("QUERY1");
conn.executeQuery(query,
function(rows,error){
if(error){
alert(error.message);
} else {
//get a specific obfuscated key
key=rows[0].TABLE1.PK;
var update = new net.nextdb.Update("TABLE1");
var paramMap = {};
paramMap["first_name"]="Bob";
paramMap["last_name"]="Jones";
update.setParameters(paramMap);
update.setRowId(key);
conn.executeUpdate(update,
function(error){
if(error){
alert(error.message);
} else {
alert("ok");
}
}
);
}
}
);
Defined in api.docs.js
|
Field Summary |
Object |
table
|
table
Object table
net.nextdb.Update
net.nextdb.Update(<String> tableName)
setParameters
void setParameters(<Object> map)
Parameters:
map - -required collection of name/value pairs, this is a plain old javascript object. example:
var parameters = new Object();
parameters.fname="Brent";
parameters.lname="Brent";
parameters.email="brenthamby@someserver.com";
update.setParameters(parameters);
setRowId
void setRowId(<String> rowId)
Parameters:
rowId - -required used to specify the row to update.
Documentation generated by
JSDoc on Mon Mar 29 20:15:50 2010