You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-16 09:38:28 +02:00
82 lines
2.6 KiB
Plaintext
Vendored
82 lines
2.6 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 5
|
|
sidebar_class_name: doc-no-cli
|
|
description: Connect extension and other functions to work with SQLite in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, SQLite]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
import Admonition from '@theme/Admonition';
|
|
|
|
# Connect extension
|
|
Connects the SQLite extension for the specified connection
|
|
|
|
|
|
|
|
<Tabs>
|
|
<TabItem value="params" label="Parameters" default>
|
|
|
|
`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 |
|
|
|
|
|
|
<div className="return-value-note">
|
|
<div className="return-value-note__title">Returns</div>
|
|
<div className="return-value-note__value">
|
|
Map Of KeyAndValue - Result of extension connecting
|
|
</div>
|
|
</div>
|
|
|
|
</TabItem>
|
|
<TabItem value="extended" label={<span>Advanced call{' '}<a href="/docs/Start/Advanced-call" target="_blank" rel="noreferrer" title="About advanced call" onClick={(e) => e.stopPropagation()}>?</a></span>}>
|
|
|
|
*This method has no additional advanced call parameters.*
|
|
|
|
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
:::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
|
|
:::
|
|
|
|
<Admonition type="caution" title="Caution" className="nocli-admonition">
|
|
<div className="addin">
|
|
<strong>NOCLI:</strong> this method is not available in CLI version
|
|
</div>
|
|
</Admonition>
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
If OPI_Tools.IsWindows() Then
|
|
Extension = "https://hut.openintegrations.dev/test_data/uuid.dll"; // URL, Path or Binary Data
|
|
Else
|
|
Extension = "https://hut.openintegrations.dev/test_data/uuid.so"; // URL, Path or Binary Data
|
|
EndIf;
|
|
|
|
Base = "/tmp/vnnmoosn.qqb.sqlite";
|
|
EntryPoint = "sqlite3_uuid_init";
|
|
|
|
Connection = OPI_SQLite.CreateConnection(Base);
|
|
Result = OPI_SQLite.ConnectExtension(Extension, EntryPoint, Connection);
|
|
```
|
|
|
|
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"result": true
|
|
}
|
|
```
|