import groovy.sql.Sql
sql = Sql.newInstance(
"jdbc:h2:tcp://localhost/~/test",
"sa",
"",
"org.h2.Driver")
query = """
select
alias_schema,
alias_name,
max(java_class) as jc,
max(java_method) as jm
from
information_schema.function_aliases
group by alias_schema, alias_name
order by alias_name
"""
// Function Aliasを一覧表示する
sql.eachRow(query){
println("alias_schema:${it.alias_schema}")
println("alias_name:${it.alias_name}")
println("java_class:${it.jc}")
println("java_method:${it.jm}")
println("-----")
}
動作環境
groovy 1.7.4, JDK6 Update 21, H2 Database 1.2.143 (2010-09-18)
0 件のコメント:
コメントを投稿