grails 直接使用sql
package test.sql
?
import groovy.sql.Sql
?
class SQLTestService {
?
def dataSource
?
? ? def sqlRun() {
def db = new Sql(dataSource)
db.eachRow('select * from house'){?
println it?
}
? ? }
}
发布时间: 2013-08-27 10:20:47 作者: rapoo
grails 直接使用sql
package test.sql
?
import groovy.sql.Sql
?
class SQLTestService {
?
def dataSource
?
? ? def sqlRun() {
def db = new Sql(dataSource)
db.eachRow('select * from house'){?
println it?
}
? ? }
}