OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SqlExportQuery.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.SqlDdl;
7 import org.apache.calcite.sql.SqlKind;
8 import org.apache.calcite.sql.SqlNode;
9 import org.apache.calcite.sql.SqlOperator;
10 import org.apache.calcite.sql.SqlSpecialOperator;
11 import org.apache.calcite.sql.parser.SqlParserPos;
12 
13 import java.util.List;
14 
15 public class SqlExportQuery extends SqlDdl implements JsonSerializableDdl {
16  private static final SqlOperator OPERATOR =
17  new SqlSpecialOperator("EXPORT_QUERY", SqlKind.OTHER_DDL);
18 
19  @Expose
20  private String command;
21  @Expose
22  private String query;
23  @Expose
24  private String filePath;
25  @Expose
27 
28  public SqlExportQuery(final SqlParserPos pos,
29  final SqlNode queryNode,
30  final String filePath,
31  OmniSciOptionsMap withOptions) {
32  super(OPERATOR, pos);
33  this.command = OPERATOR.getName();
34  this.query = queryNode.toString();
35  this.filePath = filePath.replaceAll("^(\'|\")*|(\'|\")*$", "");
36  this.options = withOptions;
37  }
38 
39  @Override
40  public List<SqlNode> getOperandList() {
41  return null;
42  }
43 
44  @Override
45  public String toString() {
46  return toJsonString();
47  }
48 }
SqlExportQuery(final SqlParserPos pos, final SqlNode queryNode, final String filePath, OmniSciOptionsMap withOptions)