All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.snowflake.client.core.QueryResultFormat Maven / Gradle / Ivy

There is a newer version: 3.21.0
Show newest version
/*
 * Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
 */
package net.snowflake.client.core;

import java.util.Optional;

public enum QueryResultFormat {
  JSON("json"),
  ARROW("arrow");

  private String name;

  QueryResultFormat(String name) {
    this.name = name;
  }

  public static Optional lookupByName(String n) {
    for (QueryResultFormat format : QueryResultFormat.values()) {
      if (format.name.equalsIgnoreCase(n)) {
        return Optional.of(format);
      }
    }

    return Optional.empty();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy