1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/md/PostgreSQL/Common-methods/Close-connection.mdx

53 lines
1.3 KiB
Plaintext
Raw Normal View History

2025-02-12 19:33:53 +03:00
---
sidebar_position: 2
2025-05-05 10:07:34 +03:00
description: "Close connection " and other functions to work with PostgreSQL in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, PostgreSQL]
2025-02-12 19:33:53 +03:00
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Close connection
Explicitly closes the passed connection
`Function CloseConnection(Val Connection) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Connection | - | Arbitrary | ✔ | AddIn object with open connection |
Returns: Structure Of KeyAndValue - Result of connection termination
<br/>
:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
2025-02-17 17:16:27 +03:00
Address = "127.0.0.1";
2025-02-13 21:31:59 +03:00
Login = "bayselonarrend";
Password = "12we...";
Base = "postgres";
ConnectionString = OPI_PostgreSQL.GenerateConnectionString(Address, Base, Login, Password);
Connection = OPI_PostgreSQL.CreateConnection(ConnectionString);
Result = OPI_PostgreSQL.CloseConnection(Connection);
2025-02-12 19:33:53 +03:00
```
2025-02-18 14:08:09 +03:00
```json title="Result"
{
"result": true
}
```