1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-25 22:12:29 +02:00

Main build (Jenkins)

This commit is contained in:
Vitaly the Alpaca (bot)
2025-04-03 21:52:31 +03:00
parent f871f2346f
commit 111b5a582b
77 changed files with 9772 additions and 6931 deletions

44
docs/en/examples/MySQL/AddRecords.txt vendored Normal file
View File

@@ -0,0 +1,44 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
RecordsArray = New Array;
Image = "https://api.athenaeum.digital/test_data/picture.jpg";
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
CurrentDate = OPI_Tools.GetCurrentDate();
RecordStructure = New Structure;
RecordStructure.Insert("char_field" , New Structure("TEXT" , "AAAAA"));
RecordStructure.Insert("varchar_field" , New Structure("TEXT" , "Some varchar"));
RecordStructure.Insert("tinytext_field" , New Structure("TEXT" , "Some tiny text"));
RecordStructure.Insert("text_field" , New Structure("TEXT" , "Some text"));
RecordStructure.Insert("mediumtext_field", New Structure("TEXT" , "Some medium text"));
RecordStructure.Insert("longtext_field" , New Structure("TEXT" , "Some looooooong text"));
RecordStructure.Insert("tinyint_field" , New Structure("INT" , 127));
RecordStructure.Insert("smallint_field" , New Structure("INT" , -32767));
RecordStructure.Insert("mediumint_field" , New Structure("INT" , 8388607));
RecordStructure.Insert("int_field" , New Structure("INT" , -2147483647));
RecordStructure.Insert("uint_field" , New Structure("UINT" , 4294967295));
RecordStructure.Insert("bigint_field" , New Structure("INT" , 9223372036854775807));
RecordStructure.Insert("float_field" , New Structure("FLOAT" , 100.50));
RecordStructure.Insert("double_field" , New Structure("FLOAT" , 100.512123));
RecordStructure.Insert("date_field" , New Structure("DATE" , CurrentDate));
RecordStructure.Insert("time_field" , New Structure("TIME" , CurrentDate));
RecordStructure.Insert("datetime_field" , New Structure("DATE" , CurrentDate));
RecordStructure.Insert("timestamp_field" , New Structure("DATE" , CurrentDate));
RecordStructure.Insert("mediumblob_field", New Structure("BYTES" , Image));
RecordStructure.Insert("set_field" , New Structure("TEXT" , "one"));
RecordsArray.Add(RecordStructure);
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.AddRecords(Table, RecordsArray, True, ConnectionString);

14
docs/en/examples/MySQL/ClearTable.txt vendored Normal file
View File

@@ -0,0 +1,14 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.ClearTable(Table, ConnectionString);

View File

@@ -0,0 +1,14 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
Base = "testbase1";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.CreateDatabase(Base, ConnectionString);

36
docs/en/examples/MySQL/CreateTable.txt vendored Normal file
View File

@@ -0,0 +1,36 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
ColoumnsStruct = New Structure;
ColoumnsStruct.Insert("char_field" , "CHAR(5)");
ColoumnsStruct.Insert("varchar_field" , "VARCHAR(255)");
ColoumnsStruct.Insert("tinytext_field" , "TINYTEXT");
ColoumnsStruct.Insert("text_field" , "TEXT");
ColoumnsStruct.Insert("mediumtext_field", "MEDIUMTEXT");
ColoumnsStruct.Insert("longtext_field" , "LONGTEXT");
ColoumnsStruct.Insert("tinyint_field" , "TINYINT");
ColoumnsStruct.Insert("smallint_field" , "SMALLINT");
ColoumnsStruct.Insert("mediumint_field" , "MEDIUMINT");
ColoumnsStruct.Insert("int_field" , "INT");
ColoumnsStruct.Insert("uint_field" , "INT UNSIGNED");
ColoumnsStruct.Insert("bigint_field" , "BIGINT");
ColoumnsStruct.Insert("float_field" , "FLOAT");
ColoumnsStruct.Insert("double_field" , "DOUBLE");
ColoumnsStruct.Insert("date_field" , "DATE");
ColoumnsStruct.Insert("time_field" , "TIME");
ColoumnsStruct.Insert("datetime_field" , "DATETIME");
ColoumnsStruct.Insert("timestamp_field" , "TIMESTAMP");
ColoumnsStruct.Insert("mediumblob_field", "MEDIUMBLOB");
ColoumnsStruct.Insert("set_field" , "SET('one','two','three')");
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.CreateTable(Table, ColoumnsStruct, ConnectionString);

