.commit()

Previous Next

Commits data manipulations (INSERT, UPDATE, DELETE).

Returns the 'this' object.

Syntax

.commit( options )

 

options  ::=  {

    async:  async

,   quiet:  quiet

,   waitState:  wait-state

,   success:  success-function

,   error:  error-function

}

 

async       ::=  { true | false }

quiet       ::=  { true | false }

wait-state  ::=  { true | false }

Options is a struct that can have the following items, all of which are optional.

Async is a boolean determining whether the operation is executed asynchronously. The default is true.

Quiet is a boolean determining whether a message is displayed if an error occurs. The default is false, meaning that an error is displayed by default.

Wait-state automatically adds a loading icon to the application window while this function is being executed. This is especially useful if the server needs an unusually long time to complete.

Success-function is a function called after the operation has successfully completed.

Error-function is a function called if an error occurs.

 

Example

$.udb.commit({

 quiet: true,

 success:function(){

         alert('Commit successfully completed.');

 }

});

 

See Also

.isCommitted()