Tabnine Logo
Driver.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.calcite.jdbc.Driver
constructor

Best Java code snippets using org.apache.calcite.jdbc.Driver.<init> (Showing top 8 results out of 315)

origin: apache/nifi

@Override
protected void init(final ProcessorInitializationContext context) {
  try {
    DriverManager.registerDriver(new org.apache.calcite.jdbc.Driver());
  } catch (final SQLException e) {
    throw new ProcessException("Failed to load Calcite JDBC Driver", e);
  }
  final List<PropertyDescriptor> properties = new ArrayList<>();
  properties.add(RECORD_READER_FACTORY);
  properties.add(RECORD_WRITER_FACTORY);
  properties.add(INCLUDE_ZERO_RECORD_FLOWFILES);
  properties.add(CACHE_SCHEMA);
  this.properties = Collections.unmodifiableList(properties);
  relationships.add(REL_FAILURE);
  relationships.add(REL_ORIGINAL);
}
origin: org.apache.nifi/nifi-standard-processors

@Override
protected void init(final ProcessorInitializationContext context) {
  try {
    DriverManager.registerDriver(new org.apache.calcite.jdbc.Driver());
  } catch (final SQLException e) {
    throw new ProcessException("Failed to load Calcite JDBC Driver", e);
  }
  final List<PropertyDescriptor> properties = new ArrayList<>();
  properties.add(RECORD_READER_FACTORY);
  properties.add(RECORD_WRITER_FACTORY);
  properties.add(INCLUDE_ZERO_RECORD_FLOWFILES);
  properties.add(CACHE_SCHEMA);
  this.properties = Collections.unmodifiableList(properties);
  relationships.add(REL_FAILURE);
  relationships.add(REL_ORIGINAL);
}
origin: Qihoo360/Quicksql

/** Test case for
 * <a href="https://issues.apache.org/jira/browse/CALCITE-281">[CALCITE-1919]
 * NPE when target in ReflectiveSchema belongs to the unnamed package</a>. */
@Test public void testReflectiveSchemaInUnnamedPackage() throws Exception {
 final Driver driver = new Driver();
 try (CalciteConnection connection = (CalciteConnection)
   driver.connect("jdbc:calcite:", new Properties())) {
  SchemaPlus rootSchema = connection.getRootSchema();
  final Class<?> c = Class.forName("RootHr");
  final Object o = c.getDeclaredConstructor().newInstance();
  rootSchema.add("hr", new ReflectiveSchema(o));
  connection.setSchema("hr");
  final Statement statement = connection.createStatement();
  final String sql = "select * from \"emps\"";
  final ResultSet resultSet = statement.executeQuery(sql);
  final String expected = "empid=100; name=Bill\n"
    + "empid=200; name=Eric\n"
    + "empid=150; name=Sebastian\n";
  assertThat(CalciteAssert.toString(resultSet), is(expected));
 }
}
origin: org.apache.calcite/calcite-core

/** Test case for
 * <a href="https://issues.apache.org/jira/browse/CALCITE-281">[CALCITE-1919]
 * NPE when target in ReflectiveSchema belongs to the unnamed package</a>. */
@Test public void testReflectiveSchemaInUnnamedPackage() throws Exception {
 final Driver driver = new Driver();
 try (CalciteConnection connection = (CalciteConnection)
   driver.connect("jdbc:calcite:", new Properties())) {
  SchemaPlus rootSchema = connection.getRootSchema();
  final Class<?> c = Class.forName("RootHr");
  final Object o = c.getDeclaredConstructor().newInstance();
  rootSchema.add("hr", new ReflectiveSchema(o));
  connection.setSchema("hr");
  final Statement statement = connection.createStatement();
  final String sql = "select * from \"emps\"";
  final ResultSet resultSet = statement.executeQuery(sql);
  final String expected = "empid=100; name=Bill\n"
    + "empid=200; name=Eric\n"
    + "empid=150; name=Sebastian\n";
  assertThat(CalciteAssert.toString(resultSet), is(expected));
 }
}
origin: Qihoo360/Quicksql

final Driver driver = new Driver();
CalciteConnection connection = (CalciteConnection)
  driver.connect("jdbc:calcite:", new Properties());
origin: org.apache.calcite/calcite-core

final Driver driver = new Driver();
CalciteConnection connection = (CalciteConnection)
  driver.connect("jdbc:calcite:", new Properties());
origin: Qihoo360/Quicksql

final Driver driver = new Driver();
CalciteConnection connection = (CalciteConnection)
  driver.connect("jdbc:calcite:", new Properties());
origin: org.apache.calcite/calcite-core

final Driver driver = new Driver();
CalciteConnection connection = (CalciteConnection)
  driver.connect("jdbc:calcite:", new Properties());
org.apache.calcite.jdbcDriver<init>

Popular methods of Driver

  • connect
    Creates an internal connection.
  • createPrepareFactory

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Runner (org.openjdk.jmh.runner)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now