View File

@@ -0,0 +1,14 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
Base = "testbase1";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.DeleteDatabase(Base, ConnectionString);

View File

@@ -0,0 +1,33 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "test_data";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "test_data";
Filters = New Array;
FilterStructure = New Structure;
FilterStructure.Insert("field", "gender");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", New Structure("VARCHAR", "Male"));
FilterStructure.Insert("raw" , False);
FilterStructure.Insert("union", "AND");
Filters.Add(FilterStructure);
FilterStructure = New Structure;
FilterStructure.Insert("field", "ip_address");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", New Structure("VARCHAR", "127.0.0.1"));
FilterStructure.Insert("raw" , False);
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.DeleteRecords(Table, Filters, ConnectionString);

14
docs/en/examples/MySQL/DeleteTable.txt vendored Normal file
View File

@@ -0,0 +1,14 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "testtable";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.DeleteTable(Table, ConnectionString);

View File

@@ -50,4 +50,10 @@
Result = OPI_MySQL.ExecuteSQLQuery(QueryText, , , Connection);
// SQL query from file
SQLFile = "https://api.athenaeum.digital/test_data/TEST_DATA2.sql"; // Binary Data, URL or path to file
Result = OPI_MySQL.ExecuteSQLQuery(SQLFile, , , Connection);
Closing = OPI_MySQL.CloseConnection(Connection);

52
docs/en/examples/MySQL/GetRecords.txt vendored Normal file
View File

@@ -0,0 +1,52 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "testbase1";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
// All records without filters
Table = "testtable";
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.GetRecords(Table, , , , , ConnectionString);
// Filter, selected fields, limit and sorting
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, "test_data", Login, Password);
Table = "test_data";
Fields = New Array;
Fields.Add("first_name");
Fields.Add("last_name");
Fields.Add("email");
Filters = New Array;
FilterStructure1 = New Structure;
FilterStructure1.Insert("field", "gender");
FilterStructure1.Insert("type" , "=");
FilterStructure1.Insert("value", "Male");
FilterStructure1.Insert("union", "AND");
FilterStructure1.Insert("raw" , False);
FilterStructure2 = New Structure;
FilterStructure2.Insert("field", "id");
FilterStructure2.Insert("type" , "BETWEEN");
FilterStructure2.Insert("value", "20 AND 50");
FilterStructure2.Insert("raw" , True);
Filters.Add(FilterStructure1);
Filters.Add(FilterStructure2);
Sort = New Structure("ip_address", "DESC");
Count = 5;
Result = OPI_MySQL.GetRecords(Table, Fields, Filters, Sort, Count, ConnectionString);

View File

@@ -0,0 +1 @@
 Result = OPI_MySQL.GetRecordsFilterStrucutre();

View File

@@ -0,0 +1,28 @@
 Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "test_data";
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
Table = "test_data";
FieldsStructure = New Structure;
FieldsStructure.Insert("ip_address", New Structure("VARCHAR", "127.0.0.1"));
Filters = New Array;
FilterStructure = New Structure;
FilterStructure.Insert("field", "gender");
FilterStructure.Insert("type" , "=");
FilterStructure.Insert("value", New Structure("VARCHAR", "Male"));
FilterStructure.Insert("raw" , False);
Filters.Add(FilterStructure);
// When using the connection string, a new connection is initialised,
// which will be closed after the function is executed.
// If several operations are performed, it is desirable to use one connection,
// previously created by the CreateConnection function()
Result = OPI_MySQL.UpdateRecords(Table, FieldsStructure, FilterStructure, ConnectionString);