org.teiid.adminshell
Class GroovySqlExtensions
java.lang.Object
org.teiid.adminshell.GroovySqlExtensions
public class GroovySqlExtensions
- extends java.lang.Object
Extensions of Groovy Sql support, which somewhat bridges the gap to our old adminshell sql logic
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroovySqlExtensions
public GroovySqlExtensions()
connect
@Help.Doc(text="Get a Teiid connection with a URL")
public static TeiidSql connect(@Help.Doc(text="url")
java.lang.String url)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
connect
@Help.Doc(text="Get a Teiid connection")
public static TeiidSql connect(@Help.Doc(text="url")
java.lang.String url,
@Help.Doc(text="user")
java.lang.String user,
@Help.Doc(text="password")
java.lang.String password)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
connect
@Help.Doc(text="Get a SQL connection using the defaults from connection.properties")
public static TeiidSql connect()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
rowToString
@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 java.lang.String rowToString(java.sql.ResultSet results)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
resultSetMetaDataToString
@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 java.lang.String resultSetMetaDataToString(java.sql.ResultSetMetaData rsmd)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
sqlHelp
@Help.Doc(text="Show help for all SQL Extension methods")
public static void sqlHelp()
sqlHelp
@Help.Doc(text="Show help for the given SQL Extension method")
public static void sqlHelp(@Help.Doc(text="method name")
java.lang.String method)
Copyright © 2010. All Rights Reserved.