NextDB.net

Class nextdb.Update

Object
   |
   +--nextdb.Update

class 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 nextdb.Connection("accountName","databaseName");
    var key;
    var query = new 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 nextdb.Update("TABLE1");
            var paramMap = {
            	"first_name" : "Bob"
            	"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
          
 
Constructor Summary
nextdb.Update(<String> tableName)
           
 
Method Summary
 void setParameters(<Object> map)
          
 void setRowId(<String> rowId)
          

Field Detail

table

Object table

Constructor Detail

nextdb.Update

nextdb.Update(<String> tableName)

Method Detail

setParameters

void setParameters(<Object> map)

setRowId

void setRowId(<String> rowId)

NextDB.net

Documentation generated by JSDoc on Fri Apr 1 10:54:23 2011