@@ -76,32 +76,33 @@ public DemoSQLConfig(RequestMethod method, String table) {
7676
7777 @ Override
7878 public AbstractSQLConfig <Long , JSONObject , JSONArray > getSQLConfig (
79- RequestMethod method , String database , String schema , String datasource , String table ) {
79+ RequestMethod method , String database , String datasource , String namespace
80+ , String catalog , String schema , String table ) {
8081 return new DemoSQLConfig (method , table );
8182 }
8283
8384 //取消注释来实现自定义各个表的主键名
8485 // @Override
85- // public String getIdKey(String database, String schema , String datasource , String table) {
86+ // public String getIdKey(String database, String datasource , String namespace, String catalog, String schema , String table) {
8687 // // return "_id"; // SurrealDB 强制用 id 作为主键名,surrealdb.java 查不到也改不了,所以需要另外加主键
8788 // return StringUtil.firstCase(table + "Id"); // userId, comemntId ...
8889 // // return StringUtil.toLowerCase(t) + "_id"; // user_id, comemnt_id ...
8990 // // return StringUtil.toUpperCase(t) + "_ID"; // USER_ID, COMMENT_ID ...
9091 // }
9192
9293 @ Override
93- public String getUserIdKey (String database , String schema , String datasource , String table ) {
94+ public String getUserIdKey (String database , String datasource , String namespace , String catalog , String schema , String table ) {
9495 return USER_ .equals (table ) || PRIVACY_ .equals (table ) ? ID : USER_ID ; // id / userId
9596 }
9697
9798 // 取消注释来实现数据库自增 id
9899 // @Override
99- // public Long newId(RequestMethod method, String database, String schema , String datasource , String table) {
100+ // public Long newId(RequestMethod method, String database, String datasource , String namespace, String catalog, String schema , String table) {
100101 // return null; // return null 则不生成 id,一般用于数据库自增 id
101102 // }
102103
103104 // @Override
104- // public void onMissingKey4Combine(String name, JSONMap request, String combine, String item, String key) throws Exception {
105+ // public void onMissingKey4Combine(String name, JSONObject request, String combine, String item, String key) throws Exception {
105106 //// super.onMissingKey4Combine(name, request, combine, item, key);
106107 // }
107108 };
0 commit comments