> For the complete documentation index, see [llms.txt](https://muradkarakas.gitbook.io/sodium_documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://muradkarakas.gitbook.io/sodium_documentation/language-reference/built-in-functions/sodium-built-in-functions/database-related-functions/commit.md).

# commit

&#x20;`commit` function has 2 variants:

{% tabs %}
{% tab title="Variant 1" %}

#### Description <a href="#description" id="description"></a>

&#x20;Sends `commit` command to the database through `default` connection.

#### Declaration <a href="#declaration" id="declaration"></a>

```
void commit();
```

#### Parameters <a href="#parameters" id="parameters"></a>

#### Return Value <a href="#return-value" id="return-value"></a>

#### Example <a href="#example" id="example"></a>

{% endtab %}

{% tab title="Variant 2" %}

#### Description <a href="#description-1" id="description-1"></a>

&#x20;Sends `commit` command to the database through connection whose name is passed as argument `connectionName`.

#### Declaration <a href="#declaration-1" id="declaration-1"></a>

```
void commit(char connectionName);
```

#### Parameters <a href="#parameters-1" id="parameters-1"></a>

* `char connectionName` - Connection name to be commited.

#### Return Value <a href="#return-value-1" id="return-value-1"></a>

#### Example <a href="#example-1" id="example-1"></a>

{% endtab %}
{% endtabs %}
