/// <summary>Creates the database.</summary>
 /// <param name="errorHandlers">The error handlers.</param>
 /// <param name="database">The database.</param>
 /// <returns></returns>
 public async Task<InfluxDbApiResponse> CreateDatabase(IEnumerable<ApiResponseErrorHandlingDelegate> errorHandlers, Database database)
 {
     return await RequestAsync(errorHandlers, HttpMethod.Get, "query", null,
         new Dictionary<string, string> { { QueryParams.Query, String.Format(QueryStatements.CreateDatabase, database.Name) } });
 }
예제 #2
0
        /// <summary>
        /// Create a new Database.
        /// </summary>
        /// <param name="name">The name of the new database</param>
        /// <returns></returns>
        public async Task<InfluxDbApiResponse> CreateDatabaseAsync(string name)
        {
            var db = new Database { Name = name };

            return await _influxDbClient.CreateDatabase(NoErrorHandlers, db);
        }
 public async Task<InfluxDbApiResponse> CreateDatabase(IEnumerable<ApiResponseErrorHandlingDelegate> errorHandlers, Database database)
 {
     return await _influxDbClient.CreateDatabase(errorHandlers, database);
 }