Update PgSql

This commit is contained in:
610262374@qq.com 2018-11-30 16:27:02 +08:00
parent 888472b314
commit 11660adb96
3 changed files with 11 additions and 3 deletions

View File

@ -20,6 +20,9 @@ namespace OrmTest
// Demo.CodeFirst.Init();
// Demo.Aop.Init();
Demo.Query.Init();
Demo.Insert.Init();
Demo.Delete.Init();
Demo.Update.Init();
Demo.MasterSlave.Init();
Demo.SharedConnection.Init();
Demo.ExtSqlFun.Init();

View File

@ -39,7 +39,8 @@ namespace SqlSugar
{
return 150;
}
else if (this.Context is OracleExpressionContext) {
else if (this.Context is OracleExpressionContext)
{
return 401;
}
@ -59,7 +60,11 @@ namespace SqlSugar
}
else if (this.Context is OracleExpressionContext)
{
return (HasWhere?"AND":"WHERE")+ " ROWNUM=1";
return (HasWhere ? "AND" : "WHERE") + " ROWNUM=1";
}
else if (this.Context is PostgreSQLExpressionContext)
{
return "limit 1";
}
else
{

View File

@ -46,7 +46,7 @@ namespace SqlSugar
else if (isMapping)
{
var mappingInfo = this.MappingTables.FirstOrDefault(it => it.EntityName.Equals(entityName, StringComparison.CurrentCultureIgnoreCase));
return SqlTranslationLeft + (mappingInfo == null ? entityName : mappingInfo.DbTableName) + SqlTranslationRight;
return SqlTranslationLeft + (mappingInfo == null ? entityName : mappingInfo.DbTableName).ToLower() + SqlTranslationRight;
}
else if (isComplex)
{