|
@@ -56,6 +56,20 @@ public class ViewController extends Controller {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 在被连接数据库执行sql语句
|
|
|
+ */
|
|
|
+ public void executeSqlprint() {
|
|
|
+ try {
|
|
|
+ List<Record> d = Db.use("print").find(this.getPara("sqlstr"));
|
|
|
+ this.renderJson(d);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO: handle exception
|
|
|
+ this.renderText(e.toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 在被连接数据库执行sql语句
|
|
|
*/
|