💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 存储过程调用 beetlsql 支持存储过程的调用,包含查询和更新 * public <T> List<T> executeCall(CallReady callReady, Class<T> clazz) 执行存储过程,结果映射到clazz对象 * public int executeCall(CallReady callReady ) 执行更新存储过程,返回int表示更新结果 CallReady对象包含了存储过程调用语句,以及输入输出参数说明,比如mytest存储过程定义如下 ```sql CREATE DEFINER=`root`@`%` PROCEDURE `test`.`mytest`(IN s_count INT,OUT s_count2 varchar(10)) BEGIN SELECT * from User; SET s_count2='abc'; END ``` CallReady对象包含了存储过程调用语句,以及输出输出参数说明 ```java CallReady callReady = new CallReady("call test.mytest(?,?)"); callReady.add(new InArg(1)); OutArg nameOut = new OutArg(String.class); callReady.add(nameOut); List<User> users = sqlManager.executeCall(callReady,User.class); String sCount2 = (String)nameOut.getOutValue(); ``` 通常情况,使用Mapper方法更加直观简单,详情参考Mapper章节的@Call 注解