public class GroovySqlExtensions extends Object
Constructor and Description |
---|
GroovySqlExtensions() |
Modifier and Type | Method and Description |
---|---|
static TeiidSql |
connect() |
static TeiidSql |
connect(String url) |
static TeiidSql |
connect(String url,
String user,
String password) |
static String |
resultSetMetaDataToString(ResultSetMetaData rsmd) |
static String |
rowToString(ResultSet results) |
static void |
sqlHelp() |
static void |
sqlHelp(String method) |
@Help.Doc(text="Get a Teiid connection with a URL") public static TeiidSql connect(@Help.Doc(text="url") String url) throws SQLException
SQLException
@Help.Doc(text="Get a Teiid connection") public static TeiidSql connect(@Help.Doc(text="url") String url, @Help.Doc(text="user") String user, @Help.Doc(text="password") String password) throws SQLException
SQLException
@Help.Doc(text="Get a SQL connection using the defaults from connection.properties") public static TeiidSql connect() throws SQLException
SQLException
@Help.Doc(text="Alternate row to String method that pretty prints SQL/XML", moreText="e.g. sql.eachRow(\"select * from tables\", {row -> println rowToString(row) })") public static String rowToString(ResultSet results) throws SQLException
SQLException
@Help.Doc(text="Pretty prints the ResultSetMetadata", moreText={"e.g. sql.eachRow(\"select * from tables\", {rsmd -> println resultSetMetaDataToString(rsmd)},"," {row -> println rowToString(row) })"}) public static String resultSetMetaDataToString(ResultSetMetaData rsmd) throws SQLException
SQLException
Copyright © 2016 JBoss by Red Hat. All rights reserved.