Update odbc

This commit is contained in:
sunkaixuan 2024-06-30 09:14:22 +08:00
parent 121b1eb497
commit 1aaa865940

View File

@ -13,7 +13,24 @@ namespace SqlSugar.Odbc
public override string SqlTranslationRight { get { return OdbcConfig.SqlTranslationRight; } }
public override string GetNoTranslationColumnName(string name)
{
return name;
if (name.Contains("="))
{
name = name.Split('=').First();
}
name = name.Trim(' ');
if (string.IsNullOrEmpty(SqlTranslationLeft) ||
!name.Contains(SqlTranslationLeft))
{
return name;
}
if (!name.Contains(".") && name.StartsWith(SqlTranslationLeft) && name.EndsWith(SqlTranslationRight))
{
return name.TrimStart(Convert.ToChar(SqlTranslationLeft)).TrimEnd(Convert.ToChar(SqlTranslationRight));
}
return name == null ? string.Empty : Regex.Match(name, @".*" + "\\" + SqlTranslationLeft + "(.*?)" + "\\" + SqlTranslationRight + "").Groups[1].Value;
}
public override string SqlDateNow
{