InfluxDB.Client.Net
InfluxDB.Client.Net copied to clipboard
Is there anyway to delete an existing database?
Is there any native support for deleting a database?
If not, is the best solution to use QueryMultiSeriesAsync with the following query syntax:
DROP DATABASE <database_name>
yeah, no native methods yet. Influx recently responds with an error response (http 200, with a message) for DML in Get (which is used in QueryMultiSeriesAsync). Can you give it a shot and confirm it works? if not I will try to add a native method.
Will do. I'll let you know the outcome
@mvadu - I was able to drop the database using the following code.
// Delete the data source
await client.QueryMultiSeriesAsync(database, $"DROP DATABASE {database}");