<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.memcp.org/index.php?action=history&amp;feed=atom&amp;title=Transactions</id>
	<title>Transactions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.memcp.org/index.php?action=history&amp;feed=atom&amp;title=Transactions"/>
	<link rel="alternate" type="text/html" href="https://www.memcp.org/index.php?title=Transactions&amp;action=history"/>
	<updated>2026-08-28T06:33:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://www.memcp.org/index.php?title=Transactions&amp;diff=294&amp;oldid=prev</id>
		<title>Carli: Created page with &quot; ← Back to Full SCM API documentation   == tx_commit ==  Commits the current transaction.  &#039;&#039;&#039;Allowed number of parameters:&#039;&#039;&#039; 1–1  &lt;span id=&quot;parameters-2&quot;&gt;&lt;/span&gt; === Parameters ===  * &#039;&#039;&#039;session&#039;&#039;&#039; (&lt;code&gt;func(key:string?, value:any?) -&amp;gt; any&lt;/code&gt;): the session function that holds tx state  &lt;span id=&quot;returns-2&quot;&gt;&lt;/span&gt; === Returns ===  &lt;code&gt;bool&lt;/code&gt;  == tx_rollback ==  Rolls back the current transaction.  &#039;&#039;&#039;Allowed number of parameters:&#039;&#039;&#039; 1–1  &lt;span...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.memcp.org/index.php?title=Transactions&amp;diff=294&amp;oldid=prev"/>
		<updated>2026-08-27T06:36:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; ← Back to &lt;a href=&quot;/wiki/Full_SCM_API_documentation&quot; title=&quot;Full SCM API documentation&quot;&gt;Full SCM API documentation&lt;/a&gt;   == tx_commit ==  Commits the current transaction.  &amp;#039;&amp;#039;&amp;#039;Allowed number of parameters:&amp;#039;&amp;#039;&amp;#039; 1–1  &amp;lt;span id=&amp;quot;parameters-2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; === Parameters ===  * &amp;#039;&amp;#039;&amp;#039;session&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;func(key:string?, value:any?) -&amp;gt; any&amp;lt;/code&amp;gt;): the session function that holds tx state  &amp;lt;span id=&amp;quot;returns-2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; === Returns ===  &amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt;  == tx_rollback ==  Rolls back the current transaction.  &amp;#039;&amp;#039;&amp;#039;Allowed number of parameters:&amp;#039;&amp;#039;&amp;#039; 1–1  &amp;lt;span...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
← Back to [[Full SCM API documentation]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== tx_commit ==&lt;br /&gt;
&lt;br /&gt;
Commits the current transaction.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Allowed number of parameters:&amp;#039;&amp;#039;&amp;#039; 1–1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;parameters-2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;session&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;func(key:string?, value:any?) -&amp;amp;gt; any&amp;lt;/code&amp;gt;): the session function that holds tx state&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;returns-2&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Returns ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== tx_rollback ==&lt;br /&gt;
&lt;br /&gt;
Rolls back the current transaction.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Allowed number of parameters:&amp;#039;&amp;#039;&amp;#039; 1–1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;parameters-3&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;session&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;func(key:string?, value:any?) -&amp;amp;gt; any&amp;lt;/code&amp;gt;): the session function that holds tx state&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;returns-3&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Returns ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== with_autocommit ==&lt;br /&gt;
&lt;br /&gt;
Executes fn inside an implicit TxCursorStability transaction if no explicit transaction is active in session. Commits on success, rolls back on error, and re-raises any panic so the caller&amp;#039;s error handler still fires. If an explicit transaction is active (session[&amp;amp;quot;transaction&amp;amp;quot;] != nil), fn is executed without any wrapping.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Allowed number of parameters:&amp;#039;&amp;#039;&amp;#039; 2–2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;parameters-4&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;session&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;func(key:string?, value:any?) -&amp;amp;gt; any&amp;lt;/code&amp;gt;): the session function holding tx state&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;fn&amp;#039;&amp;#039;&amp;#039; (&amp;lt;code&amp;gt;func&amp;lt;/code&amp;gt;): zero-argument function to execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;returns-4&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
=== Returns ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;any&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Carli</name></author>
	</entry>
</feed>