OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SqlCreateDB.java
Go to the documentation of this file.
1 package com.mapd.parser.extension.ddl;
2 
3 import com.google.gson.annotations.Expose;
5 
6 import org.apache.calcite.sql.SqlCreate;
7 import org.apache.calcite.sql.SqlKind;
8 import org.apache.calcite.sql.SqlNode;
10 import org.apache.calcite.sql.SqlSpecialOperator;
11 import org.apache.calcite.sql.parser.SqlParserPos;
12 
13 import java.util.List;
14 import java.util.Map;
15 
19 public class SqlCreateDB extends SqlCreate implements JsonSerializableDdl {
20  private static final SqlOperator OPERATOR =
21  new SqlSpecialOperator("CREATE_DB", SqlKind.OTHER_DDL);
22 
23  @Expose
24  private String command;
25  @Expose
26  private String name;
27  @Expose
28  private boolean ifNotExists;
29  @Expose
31 
32  public SqlCreateDB(final SqlParserPos pos,
33  final boolean ifNotExists,
34  final String name,
35  HeavyDBOptionsMap optionsMap) {
36  super(OPERATOR, pos, false, ifNotExists);
37  this.command = OPERATOR.getName();
38  this.name = name;
39  this.ifNotExists = ifNotExists;
40  this.options = optionsMap;
41  }
42 
43  @Override
44  public List<SqlNode> getOperandList() {
45  return null;
46  }
47 
48  @Override
49  public String toString() {
50  return toJsonString();
51  }
52 }
SqlCreateDB(final SqlParserPos pos, final boolean ifNotExists, final String name, HeavyDBOptionsMap optionsMap)