Update db2

This commit is contained in:
sunkaixuan
2025-06-03 08:53:26 +08:00
parent 2ae7734801
commit a5f8aebd8e
2 changed files with 3 additions and 3 deletions

View File

@@ -438,9 +438,9 @@ namespace SqlSugar.DB2
private string GetSchema()
{
var schema = "db2inst1";
if (System.Text.RegularExpressions.Regex.IsMatch(this.Context.CurrentConnectionConfig.ConnectionString.ToLower(), "database="))
if (System.Text.RegularExpressions.Regex.IsMatch(this.Context.CurrentConnectionConfig.ConnectionString, "currentschema=", System.Text.RegularExpressions.RegexOptions.IgnoreCase))
{
var regValue = System.Text.RegularExpressions.Regex.Match(this.Context.CurrentConnectionConfig.ConnectionString.ToLower(), @"database\=(\w+)").Groups[1].Value;
var regValue = System.Text.RegularExpressions.Regex.Match(this.Context.CurrentConnectionConfig.ConnectionString, @"currentschema\=(\w+)", System.Text.RegularExpressions.RegexOptions.IgnoreCase).Groups[1].Value;
if (regValue.HasValue())
{
schema = regValue;

View File

@@ -2,7 +2,7 @@
<package >
<metadata>
<id>SqlSugarCore</id>
<version>5.1.4.194-preview36</version>
<version>5.1.4.194-preview38</version>
<authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>