mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update PgSql
This commit is contained in:
parent
11660adb96
commit
9fd5bb65f7
@ -42,7 +42,7 @@ namespace OrmTest.Demo
|
||||
|
||||
//Re Set Value
|
||||
var t8 = db.Updateable(updateObj)
|
||||
.ReSetValue(it => it.Name == (it.Name + 1)).ExecuteCommand();
|
||||
.ReSetValue(it => it.Name=="xx").ExecuteCommand();
|
||||
|
||||
//Where By Expression
|
||||
var t9 = db.Updateable(updateObj).Where(it => it.Id == 1).ExecuteCommand();
|
||||
|
@ -63,8 +63,8 @@ namespace OrmTest.Demo
|
||||
|
||||
var dt = new Dictionary<string, object>();
|
||||
dt.Add("name", "1");
|
||||
dt.Add("CreateTime", null);
|
||||
var t66 = db.Insertable(dt).AS("student").ExecuteReturnIdentity();
|
||||
dt.Add("CreateTime", DateTime.Now);
|
||||
var t66 = db.Insertable(dt).AS("student").ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -207,6 +207,10 @@ namespace SqlSugar
|
||||
{
|
||||
return new OracleInsertable<T>();
|
||||
}
|
||||
else if (currentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
{
|
||||
return new PostgreSQLInserttable<T>();
|
||||
}
|
||||
else
|
||||
{
|
||||
return new InsertableProvider<T>();
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -43,7 +43,7 @@ namespace SqlSugar
|
||||
|
||||
public override string GetNoTranslationColumnName(string name)
|
||||
{
|
||||
return name.ToLower();
|
||||
return name.TrimEnd(Convert.ToChar(SqlTranslationRight)).TrimStart(Convert.ToChar(SqlTranslationLeft)).ToLower();
|
||||
}
|
||||
public override string GetTranslationColumnName(string entityName, string propertyName)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user