influxdb-java icon indicating copy to clipboard operation
influxdb-java copied to clipboard

Method createDatabase is deprecated

Open gentixharavina opened this issue 8 years ago • 4 comments

So i need to use the method createDatabase() which is deprecated but i cannot find another alternative solution to creating a database, any suggestions?

Help please!

gentixharavina avatar Sep 25 '18 10:09 gentixharavina

I have the same question, any solutions?

alisanguo avatar Oct 19 '18 09:10 alisanguo

the same issue? any alternative?

ysfseu avatar Oct 19 '18 12:10 ysfseu

Try creating the database using a query

this.influxDB.query(new Query("CREATE DATABASE databasename",""));

gkatzioura avatar Oct 19 '18 14:10 gkatzioura

  /**
   * Create a new Database.
   *
   * @param name
   *            the name of the new database.
   * @deprecated (since 2.9, removed in 3.0) Use <tt>org.influxdb.InfluxDB.query(Query)</tt> to execute a parameterized
   *             <strong>CREATE DATABASE</strong> query.
   */
  @Deprecated
  public void createDatabase(final String name);

fmachado avatar Oct 25 '18 09:10 fmachado