1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-05 22:53:35 +02:00
Files
OpenIntegrations/docs/en/md/MySQL/Orm/Delete-database.mdx

50 lines
1.2 KiB
Plaintext
Raw Normal View History

2025-03-27 20:05:59 +03:00
---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Drop database
Deletes the database
`Function DeleteDatabase(Val Base, Val Connection = "", Val Tls = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Base | --base | String | ✔ | Database name |
| Connection | --dbc | String, Arbitrary | ✖ | Connection or connection string |
| Tls | --tls | Structure Of KeyAndValue | ✖ | TLS settings, if necessary. See GetTlsSettings |
Returns: Map Of KeyAndValue - Result of query execution
<br/>
```bsl title="1C:Enterprise/OneScript code example"
2025-04-03 21:52:31 +03:00
Address = "127.0.0.1";
Login = "bayselonarrend";
Password = "12we...";
Base = "";
2025-03-27 20:05:59 +03:00
2025-04-03 21:52:31 +03:00
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);
2025-03-27 20:05:59 +03:00
```