Commit 8b37ab27 authored by Stanley Clark's avatar Stanley Clark 🦄
Browse files

Add SQL Parser

parent dcf6e9de
Pipeline #8629 failed with stages
......@@ -24,8 +24,23 @@
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jsqlparser-snapshots</id>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
......
package com.stanrogo.policy;
import net.sf.jsqlparser.JSQLParserException;
import net.sf.jsqlparser.parser.CCJSqlParserUtil;
import net.sf.jsqlparser.statement.Statement;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
public class App {
public static void main(String[] args) {
System.out.println("Hello World!");
try {
Statement stmt = CCJSqlParserUtil.parse("SELECT * FROM tab1");
System.out.println(stmt.toString());
} catch (JSQLParserException e) {
e.printStackTrace();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment