mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update odbc
This commit is contained in:
parent
121b1eb497
commit
1aaa865940
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user