Updte exp to sql

This commit is contained in:
sunkaixuan 2022-08-28 14:06:54 +08:00
parent 721fc3246d
commit c362b7896c
2 changed files with 3 additions and 2 deletions

View File

@ -158,6 +158,7 @@ namespace SqlSugar
#endregion
#region Override methods
public virtual string GetLimit() { return null; }
public virtual string GetTranslationTableName(string entityName, bool isMapping = true)
{
Check.ArgumentNullException(entityName, string.Format(ErrorMessage.ObjNotExist, "Table Name"));

View File

@ -61,9 +61,9 @@ namespace SqlSugar
{
return (HasWhere?"AND":"WHERE")+ " ROWNUM=1";
}
else if (this.Context is PostgreSQLExpressionContext)
else if (this.Context.GetLimit()!=null)
{
return "limit 1";
return this.Context.GetLimit();
}
else
{