[ library(dbi) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

session_commit(++Session)

commits transactional changes made to the database.
Session
A session handle

Description

This commits any transactional updates to the database made within Session. By default, transactional updates are local to the session, and the changes only become global when a commit occurs, e.g. when session_commit/1 is executed. Note that non-transactional updates become globally visible immediately.

When executed within the scope of a session_transaction/2 goal, this predicate simply succeeds without doing anything.

Exceptions

(5) type error
Session is not a valid session handle
(dbi_error)
Problems from DBMS during commit.

Examples

    session_sql(Session, "insert into mytable values ('a')", _),
    session_commit(Session), % committing the insert of a to table mytable 

See Also

session_rollback / 1, session_transaction / 2