Previous Next

Commits data manipulations (INSERT, UPDATE, DELETE).

Returns a Promise object or the 'this' object.


.commit( options )


options       ::=  {

    quiet:  quiet

,   waitState:  wait-state

,   promise:  promise

,   success:  success-function

,   error:  error-function



quiet         ::=  { true | false }

wait-state    ::=  { true | false }

promise       ::=  { true | false }

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

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.

Promise determines the return value of this function. If promise has the value 'true' (the default), a Promise object is returned. If promise has the value 'false', the ‘this’ object is returned instead.

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

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



$.udb.commit({ quiet: true})


             alert('Commit successfully completed.');



See also