首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网络技术 > 网络基础 >

grails 直接运用sql

2013-08-27 
grails 直接使用sqlpackage test.sql?import groovy.sql.Sql?class SQLTestService {?def dataSource?? ?

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?

}

? ? }

}

热点排行