mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-25 21:39:21 +02:00
Main build (Jenkins)
This commit is contained in:
parent
4b64125c44
commit
cca4145cce
62
.github/workflows/oint_test_full_ru.yml
vendored
62
.github/workflows/oint_test_full_ru.yml
vendored
@ -1305,9 +1305,51 @@ jobs:
|
||||
key: logs-S3
|
||||
path: ./docs/ru/results/S3
|
||||
|
||||
|
||||
Testing-MongoDB:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Decode, Build]
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- uses: otymko/setup-onescript@v1.4
|
||||
with:
|
||||
version: 1.9.1
|
||||
|
||||
- name: Получить тестовые данные из кэша
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
key: test-data
|
||||
path: ./data.json
|
||||
|
||||
- name: Установить asserts и 1testrunner
|
||||
run: |
|
||||
opm install asserts
|
||||
opm install 1testrunner
|
||||
|
||||
- name: Установить OInt
|
||||
run: |
|
||||
TEMP_DEB="$(mktemp)" &&
|
||||
wget -O "$TEMP_DEB" 'https://api.athenaeum.digital/tc/job/Release/lastSuccessfulBuild/artifact/1.16.1/oint_1.16.1_all_ru.deb' &&
|
||||
sudo dpkg -i "$TEMP_DEB"
|
||||
rm -f "$TEMP_DEB"
|
||||
|
||||
|
||||
|
||||
- name: Управление базами данных
|
||||
if: ${{ cancelled() }} == false
|
||||
run: oscript /home/runner/.local/share/ovm/current/lib/1testrunner/src/main.os -run ./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os "CLI_Mongo_УправлениеБазамиДанных"
|
||||
|
||||
- name: Записать логи
|
||||
if: ${{ cancelled() }} == false
|
||||
uses: actions/cache/save@v3
|
||||
with:
|
||||
key: logs-MongoDB
|
||||
path: ./docs/ru/results/MongoDB
|
||||
|
||||
Encode:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Testing-Telegram,Testing-VK,Testing-Viber,Testing-Twitter,Testing-YandexDisk,Testing-GoogleWorkspace,Testing-GoogleCalendar,Testing-GoogleDrive,Testing-GoogleSheets,Testing-Notion,Testing-Slack,Testing-Airtable,Testing-Dropbox,Testing-Bitrix24,Testing-VkTeams,Testing-Ozon,Testing-Neocities,Testing-CDEK,Testing-YandexMetrika,Testing-S3]
|
||||
needs: [Testing-Telegram,Testing-VK,Testing-Viber,Testing-Twitter,Testing-YandexDisk,Testing-GoogleWorkspace,Testing-GoogleCalendar,Testing-GoogleDrive,Testing-GoogleSheets,Testing-Notion,Testing-Slack,Testing-Airtable,Testing-Dropbox,Testing-Bitrix24,Testing-VkTeams,Testing-Ozon,Testing-Neocities,Testing-CDEK,Testing-YandexMetrika,Testing-S3,Testing-MongoDB]
|
||||
if: ${{ always() }}
|
||||
permissions:
|
||||
contents: write
|
||||
@ -1655,6 +1697,22 @@ jobs:
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=logs-S3"
|
||||
|
||||
- name: Получить логи MongoDB
|
||||
uses: actions/cache/restore@v3
|
||||
with:
|
||||
key: logs-MongoDB
|
||||
path: ./docs/ru/results/MongoDB
|
||||
|
||||
|
||||
- name: Очистка логов MongoDB
|
||||
run: |
|
||||
curl -L \
|
||||
-X DELETE \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.TOKEN }}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"https://api.github.com/repos/Bayselonarrend/OpenIntegrations/actions/caches?key=logs-MongoDB"
|
||||
|
||||
|
||||
- name: Записать данные
|
||||
uses: stefanzweifel/git-auto-commit-action@v5
|
||||
@ -1667,7 +1725,7 @@ jobs:
|
||||
|
||||
Clear-Cache:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Dropbox, Testing-Bitrix24, Testing-VkTeams, Testing-Ozon, Testing-Neocities, Testing-CDEK, Testing-YandexMetrika, Testing-S3, Encode]
|
||||
needs: [Testing-Telegram, Testing-VK, Testing-Viber, Testing-Twitter, Testing-YandexDisk, Testing-GoogleWorkspace, Testing-GoogleCalendar, Testing-GoogleDrive, Testing-GoogleSheets, Testing-Notion, Testing-Slack, Testing-Airtable, Testing-Dropbox, Testing-Bitrix24, Testing-VkTeams, Testing-Ozon, Testing-Neocities, Testing-CDEK, Testing-YandexMetrika, Testing-S3, Testing-MongoDB, Encode]
|
||||
if: ${{ always() }}
|
||||
steps:
|
||||
- name: Очистка основного кэша
|
||||
|
@ -656,6 +656,17 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-MongoDB') {
|
||||
steps {
|
||||
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_ТестыCLI.os" "CLI_Mongo_УправлениеБазамиДанных"'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
|
16
ci/clitesten
16
ci/clitesten
@ -56,6 +56,11 @@ pipeline {
|
||||
test_google()
|
||||
}
|
||||
}
|
||||
stage('mongodb'){
|
||||
steps{
|
||||
test_mongodb()
|
||||
}
|
||||
}
|
||||
stage('neocities'){
|
||||
steps{
|
||||
test_neocities()
|
||||
@ -1334,6 +1339,16 @@ def test_google(){
|
||||
}
|
||||
|
||||
|
||||
def test_mongodb(){
|
||||
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe mongodb GetListOfBases --connect "test" --debug --test '
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
def test_neocities(){
|
||||
|
||||
|
||||
@ -2672,6 +2687,7 @@ test_gcalendar()
|
||||
test_gdrive()
|
||||
test_gsheets()
|
||||
test_google()
|
||||
test_mongodb()
|
||||
test_neocities()
|
||||
test_notion()
|
||||
test_ozon()
|
||||
|
16
ci/clitestru
16
ci/clitestru
@ -56,6 +56,11 @@ pipeline {
|
||||
test_google()
|
||||
}
|
||||
}
|
||||
stage('mongodb'){
|
||||
steps{
|
||||
test_mongodb()
|
||||
}
|
||||
}
|
||||
stage('neocities'){
|
||||
steps{
|
||||
test_neocities()
|
||||
@ -1334,6 +1339,16 @@ def test_google(){
|
||||
}
|
||||
|
||||
|
||||
def test_mongodb(){
|
||||
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe mongodb ПолучитьСписокБаз --connect "test" --debug --test '
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
def test_neocities(){
|
||||
|
||||
|
||||
@ -2672,6 +2687,7 @@ test_gcalendar()
|
||||
test_gdrive()
|
||||
test_gsheets()
|
||||
test_google()
|
||||
test_mongodb()
|
||||
test_neocities()
|
||||
test_notion()
|
||||
test_ozon()
|
||||
|
11
ci/ostestru
11
ci/ostestru
@ -656,6 +656,17 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Testing-MongoDB') {
|
||||
steps {
|
||||
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'1testrunner -run "./src/ru/OInt/tests/Modules/internal/OPI_Тесты.os" "Mongo_УправлениеБазамиДанных"'
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
post{
|
||||
always{
|
||||
|
3
docs/en/data/MongoDB/GetListOfBases.json
Normal file
3
docs/en/data/MongoDB/GetListOfBases.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"ConnectionString": "mongodb://bayselonarrend:12We3456@93.125.42.204:27017"
|
||||
}
|
3
docs/en/examples/MongoDB/GetListOfBases.txt
Normal file
3
docs/en/examples/MongoDB/GetListOfBases.txt
Normal file
@ -0,0 +1,3 @@
|
||||
ConnectionString = "mongodb://bayselonarrend:12We3456@93.125.42.204:27017";
|
||||
|
||||
Result = OPI_MongoDB.GetListOfBases(ConnectionString);
|
39
docs/en/md/MongoDB/Database-management/Get-list-of-bases.mdx
Normal file
39
docs/en/md/MongoDB/Database-management/Get-list-of-bases.mdx
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Get list of bases
|
||||
Gets a list of bases
|
||||
|
||||
|
||||
|
||||
`Function GetListOfBases(Val ConnectionString) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
| ConnectionString | --connect | String | ✔ | Connection string to MongoDB server |
|
||||
|
||||
|
||||
Returns: Structure of KeyAndValue - serialized JSON response from MongoDB server
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method in MongoDB documentation: [listDatabases](https://mongodb.com/docs/manual/reference/command/listDatabases/)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
ConnectionString = "mongodb://bayselonarrend:12We3456@93.125.42.204:27017";
|
||||
|
||||
Result = OPI_MongoDB.GetListOfBases(ConnectionString);
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
docs/en/md/MongoDB/Database-management/_category_.json
Normal file
4
docs/en/md/MongoDB/Database-management/_category_.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Database management",
|
||||
"position": "2"
|
||||
}
|
3
docs/ru/data/MongoDB/ПолучитьСписокБаз.json
Normal file
3
docs/ru/data/MongoDB/ПолучитьСписокБаз.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"СтрокаПодключения": "mongodb://bayselonarrend:12We3456@93.125.42.204:27017"
|
||||
}
|
3
docs/ru/examples/MongoDB/ПолучитьСписокБаз.txt
Normal file
3
docs/ru/examples/MongoDB/ПолучитьСписокБаз.txt
Normal file
@ -0,0 +1,3 @@
|
||||
СтрокаПодключения = "mongodb://bayselonarrend:12We3456@93.125.42.204:27017";
|
||||
|
||||
Результат = OPI_MongoDB.ПолучитьСписокБаз(СтрокаПодключения);
|
39
docs/ru/md/MongoDB/Database-management/Get-list-of-bases.mdx
Normal file
39
docs/ru/md/MongoDB/Database-management/Get-list-of-bases.mdx
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Получить список баз
|
||||
Получает список баз
|
||||
|
||||
|
||||
|
||||
`Функция ПолучитьСписокБаз(Знач СтрокаПодключения) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
| СтрокаПодключения | --connect | Строка | ✔ | Строка подключения к серверу MongoDB |
|
||||
|
||||
|
||||
Возвращаемое значение: Структура Из КлючИЗначение - сериализованный JSON ответа от сервера MongoDB
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Метод в документации MongoDB: [listDatabases](https://mongodb.com/docs/manual/reference/command/listDatabases/)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
СтрокаПодключения = "mongodb://bayselonarrend:12We3456@93.125.42.204:27017";
|
||||
|
||||
Результат = OPI_MongoDB.ПолучитьСписокБаз(СтрокаПодключения);
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
docs/ru/md/MongoDB/Database-management/_category_.json
Normal file
4
docs/ru/md/MongoDB/Database-management/_category_.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Управление базами данных",
|
||||
"position": "2"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
87
src/en/OInt/core/Modules/OPI_MongoDB.os
Normal file
87
src/en/OInt/core/Modules/OPI_MongoDB.os
Normal file
@ -0,0 +1,87 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_MongoDB.os
|
||||
// Lib: MongoDB
|
||||
// CLI: mongodb
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:LineLength-off
|
||||
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check method-too-many-params
|
||||
|
||||
// Uncomment if OneScript is executed
|
||||
#Use "../../tools"
|
||||
|
||||
#Region Public
|
||||
|
||||
#Region DatabaseManagement
|
||||
|
||||
// Get list of bases
|
||||
// Gets a list of bases
|
||||
//
|
||||
// Note
|
||||
// Method in MongoDB documentation: [listDatabases](@mongodb.com/docs/manual/reference/command/listDatabases/)
|
||||
//
|
||||
// Parameters:
|
||||
// ConnectionString - String - Connection string to MongoDB server - connect
|
||||
//
|
||||
// Returns:
|
||||
// Structure of KeyAndValue - serialized JSON response from MongoDB server
|
||||
Function GetListOfBases(Val ConnectionString) Export
|
||||
|
||||
Client = MongoDBClient(ConnectionString);
|
||||
|
||||
Response = Client.ListDatabases();
|
||||
Response = OPI_Tools.JsonToStructure(Response, False);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region Private
|
||||
|
||||
Function MongoDBClient(Val ConnectionString)
|
||||
|
||||
OPI_TypeConversion.GetLine(ConnectionString);
|
||||
|
||||
Client = OPI_Tools.GetAddIn("MongoDB");
|
||||
Client.ConnectionString = ConnectionString;
|
||||
|
||||
Return Client;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
@ -7,6 +7,7 @@
|
||||
<module name="OPI_GoogleDrive" file="core/Modules/OPI_GoogleDrive.os"/>
|
||||
<module name="OPI_GoogleSheets" file="core/Modules/OPI_GoogleSheets.os"/>
|
||||
<module name="OPI_GoogleWorkspace" file="core/Modules/OPI_GoogleWorkspace.os"/>
|
||||
<module name="OPI_MongoDB" file="core/Modules/OPI_MongoDB.os"/>
|
||||
<module name="OPI_Neocities" file="core/Modules/OPI_Neocities.os"/>
|
||||
<module name="OPI_Notion" file="core/Modules/OPI_Notion.os"/>
|
||||
<module name="OPI_Ozon" file="core/Modules/OPI_Ozon.os"/>
|
||||
|
@ -2172,6 +2172,19 @@ EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region MongoDB
|
||||
|
||||
Procedure Mongo_DatabaseManagement() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
OPI_TestDataRetrieval.ParameterToCollection("MDB_CString", TestParameters);
|
||||
|
||||
MongoDB_GetListOfBases(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
@ -15650,6 +15663,22 @@ EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region MongoDB
|
||||
|
||||
Procedure MongoDB_GetListOfBases(FunctionParameters)
|
||||
|
||||
ConnectionString = FunctionParameters["MDB_CString"];
|
||||
|
||||
Result = OPI_MongoDB.GetListOfBases(ConnectionString);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetListOfBases", "MongoDB");
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
@ -69,6 +69,7 @@ Function GetTestingSectionMapping() Export
|
||||
Sections.Insert("CDEK" , 5);
|
||||
Sections.Insert("YandexMetrika" , 5);
|
||||
Sections.Insert("S3" , 5);
|
||||
Sections.Insert("MongoDB" , 5);
|
||||
|
||||
Return Sections;
|
||||
|
||||
@ -100,6 +101,7 @@ Function GetTestingSectionMappingGA() Export
|
||||
Sections.Insert("CDEK" , StandardDependencies);
|
||||
Sections.Insert("YandexMetrika" , StandardDependencies);
|
||||
Sections.Insert("S3" , StandardDependencies);
|
||||
Sections.Insert("MongoDB" , StandardDependencies);
|
||||
|
||||
Return Sections;
|
||||
|
||||
@ -127,6 +129,7 @@ Function GetTestTable() Export
|
||||
Cdek = "CDEK";
|
||||
Metrika = "YandexMetrika";
|
||||
S3_ = "S3";
|
||||
Mongo = "MongoDB";
|
||||
|
||||
TestTable = New ValueTable;
|
||||
TestTable.Columns.Add("Method");
|
||||
@ -258,6 +261,7 @@ Function GetTestTable() Export
|
||||
NewTest(TestTable, "AWS_CommonMethods" , "Common methods" , S3_);
|
||||
NewTest(TestTable, "AWS_BucketsManagement" , "Buckets management" , S3_);
|
||||
NewTest(TestTable, "AWS_ObjectsManagement" , "Objects management" , S3_);
|
||||
NewTest(TestTable, "Mongo_DatabaseManagement" , "Database management" , Mongo);
|
||||
|
||||
Return TestTable;
|
||||
|
||||
@ -488,10 +492,7 @@ EndProcedure
|
||||
|
||||
Function ExecuteTestCLI(Val Library, Val Method, Val Options) Export
|
||||
|
||||
SystemInfo = New SystemInfo;
|
||||
OperatingSystem = String(SystemInfo.PlatformType);
|
||||
|
||||
If StrFind(Lower(OperatingSystem), "windows") > 0 Then
|
||||
If OPI_Tools.IsWindows() Then
|
||||
|
||||
Oint = """C:/Program Files/OneScript/bin/oint.bat""";
|
||||
//"""C:\Program Files (x86)\OInt\bin\oint.bat""";
|
||||
|
@ -430,7 +430,7 @@ EndFunction
|
||||
|
||||
#Region JSON
|
||||
|
||||
Function JsonToStructure(Val Text) Export
|
||||
Function JsonToStructure(Val Text, Val ToMap = True) Export
|
||||
|
||||
If Not ValueIsFilled(Text) Then
|
||||
Return "";
|
||||
@ -441,7 +441,7 @@ Function JsonToStructure(Val Text) Export
|
||||
JSONReader = New JSONReader;
|
||||
JSONReader.SetString(Text);
|
||||
|
||||
Data = ReadJSON(JSONReader, True, Undefined, JSONDateFormat.ISO);
|
||||
Data = ReadJSON(JSONReader, ToMap, Undefined, JSONDateFormat.ISO);
|
||||
JSONReader.Close();
|
||||
|
||||
Return Data;
|
||||
@ -1028,14 +1028,20 @@ Function CreateStream(Val FilePath = Undefined) Export
|
||||
|
||||
EndFunction
|
||||
|
||||
Function GetAddIn(Val TemplateName, Val AddInName, Val Class, Val Reinstall = False) Export
|
||||
Function GetAddIn(Val AddInName, Val Class = "Main") Export
|
||||
|
||||
AddIn = Undefined;
|
||||
AddIn = Undefined;
|
||||
AddInName = "OPI_" + AddInName;
|
||||
|
||||
If Not InitializeAddIn(AddInName, Class, AddIn) Or Reinstall Then
|
||||
If Not InitializeAddIn(AddInName, Class, AddIn) Then
|
||||
|
||||
AttachAddInOnServer(TemplateName, AddInName);
|
||||
InitializeAddIn(AddInName, Class, AddIn);
|
||||
AttachAddInOnServer(AddInName);
|
||||
Success = InitializeAddIn(AddInName, Class, AddIn);
|
||||
|
||||
If Not Success Then
|
||||
Raise "Failed to initialize AddIn. "
|
||||
+ "It may not be compatible with your OS";
|
||||
EndIf;
|
||||
|
||||
EndIf;
|
||||
|
||||
@ -1043,6 +1049,17 @@ Function GetAddIn(Val TemplateName, Val AddInName, Val Class, Val Reinstall = Fa
|
||||
|
||||
EndFunction
|
||||
|
||||
Function IsWindows() Export
|
||||
|
||||
SystemInfo = New SystemInfo;
|
||||
OperatingSystem = String(SystemInfo.PlatformType);
|
||||
|
||||
Response = StrFind(Lower(OperatingSystem), "windows") > 0;
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
@ -1521,24 +1538,36 @@ Function InitializeAddIn(Val AddInName, Val Class, AddIn)
|
||||
|
||||
Try
|
||||
AddIn = New("AddIn." + AddInName + "." + Class);
|
||||
Return False;
|
||||
Return True;
|
||||
Except
|
||||
Return False;
|
||||
EndTry;
|
||||
|
||||
EndFunction
|
||||
|
||||
Procedure AttachAddInOnServer(Val TemplateName, Val AddInName)
|
||||
Function AttachAddInOnServer(Val AddInName)
|
||||
|
||||
If IsOneScript() Then
|
||||
TemplateName = AddInsFolderOS() + TemplateName + ".dll";
|
||||
IsWindows = IsWindows();
|
||||
|
||||
If IsWindows() Then
|
||||
Postfix = "_W";
|
||||
Extension = ".dll";
|
||||
Else
|
||||
Postfix = "_L";
|
||||
Extension = ".so";
|
||||
EndIf;
|
||||
|
||||
AttachAddIn(TemplateName,
|
||||
AddInName,
|
||||
AddInType.Native);
|
||||
TemplateName = AddInName + Postfix;
|
||||
|
||||
EndProcedure
|
||||
If IsOneScript() Then
|
||||
TemplateName = AddInsFolderOS() + AddInName + Extension;
|
||||
Else
|
||||
TemplateName = "CommonTemplate." + TemplateName;
|
||||
EndIf;
|
||||
|
||||
Return AttachAddIn(TemplateName, AddInName, AddInType.Native);
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
|
87
src/en/OPI/src/CommonModules/OPI_MongoDB/Module.bsl
Normal file
87
src/en/OPI/src/CommonModules/OPI_MongoDB/Module.bsl
Normal file
@ -0,0 +1,87 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_MongoDB.os
|
||||
// Lib: MongoDB
|
||||
// CLI: mongodb
|
||||
|
||||
// MIT License
|
||||
|
||||
// Copyright (c) 2023 Anton Tsitavets
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
// https://github.com/Bayselonarrend/OpenIntegrations
|
||||
|
||||
// BSLLS:Typo-off
|
||||
// BSLLS:LatinAndCyrillicSymbolInWord-off
|
||||
// BSLLS:IncorrectLineBreak-off
|
||||
// BSLLS:NumberOfOptionalParams-off
|
||||
// BSLLS:UsingServiceTag-off
|
||||
// BSLLS:LineLength-off
|
||||
|
||||
//@skip-check module-structure-top-region
|
||||
//@skip-check module-structure-method-in-regions
|
||||
//@skip-check wrong-string-literal-content
|
||||
//@skip-check method-too-many-params
|
||||
|
||||
// Uncomment if OneScript is executed
|
||||
// #Use "../../tools"
|
||||
|
||||
#Region Public
|
||||
|
||||
#Region DatabaseManagement
|
||||
|
||||
// Get list of bases
|
||||
// Gets a list of bases
|
||||
//
|
||||
// Note
|
||||
// Method in MongoDB documentation: [listDatabases](@mongodb.com/docs/manual/reference/command/listDatabases/)
|
||||
//
|
||||
// Parameters:
|
||||
// ConnectionString - String - Connection string to MongoDB server - connect
|
||||
//
|
||||
// Returns:
|
||||
// Structure of KeyAndValue - serialized JSON response from MongoDB server
|
||||
Function GetListOfBases(Val ConnectionString) Export
|
||||
|
||||
Client = MongoDBClient(ConnectionString);
|
||||
|
||||
Response = Client.ListDatabases();
|
||||
Response = OPI_Tools.JsonToStructure(Response, False);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region Private
|
||||
|
||||
Function MongoDBClient(Val ConnectionString)
|
||||
|
||||
OPI_TypeConversion.GetLine(ConnectionString);
|
||||
|
||||
Client = OPI_Tools.GetAddIn("MongoDB");
|
||||
Client.ConnectionString = ConnectionString;
|
||||
|
||||
Return Client;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
11
src/en/OPI/src/CommonModules/OPI_MongoDB/OPI_MongoDB.mdo
Normal file
11
src/en/OPI/src/CommonModules/OPI_MongoDB/OPI_MongoDB.mdo
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonModule xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="cb8b083f-acaa-4881-ac1f-669b0eebd1ab">
|
||||
<name>OPI_MongoDB</name>
|
||||
<synonym>
|
||||
<key></key>
|
||||
<value>OPI mongo DB</value>
|
||||
</synonym>
|
||||
<server>true</server>
|
||||
<externalConnection>true</externalConnection>
|
||||
<clientOrdinaryApplication>true</clientOrdinaryApplication>
|
||||
</mdclass:CommonModule>
|
@ -69,6 +69,7 @@ Function GetTestingSectionMapping() Export
|
||||
Sections.Insert("CDEK" , 5);
|
||||
Sections.Insert("YandexMetrika" , 5);
|
||||
Sections.Insert("S3" , 5);
|
||||
Sections.Insert("MongoDB" , 5);
|
||||
|
||||
Return Sections;
|
||||
|
||||
@ -100,6 +101,7 @@ Function GetTestingSectionMappingGA() Export
|
||||
Sections.Insert("CDEK" , StandardDependencies);
|
||||
Sections.Insert("YandexMetrika" , StandardDependencies);
|
||||
Sections.Insert("S3" , StandardDependencies);
|
||||
Sections.Insert("MongoDB" , StandardDependencies);
|
||||
|
||||
Return Sections;
|
||||
|
||||
@ -127,6 +129,7 @@ Function GetTestTable() Export
|
||||
Cdek = "CDEK";
|
||||
Metrika = "YandexMetrika";
|
||||
S3_ = "S3";
|
||||
Mongo = "MongoDB";
|
||||
|
||||
TestTable = New ValueTable;
|
||||
TestTable.Columns.Add("Method");
|
||||
@ -258,6 +261,7 @@ Function GetTestTable() Export
|
||||
NewTest(TestTable, "AWS_CommonMethods" , "Common methods" , S3_);
|
||||
NewTest(TestTable, "AWS_BucketsManagement" , "Buckets management" , S3_);
|
||||
NewTest(TestTable, "AWS_ObjectsManagement" , "Objects management" , S3_);
|
||||
NewTest(TestTable, "Mongo_DatabaseManagement" , "Database management" , Mongo);
|
||||
|
||||
Return TestTable;
|
||||
|
||||
@ -488,10 +492,7 @@ EndProcedure
|
||||
|
||||
Function ExecuteTestCLI(Val Library, Val Method, Val Options) Export
|
||||
|
||||
SystemInfo = New SystemInfo;
|
||||
OperatingSystem = String(SystemInfo.PlatformType);
|
||||
|
||||
If StrFind(Lower(OperatingSystem), "windows") > 0 Then
|
||||
If OPI_Tools.IsWindows() Then
|
||||
|
||||
Oint = """C:/Program Files/OneScript/bin/oint.bat""";
|
||||
//"""C:\Program Files (x86)\OInt\bin\oint.bat""";
|
||||
|
@ -2172,6 +2172,19 @@ EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region MongoDB
|
||||
|
||||
Procedure Mongo_DatabaseManagement() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
OPI_TestDataRetrieval.ParameterToCollection("MDB_CString", TestParameters);
|
||||
|
||||
MongoDB_GetListOfBases(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
@ -15650,6 +15663,22 @@ EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region MongoDB
|
||||
|
||||
Procedure MongoDB_GetListOfBases(FunctionParameters)
|
||||
|
||||
ConnectionString = FunctionParameters["MDB_CString"];
|
||||
|
||||
Result = OPI_MongoDB.GetListOfBases(ConnectionString);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetListOfBases", "MongoDB");
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
@ -430,7 +430,7 @@ EndFunction
|
||||
|
||||
#Region JSON
|
||||
|
||||
Function JsonToStructure(Val Text) Export
|
||||
Function JsonToStructure(Val Text, Val ToMap = True) Export
|
||||
|
||||
If Not ValueIsFilled(Text) Then
|
||||
Return "";
|
||||
@ -441,7 +441,7 @@ Function JsonToStructure(Val Text) Export
|
||||
JSONReader = New JSONReader;
|
||||
JSONReader.SetString(Text);
|
||||
|
||||
Data = ReadJSON(JSONReader, True, Undefined, JSONDateFormat.ISO);
|
||||
Data = ReadJSON(JSONReader, ToMap, Undefined, JSONDateFormat.ISO);
|
||||
JSONReader.Close();
|
||||
|
||||
Return Data;
|
||||
@ -1028,14 +1028,20 @@ Function CreateStream(Val FilePath = Undefined) Export
|
||||
|
||||
EndFunction
|
||||
|
||||
Function GetAddIn(Val TemplateName, Val AddInName, Val Class, Val Reinstall = False) Export
|
||||
Function GetAddIn(Val AddInName, Val Class = "Main") Export
|
||||
|
||||
AddIn = Undefined;
|
||||
AddIn = Undefined;
|
||||
AddInName = "OPI_" + AddInName;
|
||||
|
||||
If Not InitializeAddIn(AddInName, Class, AddIn) Or Reinstall Then
|
||||
If Not InitializeAddIn(AddInName, Class, AddIn) Then
|
||||
|
||||
AttachAddInOnServer(TemplateName, AddInName);
|
||||
InitializeAddIn(AddInName, Class, AddIn);
|
||||
AttachAddInOnServer(AddInName);
|
||||
Success = InitializeAddIn(AddInName, Class, AddIn);
|
||||
|
||||
If Not Success Then
|
||||
Raise "Failed to initialize AddIn. "
|
||||
+ "It may not be compatible with your OS";
|
||||
EndIf;
|
||||
|
||||
EndIf;
|
||||
|
||||
@ -1043,6 +1049,17 @@ Function GetAddIn(Val TemplateName, Val AddInName, Val Class, Val Reinstall = Fa
|
||||
|
||||
EndFunction
|
||||
|
||||
Function IsWindows() Export
|
||||
|
||||
SystemInfo = New SystemInfo;
|
||||
OperatingSystem = String(SystemInfo.PlatformType);
|
||||
|
||||
Response = StrFind(Lower(OperatingSystem), "windows") > 0;
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
@ -1521,24 +1538,36 @@ Function InitializeAddIn(Val AddInName, Val Class, AddIn)
|
||||
|
||||
Try
|
||||
AddIn = New("AddIn." + AddInName + "." + Class);
|
||||
Return False;
|
||||
Return True;
|
||||
Except
|
||||
Return False;
|
||||
EndTry;
|
||||
|
||||
EndFunction
|
||||
|
||||
Procedure AttachAddInOnServer(Val TemplateName, Val AddInName)
|
||||
Function AttachAddInOnServer(Val AddInName)
|
||||
|
||||
If IsOneScript() Then
|
||||
TemplateName = AddInsFolderOS() + TemplateName + ".dll";
|
||||
IsWindows = IsWindows();
|
||||
|
||||
If IsWindows() Then
|
||||
Postfix = "_W";
|
||||
Extension = ".dll";
|
||||
Else
|
||||
Postfix = "_L";
|
||||
Extension = ".so";
|
||||
EndIf;
|
||||
|
||||
AttachAddIn(TemplateName,
|
||||
AddInName,
|
||||
AddInType.Native);
|
||||
TemplateName = AddInName + Postfix;
|
||||
|
||||
EndProcedure
|
||||
If IsOneScript() Then
|
||||
TemplateName = AddInsFolderOS() + AddInName + Extension;
|
||||
Else
|
||||
TemplateName = "CommonTemplate." + TemplateName;
|
||||
EndIf;
|
||||
|
||||
Return AttachAddIn(TemplateName, AddInName, AddInType.Native);
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonTemplate xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="c61532fa-8d2c-4b20-8609-b1ad7beac4f1">
|
||||
<name>OPI_TCPClient</name>
|
||||
<mdclass:CommonTemplate xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="42f54cff-0a7f-4441-9d1b-72b9f85fac65">
|
||||
<name>OPI_MongoDB_L</name>
|
||||
<synonym>
|
||||
<key></key>
|
||||
<value>OPI TCPClient</value>
|
||||
<value>OPI mongo d b L</value>
|
||||
</synonym>
|
||||
<templateType>BinaryData</templateType>
|
||||
<templateType>AddIn</templateType>
|
||||
</mdclass:CommonTemplate>
|
BIN
src/en/OPI/src/CommonTemplates/OPI_MongoDB_L/Template.addin
Normal file
BIN
src/en/OPI/src/CommonTemplates/OPI_MongoDB_L/Template.addin
Normal file
Binary file not shown.
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mdclass:CommonTemplate xmlns:mdclass="http://g5.1c.ru/v8/dt/metadata/mdclass" uuid="70143739-b2c8-46d9-a320-c523b7cba689">
|
||||
<name>OPI_MongoDB_W</name>
|
||||
<synonym>
|
||||
<key></key>
|
||||
<value>OPI mongo d b W</value>
|
||||
</synonym>
|
||||
<templateType>AddIn</templateType>
|
||||
</mdclass:CommonTemplate>
|
BIN
src/en/OPI/src/CommonTemplates/OPI_MongoDB_W/Template.addin
Normal file
BIN
src/en/OPI/src/CommonTemplates/OPI_MongoDB_W/Template.addin
Normal file
Binary file not shown.
Binary file not shown.
@ -39,7 +39,8 @@
|
||||
<value>https://github.com/Bayselonarrend/OpenIntegrations</value>
|
||||
</configurationInformationAddress>
|
||||
<subsystems>Subsystem.OPI_Integrations</subsystems>
|
||||
<commonTemplates>CommonTemplate.OPI_TCPClient</commonTemplates>
|
||||
<commonTemplates>CommonTemplate.OPI_MongoDB_W</commonTemplates>
|
||||
<commonTemplates>CommonTemplate.OPI_MongoDB_L</commonTemplates>
|
||||
<commonModules>CommonModule.OPI_Tools</commonModules>
|
||||
<commonModules>CommonModule.OPI_Cryptography</commonModules>
|
||||
<commonModules>CommonModule.OPI_TypeConversion</commonModules>
|
||||
@ -53,6 +54,7 @@
|
||||
<commonModules>CommonModule.OPI_GoogleWorkspace</commonModules>
|
||||
<commonModules>CommonModule.OPI_Neocities</commonModules>
|
||||
<commonModules>CommonModule.OPI_Ozon</commonModules>
|
||||
<commonModules>CommonModule.OPI_MongoDB</commonModules>
|
||||
<commonModules>CommonModule.OPI_Notion</commonModules>
|
||||
<commonModules>CommonModule.OPI_Slack</commonModules>
|
||||
<commonModules>CommonModule.OPI_S3</commonModules>
|
||||
|
25
src/en/cli/data/Classes/internal/Classes/mongodb.os
Normal file
25
src/en/cli/data/Classes/internal/Classes/mongodb.os
Normal file
@ -0,0 +1,25 @@
|
||||
Function ПолучитьСостав() Export
|
||||
|
||||
CompositionTable = New ValueTable();
|
||||
CompositionTable.Columns.Add("Библиотека");
|
||||
CompositionTable.Columns.Add("Модуль");
|
||||
CompositionTable.Columns.Add("Метод");
|
||||
CompositionTable.Columns.Add("МетодПоиска");
|
||||
CompositionTable.Columns.Add("Параметр");
|
||||
CompositionTable.Columns.Add("Описание");
|
||||
CompositionTable.Columns.Add("ОписаниеМетода");
|
||||
CompositionTable.Columns.Add("Область");
|
||||
|
||||
NewLine = CompositionTable.Add();
|
||||
NewLine.Библиотека = "mongodb";
|
||||
NewLine.Модуль = "OPI_MongoDB";
|
||||
NewLine.Метод = "GetListOfBases";
|
||||
NewLine.МетодПоиска = "GETLISTOFBASES";
|
||||
NewLine.Параметр = "--connect";
|
||||
NewLine.Описание = "Connection string to MongoDB server";
|
||||
NewLine.Область = "Database management";
|
||||
NewLine.ОписаниеМетода = "Gets a list of bases";
|
||||
|
||||
Return CompositionTable;
|
||||
EndFunction
|
||||
|
@ -15,6 +15,7 @@
|
||||
СоответствиеКомандМодулей.Вставить("gdrive", "OPI_GoogleDrive");
|
||||
СоответствиеКомандМодулей.Вставить("gsheets", "OPI_GoogleSheets");
|
||||
СоответствиеКомандМодулей.Вставить("google", "OPI_GoogleWorkspace");
|
||||
СоответствиеКомандМодулей.Вставить("mongodb", "OPI_MongoDB");
|
||||
СоответствиеКомандМодулей.Вставить("neocities", "OPI_Neocities");
|
||||
СоответствиеКомандМодулей.Вставить("notion", "OPI_Notion");
|
||||
СоответствиеКомандМодулей.Вставить("ozon", "OPI_Ozon");
|
||||
|
@ -47,24 +47,24 @@
|
||||
|
||||
// Получить список баз
|
||||
// Получает список баз
|
||||
//
|
||||
//
|
||||
// Примечание:
|
||||
// Метод в документации MongoDB: [listDatabases](@mongodb.com/docs/manual/reference/command/listDatabases/)
|
||||
//
|
||||
//
|
||||
// Параметры:
|
||||
// СтрокаПодключения - Строка - Строка подключения к серверу MongoDB - connect
|
||||
//
|
||||
//
|
||||
// Возвращаемое значение:
|
||||
// Структура Из КлючИЗначение - сериализованный JSON ответа от сервера MongoDB
|
||||
Функция ПолучитьСписокБаз(Знач СтрокаПодключения) Экспорт
|
||||
|
||||
Клиент = КлиентMongoDB(СтрокаПодключения);
|
||||
|
||||
Ответ = Клиент.ListDatabases();
|
||||
Ответ = OPI_Инструменты.JsonВСтруктуру(Ответ, Ложь);
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
|
||||
Клиент = КлиентMongoDB(СтрокаПодключения);
|
||||
|
||||
Ответ = Клиент.ListDatabases();
|
||||
Ответ = OPI_Инструменты.JsonВСтруктуру(Ответ, Ложь);
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
КонецФункции
|
||||
|
||||
#КонецОбласти
|
||||
@ -74,14 +74,14 @@
|
||||
#Область СлужебныеПроцедурыИФункции
|
||||
|
||||
Функция КлиентMongoDB(Знач СтрокаПодключения)
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(СтрокаПодключения);
|
||||
|
||||
Клиент = OPI_Инструменты.ПолучитьКомпоненту("MongoDB");
|
||||
Клиент.ConnectionString = СтрокаПодключения;
|
||||
|
||||
Возврат Клиент;
|
||||
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(СтрокаПодключения);
|
||||
|
||||
Клиент = OPI_Инструменты.ПолучитьКомпоненту("MongoDB");
|
||||
Клиент.ConnectionString = СтрокаПодключения;
|
||||
|
||||
Возврат Клиент;
|
||||
|
||||
КонецФункции
|
||||
|
||||
#КонецОбласти
|
||||
|
@ -15666,15 +15666,15 @@
|
||||
#Область MongoDB
|
||||
|
||||
Процедура MongoDB_ПолучитьСписокБаз(ПараметрыФункции)
|
||||
|
||||
СтрокаПодключения = ПараметрыФункции["MDB_CString"];
|
||||
|
||||
СтрокаПодключения = ПараметрыФункции["MDB_CString"];
|
||||
|
||||
Результат = OPI_MongoDB.ПолучитьСписокБаз(СтрокаПодключения);
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьСписокБаз", "MongoDB");
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
|
@ -69,7 +69,7 @@
|
||||
Разделы.Вставить("CDEK" , 5);
|
||||
Разделы.Вставить("YandexMetrika" , 5);
|
||||
Разделы.Вставить("S3" , 5);
|
||||
Разделы.Вставить("MongoDB" , 5);
|
||||
Разделы.Вставить("MongoDB" , 5);
|
||||
|
||||
Возврат Разделы;
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
Разделы.Вставить("CDEK" , СтандартныеЗависимости);
|
||||
Разделы.Вставить("YandexMetrika" , СтандартныеЗависимости);
|
||||
Разделы.Вставить("S3" , СтандартныеЗависимости);
|
||||
Разделы.Вставить("MongoDB" , СтандартныеЗависимости);
|
||||
Разделы.Вставить("MongoDB" , СтандартныеЗависимости);
|
||||
|
||||
Возврат Разделы;
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
Сдэк = "CDEK";
|
||||
Метрика = "YandexMetrika";
|
||||
S3_ = "S3";
|
||||
Монго = "MongoDB";
|
||||
Монго = "MongoDB";
|
||||
|
||||
ТаблицаТестов = Новый ТаблицаЗначений;
|
||||
ТаблицаТестов.Колонки.Добавить("Метод");
|
||||
@ -261,7 +261,7 @@
|
||||
НовыйТест(ТаблицаТестов, "AWS_ОбщиеМетоды" , "Общие методы" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "AWS_РаботаСБакетами" , "Работа с бакетами" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "AWS_РаботаСОбъектами" , "Работа с объектами" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "Mongo_УправлениеБазамиДанных" , "Управление базами данных" , Монго);
|
||||
НовыйТест(ТаблицаТестов, "Mongo_УправлениеБазамиДанных" , "Управление базами данных" , Монго);
|
||||
|
||||
Возврат ТаблицаТестов;
|
||||
|
||||
@ -2042,9 +2042,9 @@
|
||||
КонецФункции
|
||||
|
||||
Функция ПолучитьОбщийМодуль(Знач Имя)
|
||||
|
||||
|
||||
Модуль = Вычислить(Имя);
|
||||
|
||||
|
||||
Возврат Модуль;
|
||||
КонецФункции
|
||||
|
||||
|
@ -1030,18 +1030,18 @@
|
||||
|
||||
Функция ПолучитьКомпоненту(Знач ИмяКомпоненты, Знач Класс = "Main") Экспорт
|
||||
|
||||
Компонента = Неопределено;
|
||||
ИмяКомпоненты = "OPI_" + ИмяКомпоненты;
|
||||
Компонента = Неопределено;
|
||||
ИмяКомпоненты = "OPI_" + ИмяКомпоненты;
|
||||
|
||||
Если Не ИнициализироватьВнешнююКомпоненту(ИмяКомпоненты, Класс, Компонента) Тогда
|
||||
|
||||
ПодключитьКомпонентуНаСервере(ИмяКомпоненты);
|
||||
Успех = ИнициализироватьВнешнююКомпоненту(ИмяКомпоненты, Класс, Компонента);
|
||||
|
||||
Если Не Успех Тогда
|
||||
ВызватьИсключение "Не удалось инициализировать внешнюю компоненту. "
|
||||
+ "Возможно, она не подходит для вашей операционной системы";
|
||||
КонецЕсли;
|
||||
|
||||
Если Не Успех Тогда
|
||||
ВызватьИсключение "Не удалось инициализировать внешнюю компоненту. "
|
||||
+ "Возможно, она не подходит для вашей операционной системы";
|
||||
КонецЕсли;
|
||||
|
||||
КонецЕсли;
|
||||
|
||||
@ -1050,14 +1050,14 @@
|
||||
КонецФункции
|
||||
|
||||
Функция ЭтоWindows() Экспорт
|
||||
|
||||
|
||||
СистемнаяИнформация = Новый СистемнаяИнформация;
|
||||
ОперационнаяСистема = Строка(СистемнаяИнформация.ТипПлатформы);
|
||||
|
||||
Ответ = СтрНайти(нРег(ОперационнаяСистема), "windows") > 0;
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
Ответ = СтрНайти(нРег(ОперационнаяСистема), "windows") > 0;
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
КонецФункции
|
||||
|
||||
#КонецОбласти
|
||||
@ -1547,22 +1547,22 @@
|
||||
|
||||
Функция ПодключитьКомпонентуНаСервере(Знач ИмяКомпоненты)
|
||||
|
||||
ЭтоWindows = ЭтоWindows();
|
||||
|
||||
Если ЭтоWindows() Тогда
|
||||
Постфикс = "_W";
|
||||
Расширение = ".dll";
|
||||
Иначе
|
||||
Постфикс = "_L";
|
||||
Расширение = ".so";
|
||||
КонецЕсли;
|
||||
|
||||
ИмяМакета = ИмяКомпоненты + Постфикс;
|
||||
|
||||
ЭтоWindows = ЭтоWindows();
|
||||
|
||||
Если ЭтоWindows() Тогда
|
||||
Постфикс = "_W";
|
||||
Расширение = ".dll";
|
||||
Иначе
|
||||
Постфикс = "_L";
|
||||
Расширение = ".so";
|
||||
КонецЕсли;
|
||||
|
||||
ИмяМакета = ИмяКомпоненты + Постфикс;
|
||||
|
||||
Если ЭтоOneScript() Тогда
|
||||
ИмяМакета = КаталогКомпонентOS() + ИмяКомпоненты + Расширение;
|
||||
Иначе
|
||||
ИмяМакета = "ОбщийМакет." + ИмяМакета;
|
||||
Иначе
|
||||
ИмяМакета = "ОбщийМакет." + ИмяМакета;
|
||||
КонецЕсли;
|
||||
|
||||
Возврат ПодключитьВнешнююКомпоненту(ИмяМакета, ИмяКомпоненты, ТипВнешнейКомпоненты.Native);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Airtable.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Airtable.os
|
||||
// Lib: Airtable
|
||||
// CLI: airtable
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Bitrix24.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Bitrix24.os
|
||||
// Lib: Bitrix24
|
||||
// CLI: bitrix24
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_CDEK.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_CDEK.os
|
||||
// Lib: CDEK
|
||||
// CLI: cdek
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Dropbox.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Dropbox.os
|
||||
// Lib: Dropbox
|
||||
// CLI: dropbox
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_GoogleCalendar.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_GoogleCalendar.os
|
||||
// Lib: Google Calendar
|
||||
// CLI: gcalendar
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_GoogleDrive.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_GoogleDrive.os
|
||||
// Lib: Google Drive
|
||||
// CLI: gdrive
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_GoogleSheets.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_GoogleSheets.os
|
||||
// Lib: Google Sheets
|
||||
// CLI: gsheets
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_GoogleWorkspace.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_GoogleWorkspace.os
|
||||
// Lib: Google Workspace
|
||||
// CLI: google
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_MongoDB.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_MongoDB.os
|
||||
// Lib: MongoDB
|
||||
// CLI: mongodb
|
||||
|
||||
@ -47,24 +47,24 @@
|
||||
|
||||
// Получить список баз
|
||||
// Получает список баз
|
||||
//
|
||||
//
|
||||
// Примечание:
|
||||
// Метод в документации MongoDB: [listDatabases](@mongodb.com/docs/manual/reference/command/listDatabases/)
|
||||
//
|
||||
//
|
||||
// Параметры:
|
||||
// СтрокаПодключения - Строка - Строка подключения к серверу MongoDB - connect
|
||||
//
|
||||
//
|
||||
// Возвращаемое значение:
|
||||
// Структура Из КлючИЗначение - сериализованный JSON ответа от сервера MongoDB
|
||||
Функция ПолучитьСписокБаз(Знач СтрокаПодключения) Экспорт
|
||||
|
||||
Клиент = КлиентMongoDB(СтрокаПодключения);
|
||||
|
||||
Ответ = Клиент.ListDatabases();
|
||||
Ответ = OPI_Инструменты.JsonВСтруктуру(Ответ, Ложь);
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
|
||||
Клиент = КлиентMongoDB(СтрокаПодключения);
|
||||
|
||||
Ответ = Клиент.ListDatabases();
|
||||
Ответ = OPI_Инструменты.JsonВСтруктуру(Ответ, Ложь);
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
КонецФункции
|
||||
|
||||
#КонецОбласти
|
||||
@ -74,14 +74,14 @@
|
||||
#Область СлужебныеПроцедурыИФункции
|
||||
|
||||
Функция КлиентMongoDB(Знач СтрокаПодключения)
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(СтрокаПодключения);
|
||||
|
||||
Клиент = OPI_Инструменты.ПолучитьКомпоненту("MongoDB");
|
||||
Клиент.ConnectionString = СтрокаПодключения;
|
||||
|
||||
Возврат Клиент;
|
||||
|
||||
|
||||
OPI_ПреобразованиеТипов.ПолучитьСтроку(СтрокаПодключения);
|
||||
|
||||
Клиент = OPI_Инструменты.ПолучитьКомпоненту("MongoDB");
|
||||
Клиент.ConnectionString = СтрокаПодключения;
|
||||
|
||||
Возврат Клиент;
|
||||
|
||||
КонецФункции
|
||||
|
||||
#КонецОбласти
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Neocities.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Neocities.os
|
||||
// Lib: Neocities
|
||||
// CLI: neocities
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Notion.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Notion.os
|
||||
// Lib: Notion
|
||||
// CLI: notion
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Ozon.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Ozon.os
|
||||
// Lib: Ozon
|
||||
// CLI: ozon
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_S3.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_S3.os
|
||||
// Lib: S3
|
||||
// CLI: s3
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Slack.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Slack.os
|
||||
// Lib: Slack
|
||||
// CLI: slack
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Telegram.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Telegram.os
|
||||
// Lib: Telegram
|
||||
// CLI: telegram
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Twitter.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Twitter.os
|
||||
// Lib: Twitter
|
||||
// CLI: twitter
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_VK.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_VK.os
|
||||
// Lib: VK
|
||||
// CLI: vk
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_VKTeams.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_VKTeams.os
|
||||
// Lib: VKTeams
|
||||
// CLI: vkteams
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_Viber.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_Viber.os
|
||||
// Lib: Viber
|
||||
// CLI: viber
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_YandexDisk.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_YandexDisk.os
|
||||
// Lib: Yandex Disk
|
||||
// CLI: yadisk
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_YandexID.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_YandexID.os
|
||||
// Lib: Yandex ID
|
||||
// CLI: yandex
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_YandexMarket.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_YandexMarket.os
|
||||
// Lib: Yandex Market
|
||||
// CLI: yamarket
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/core/Modules/OPI_YandexMetrika.os
|
||||
// OneScript: ./OInt/core/Modules/OPI_YandexMetrika.os
|
||||
// Lib: Yandex Metrika
|
||||
// CLI: metrika
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tools/Modules/internal/Modules/OPI_Инструменты.os
|
||||
// OneScript: ./OInt/tools/Modules/internal/Modules/OPI_Инструменты.os
|
||||
|
||||
// MIT License
|
||||
|
||||
@ -1030,18 +1030,18 @@
|
||||
|
||||
Функция ПолучитьКомпоненту(Знач ИмяКомпоненты, Знач Класс = "Main") Экспорт
|
||||
|
||||
Компонента = Неопределено;
|
||||
ИмяКомпоненты = "OPI_" + ИмяКомпоненты;
|
||||
Компонента = Неопределено;
|
||||
ИмяКомпоненты = "OPI_" + ИмяКомпоненты;
|
||||
|
||||
Если Не ИнициализироватьВнешнююКомпоненту(ИмяКомпоненты, Класс, Компонента) Тогда
|
||||
|
||||
ПодключитьКомпонентуНаСервере(ИмяКомпоненты);
|
||||
Успех = ИнициализироватьВнешнююКомпоненту(ИмяКомпоненты, Класс, Компонента);
|
||||
|
||||
Если Не Успех Тогда
|
||||
ВызватьИсключение "Не удалось инициализировать внешнюю компоненту. "
|
||||
+ "Возможно, она не подходит для вашей операционной системы";
|
||||
КонецЕсли;
|
||||
|
||||
Если Не Успех Тогда
|
||||
ВызватьИсключение "Не удалось инициализировать внешнюю компоненту. "
|
||||
+ "Возможно, она не подходит для вашей операционной системы";
|
||||
КонецЕсли;
|
||||
|
||||
КонецЕсли;
|
||||
|
||||
@ -1050,14 +1050,14 @@
|
||||
КонецФункции
|
||||
|
||||
Функция ЭтоWindows() Экспорт
|
||||
|
||||
|
||||
СистемнаяИнформация = Новый СистемнаяИнформация;
|
||||
ОперационнаяСистема = Строка(СистемнаяИнформация.ТипПлатформы);
|
||||
|
||||
Ответ = СтрНайти(нРег(ОперационнаяСистема), "windows") > 0;
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
Ответ = СтрНайти(нРег(ОперационнаяСистема), "windows") > 0;
|
||||
|
||||
Возврат Ответ;
|
||||
|
||||
КонецФункции
|
||||
|
||||
#КонецОбласти
|
||||
@ -1547,22 +1547,22 @@
|
||||
|
||||
Функция ПодключитьКомпонентуНаСервере(Знач ИмяКомпоненты)
|
||||
|
||||
ЭтоWindows = ЭтоWindows();
|
||||
|
||||
Если ЭтоWindows() Тогда
|
||||
Постфикс = "_W";
|
||||
Расширение = ".dll";
|
||||
Иначе
|
||||
Постфикс = "_L";
|
||||
Расширение = ".so";
|
||||
КонецЕсли;
|
||||
|
||||
ИмяМакета = ИмяКомпоненты + Постфикс;
|
||||
|
||||
ЭтоWindows = ЭтоWindows();
|
||||
|
||||
Если ЭтоWindows() Тогда
|
||||
Постфикс = "_W";
|
||||
Расширение = ".dll";
|
||||
Иначе
|
||||
Постфикс = "_L";
|
||||
Расширение = ".so";
|
||||
КонецЕсли;
|
||||
|
||||
ИмяМакета = ИмяКомпоненты + Постфикс;
|
||||
|
||||
Если ЭтоOneScript() Тогда
|
||||
ИмяМакета = КаталогКомпонентOS() + ИмяКомпоненты + Расширение;
|
||||
Иначе
|
||||
ИмяМакета = "ОбщийМакет." + ИмяМакета;
|
||||
Иначе
|
||||
ИмяМакета = "ОбщийМакет." + ИмяМакета;
|
||||
КонецЕсли;
|
||||
|
||||
Возврат ПодключитьВнешнююКомпоненту(ИмяМакета, ИмяКомпоненты, ТипВнешнейКомпоненты.Native);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tools/Modules/internal/Modules/OPI_Криптография.os
|
||||
// OneScript: ./OInt/tools/Modules/internal/Modules/OPI_Криптография.os
|
||||
|
||||
// MIT License
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tools/Modules/OPI_ПолучениеДанныхТестов.os
|
||||
// OneScript: ./OInt/tools/Modules/OPI_ПолучениеДанныхТестов.os
|
||||
|
||||
// MIT License
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
Разделы.Вставить("CDEK" , 5);
|
||||
Разделы.Вставить("YandexMetrika" , 5);
|
||||
Разделы.Вставить("S3" , 5);
|
||||
Разделы.Вставить("MongoDB" , 5);
|
||||
Разделы.Вставить("MongoDB" , 5);
|
||||
|
||||
Возврат Разделы;
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
Разделы.Вставить("CDEK" , СтандартныеЗависимости);
|
||||
Разделы.Вставить("YandexMetrika" , СтандартныеЗависимости);
|
||||
Разделы.Вставить("S3" , СтандартныеЗависимости);
|
||||
Разделы.Вставить("MongoDB" , СтандартныеЗависимости);
|
||||
Разделы.Вставить("MongoDB" , СтандартныеЗависимости);
|
||||
|
||||
Возврат Разделы;
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
Сдэк = "CDEK";
|
||||
Метрика = "YandexMetrika";
|
||||
S3_ = "S3";
|
||||
Монго = "MongoDB";
|
||||
Монго = "MongoDB";
|
||||
|
||||
ТаблицаТестов = Новый ТаблицаЗначений;
|
||||
ТаблицаТестов.Колонки.Добавить("Метод");
|
||||
@ -261,7 +261,7 @@
|
||||
НовыйТест(ТаблицаТестов, "AWS_ОбщиеМетоды" , "Общие методы" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "AWS_РаботаСБакетами" , "Работа с бакетами" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "AWS_РаботаСОбъектами" , "Работа с объектами" , S3_);
|
||||
НовыйТест(ТаблицаТестов, "Mongo_УправлениеБазамиДанных" , "Управление базами данных" , Монго);
|
||||
НовыйТест(ТаблицаТестов, "Mongo_УправлениеБазамиДанных" , "Управление базами данных" , Монго);
|
||||
|
||||
Возврат ТаблицаТестов;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tools/Modules/OPI_ПреобразованиеТипов.os
|
||||
// OneScript: ./OInt/tools/Modules/OPI_ПреобразованиеТипов.os
|
||||
|
||||
// MIT License
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tests/Modules/internal/OPI_Тесты.os
|
||||
// OneScript: ./OInt/tests/Modules/internal/OPI_Тесты.os
|
||||
|
||||
// MIT License
|
||||
|
||||
@ -15666,15 +15666,15 @@
|
||||
#Область MongoDB
|
||||
|
||||
Процедура MongoDB_ПолучитьСписокБаз(ПараметрыФункции)
|
||||
|
||||
СтрокаПодключения = ПараметрыФункции["MDB_CString"];
|
||||
|
||||
СтрокаПодключения = ПараметрыФункции["MDB_CString"];
|
||||
|
||||
Результат = OPI_MongoDB.ПолучитьСписокБаз(СтрокаПодключения);
|
||||
|
||||
// END
|
||||
|
||||
OPI_ПолучениеДанныхТестов.ЗаписатьЛог(Результат, "ПолучитьСписокБаз", "MongoDB");
|
||||
|
||||
|
||||
КонецПроцедуры
|
||||
|
||||
#КонецОбласти
|
||||
|
@ -1,4 +1,4 @@
|
||||
// OneScript: ./OInt/tests/Modules/internal/OPI_ТестыCLI.os
|
||||
// OneScript: ./OInt/tests/Modules/internal/OPI_ТестыCLI.os
|
||||
|
||||
// MIT License
|
||||
|
||||
|
25
src/ru/cli/data/Classes/internal/Classes/mongodb.os
Normal file
25
src/ru/cli/data/Classes/internal/Classes/mongodb.os
Normal file
@ -0,0 +1,25 @@
|
||||
Функция ПолучитьСостав() Экспорт
|
||||
|
||||
ТаблицаСостава = Новый ТаблицаЗначений();
|
||||
ТаблицаСостава.Колонки.Добавить("Библиотека");
|
||||
ТаблицаСостава.Колонки.Добавить("Модуль");
|
||||
ТаблицаСостава.Колонки.Добавить("Метод");
|
||||
ТаблицаСостава.Колонки.Добавить("МетодПоиска");
|
||||
ТаблицаСостава.Колонки.Добавить("Параметр");
|
||||
ТаблицаСостава.Колонки.Добавить("Описание");
|
||||
ТаблицаСостава.Колонки.Добавить("ОписаниеМетода");
|
||||
ТаблицаСостава.Колонки.Добавить("Область");
|
||||
|
||||
НоваяСтрока = ТаблицаСостава.Добавить();
|
||||
НоваяСтрока.Библиотека = "mongodb";
|
||||
НоваяСтрока.Модуль = "OPI_MongoDB";
|
||||
НоваяСтрока.Метод = "ПолучитьСписокБаз";
|
||||
НоваяСтрока.МетодПоиска = "ПОЛУЧИТЬСПИСОКБАЗ";
|
||||
НоваяСтрока.Параметр = "--connect";
|
||||
НоваяСтрока.Описание = "Строка подключения к серверу MongoDB";
|
||||
НоваяСтрока.Область = "Управление базами данных";
|
||||
НоваяСтрока.ОписаниеМетода = "Получает список баз";
|
||||
|
||||
Возврат ТаблицаСостава;
|
||||
КонецФункции
|
||||
|
@ -15,6 +15,7 @@
|
||||
СоответствиеКомандМодулей.Вставить("gdrive", "OPI_GoogleDrive");
|
||||
СоответствиеКомандМодулей.Вставить("gsheets", "OPI_GoogleSheets");
|
||||
СоответствиеКомандМодулей.Вставить("google", "OPI_GoogleWorkspace");
|
||||
СоответствиеКомандМодулей.Вставить("mongodb", "OPI_MongoDB");
|
||||
СоответствиеКомандМодулей.Вставить("neocities", "OPI_Neocities");
|
||||
СоответствиеКомандМодулей.Вставить("notion", "OPI_Notion");
|
||||
СоответствиеКомандМодулей.Вставить("ozon", "OPI_Ozon");
|
||||
|
Loading…
x
Reference in New Issue
Block a user