You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following your suggestion, I plan to use REGEXP_LIKE in the isSQLServer path. Microsoft documents it as requiring SQL Server 2025 and compatibility level 170, so SQL Server 2022 cannot use it. My proposal is to generate REGEXP_LIKE when supported and return a clear error suggesting key$ on older versions instead of generating invalid SQL. Does that sound right? I will open the PR after confirmation.
Following your suggestion, I plan to use REGEXP_LIKE in the isSQLServer path. Microsoft documents it as requiring SQL Server 2025 and compatibility level 170, so SQL Server 2022 cannot use it. My proposal is to generate REGEXP_LIKE when supported and return a clear error suggesting key$ on older versions instead of generating invalid SQL. Does that sound right? I will open the PR after confirmation.
@henriquejsza It's right, thank you. Looking forward to your PR~
By the way, you may use gainDBVersionNums for comparing the versions of SQLServer.
Activity
TommyLemon commentedon May 10, 2025
@zdf321 gainRegExpString 和 isPresto() || isTrino() 一样判断 isSQLServer() ,使用对应的 regexp_like
https://github.com/Tencent/APIJSON/blob/master/APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java#L4263-L4295
https://learn.microsoft.com/en-us/sql/t-sql/functions/regexp-like-transact-sql?view=azuresqldb-current

改好后给 APIJSON 提交 PR 贡献,谢谢,开源要大家一起参与贡献才会更美好~

提 PR 贡献代码的步骤可参考:
https://github.com/Tencent/APIJSON/blob/master/CONTRIBUTING.md#%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%80%E5%AE%9A%E8%A6%81%E8%B4%A1%E7%8C%AE%E4%BB%A3%E7%A0%81
henriquejsza commentedon Sep 1, 2026
Following your suggestion, I plan to use REGEXP_LIKE in the isSQLServer path. Microsoft documents it as requiring SQL Server 2025 and compatibility level 170, so SQL Server 2022 cannot use it. My proposal is to generate REGEXP_LIKE when supported and return a clear error suggesting key$ on older versions instead of generating invalid SQL. Does that sound right? I will open the PR after confirmation.
TommyLemon commentedon Sep 3, 2026
@henriquejsza It's right, thank you. Looking forward to your PR~
By the way, you may use gainDBVersionNums for comparing the versions of SQLServer.