1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-07-05 00:58:52 +02:00
Files
OpenIntegrations/docs/en/md/SQLite/Common-methods/Connect-extension.mdx
Vitaly the Alpaca (bot) a84c85b755 Main build (Jenkins)
2025-02-27 13:01:50 +03:00

54 lines
1.5 KiB
Plaintext
Vendored

---
sidebar_position: 5
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Connect extension
Connects the SQLite extension for the specified connection
`Function ConnectExtension(Val Extension, Val EntryPoint = "", Val Connection = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Extension | - | String, BinaryData | ✔ | Extension data or filepath |
| EntryPoint | - | String | ✖ | Expansion entry point, if required |
| Connection | - | String, Arbitrary | ✖ | Existing connection or path to the base. In memory, if not filled |
Returns: Map Of KeyAndValue - Result of extension connecting
<br/>
:::tip
The extension is active only for the current connection. You must reconnect it each time a new connection is established
Similar to using the `Extensions` parameter (`exts` in CLI) of the `ExecuteSQLQuery` function
Parameters with Binary data type can also accept file paths on disk and URLs
:::
:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Base = "C:\Users\Administrator\AppData\Local\Temp\v8_4102_79.sqlite";
Extension = "https://api.athenaeum.digital/test_data/uuid.dll"; // URL, Path or Binary Data
EntryPoint = "sqlite3_uuid_init";
Connection = OPI_SQLite.CreateConnection(Base);
Result = OPI_SQLite.ConnectExtension(Extension, EntryPoint, Connection);
```