You've already forked OpenIntegrations
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:
8
docs/en/examples/MySQL/CloseConnection.txt
vendored
Normal file
8
docs/en/examples/MySQL/CloseConnection.txt
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
Address = "127.0.0.1";
|
||||
Login = "bayselonarrend";
|
||||
Password = "12we...";
|
||||
Base = "";
|
||||
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
Connection = OPI_MySQL.CreateConnection(ConnectionString);
|
||||
Result = OPI_MySQL.CloseConnection(Connection);
|
||||
9
docs/en/examples/MySQL/CreateConnection.txt
vendored
Normal file
9
docs/en/examples/MySQL/CreateConnection.txt
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
Address = "127.0.0.1";
|
||||
Login = "bayselonarrend";
|
||||
Password = "12we...";
|
||||
Base = "";
|
||||
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
Result = OPI_MySQL.CreateConnection(ConnectionString);
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
53
docs/en/examples/MySQL/ExecuteSQLQuery.txt
vendored
Normal file
53
docs/en/examples/MySQL/ExecuteSQLQuery.txt
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
Image = "https://api.athenaeum.digital/test_data/picture.jpg";
|
||||
OPI_TypeConversion.GetBinaryData(Image); // Image - Type: BinaryData
|
||||
|
||||
Address = "127.0.0.1";
|
||||
Login = "bayselonarrend";
|
||||
Password = "12we...";
|
||||
Base = "test_data";
|
||||
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
Connection = OPI_MySQL.CreateConnection(ConnectionString);
|
||||
|
||||
// CREATE
|
||||
|
||||
QueryText = "
|
||||
|CREATE TABLE test_table (
|
||||
|id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
|name VARCHAR(255),
|
||||
|age INT,
|
||||
|salary DOUBLE,
|
||||
|amount FLOAT,
|
||||
|type TINYINT UNSIGNED,
|
||||
|date DATE,
|
||||
|time TIME,
|
||||
|data BLOB
|
||||
|);";
|
||||
|
||||
Result = OPI_MySQL.ExecuteSQLQuery(QueryText, , , Connection);
|
||||
|
||||
// INSERT with parameters
|
||||
|
||||
QueryText = "
|
||||
|INSERT INTO test_table (name, age, salary, amount, type, date, time, data)
|
||||
|VALUES (?, ?, ?, ?, ?, ?, ?, ?);";
|
||||
|
||||
ParameterArray = New Array;
|
||||
ParameterArray.Add(New Structure("TEXT" , "Vitaly"));
|
||||
ParameterArray.Add(New Structure("INT" , 25));
|
||||
ParameterArray.Add(New Structure("DOUBLE", 1000.12));
|
||||
ParameterArray.Add(New Structure("FLOAT" , 1000.12));
|
||||
ParameterArray.Add(New Structure("UINT" , 1));
|
||||
ParameterArray.Add(New Structure("DATE" , OPI_Tools.GetCurrentDate()));
|
||||
ParameterArray.Add(New Structure("TIME" , OPI_Tools.GetCurrentDate()));
|
||||
ParameterArray.Add(New Structure("BYTES" , Image));
|
||||
|
||||
Result = OPI_MySQL.ExecuteSQLQuery(QueryText, ParameterArray, , Connection);
|
||||
|
||||
// SELECT (The result of this query is shown in the Result block)
|
||||
|
||||
QueryText = "SELECT name, age, salary, amount, type, date, time, data FROM test_table;";
|
||||
|
||||
Result = OPI_MySQL.ExecuteSQLQuery(QueryText, , , Connection);
|
||||
|
||||
Closing = OPI_MySQL.CloseConnection(Connection);
|
||||
6
docs/en/examples/MySQL/GenerateConnectionString.txt
vendored
Normal file
6
docs/en/examples/MySQL/GenerateConnectionString.txt
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
Address = "127.0.0.1";
|
||||
Login = "bayselonarrend";
|
||||
Password = "12we...";
|
||||
Base = "";
|
||||
|
||||
Result = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
11
docs/en/examples/MySQL/IsConnector.txt
vendored
Normal file
11
docs/en/examples/MySQL/IsConnector.txt
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
Address = "127.0.0.1";
|
||||
Login = "bayselonarrend";
|
||||
Password = "12we...";
|
||||
Base = "";
|
||||
|
||||
ConnectionString = OPI_MySQL.GenerateConnectionString(Address, Base, Login, Password);
|
||||
|
||||
Connection = OPI_MySQL.CreateConnection(ConnectionString);
|
||||
Result = OPI_MySQL.IsConnector(Connection);
|
||||
|
||||
OPI_MySQL.CloseConnection(Result);
|
||||
Reference in New Issue
Block a user