mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
(refs #464)Add db.update() to update DB from plugin
This commit is contained in:
@@ -24,6 +24,14 @@ package object plugin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def update(sql: String): Int = {
|
||||
defining(PluginConnectionHolder.threadLocal.get){ conn =>
|
||||
using(conn.prepareStatement(sql)){ stmt =>
|
||||
stmt.executeUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user