congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
SqlScriptParser
Code IndexAdd Tabnine to your IDE (free)

How to use
SqlScriptParser
in
org.jdbi.v3.core.internal

Best Java code snippets using org.jdbi.v3.core.internal.SqlScriptParser (Showing top 4 results out of 315)

origin: jdbi/jdbi

private List<String> splitToStatements(String script) {
  final List<String> statements = new ArrayList<>();
  String lastStatement = new SqlScriptParser((t, sb) -> {
    addStatement(sb.toString(), statements);
    sb.setLength(0);
  }).parse(new ANTLRStringStream(script));
  addStatement(lastStatement, statements);
  return statements;
}
origin: jdbi/jdbi

private static String readResource(ClassLoader classLoader, String path) {
  try (InputStream is = openStream(classLoader, path)) {
    // strips away comments
    return SQL_SCRIPT_PARSER.parse(new ANTLRInputStream(is));
  } catch (IOException e) {
    throw new UncheckedIOException("Unable to read classpath resource at " + path, e);
  }
}
origin: org.jdbi/jdbi3

private static String readResource(ClassLoader classLoader, String path) {
  try (InputStream is = openStream(classLoader, path)) {
    // strips away comments
    return SQL_SCRIPT_PARSER.parse(new ANTLRInputStream(is));
  }
  catch (IOException e) {
    throw new RuntimeException("Unable to read classpath resource at " + path, e);
  }
}
origin: org.jdbi/jdbi3

private List<String> splitToStatements(String script) {
  final List<String> statements = new ArrayList<>();
  String lastStatement = new SqlScriptParser((t, sb) -> {
    addStatement(sb.toString(), statements);
    sb.setLength(0);
  }).parse(new ANTLRStringStream(script));
  addStatement(lastStatement, statements);
  return statements;
}
org.jdbi.v3.core.internalSqlScriptParser

Javadoc

An SQL script parser.

It performs lexical analysis of a script and generates events for semicolons. As a result it returns a script without comments and newlines.

Most used methods

  • <init>
  • parse

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ImageIO (javax.imageio)
  • JCheckBox (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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