(refs #464)Add db.update() to update DB from plugin

This commit is contained in:
Naoki Takezoe
2014-08-23 03:28:13 +09:00
parent 96900c3cbf
commit c4c39f36e9

View File

@@ -24,6 +24,14 @@ package object plugin {
}
}
}
def update(sql: String): Int = {
defining(PluginConnectionHolder.threadLocal.get){ conn =>
using(conn.prepareStatement(sql)){ stmt =>
stmt.executeUpdate()
}
}
}
}
}