Class: Transaction

.xsds. Transaction

new Transaction()

Methods

<static> $commit()

Explicitly commits current transaction. Note that committing affects persisted entities only; any instances modified in memory only will not be persisted by committing.

<static> $getConnection()

Returns the connection object used in all XS DS operations
Returns:
the connection object used in all XS DS operations

<static> $rollback()

Explicitly rolls back current transaction. Resets entity cache to reflect rollback. Note that JavaScript variables may still hold references to now obsolete entity instances.

<static> $setAutoCommit(true)

Enables or disables auto commit for database operations. Note that if auto commit is enabled, commits are per $save() call, not per database query. Thus, if a $save operation involves multiple updates to the database due to associations, all updates remain within the same transaction.
Parameters:
Name Type Description
true iff auto commit should be enabled

<static> $setConnection(conn)

Use already existing database connection for all interactions with HANA. Closes the currently used connection, if any.
Parameters:
Name Type Description
conn object the connection object to be used for XS DS

<static> $setConnectionConfig(config)

Set connection configuration for database connection
Parameters:
Name Type Description
config object the database configuration object passed to the getConnection function in the database API

<static> $setIsolationLevel(the)

Sets the isolation level of the database connection. Defaults to the default isolation level for database connections
Parameters:
Name Type Description
the number isolation level to be used