Initial_commit_SecMPS_v2
This commit is contained in:
27
api_sqlsugar/VolPro.Core/Generic/GenericPgSqlProvider.cs
Normal file
27
api_sqlsugar/VolPro.Core/Generic/GenericPgSqlProvider.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Dapper;
|
||||
using VolPro.Core.EFDbContext;
|
||||
using VolPro.Core.Extensions.AutofacManager;
|
||||
using VolPro.Core.UserManager;
|
||||
using VolPro.Entity.DomainModels;
|
||||
|
||||
namespace VolPro.Core.Generic
|
||||
{
|
||||
/// <summary>
|
||||
/// PostgreSql 通用 CRUD 实现
|
||||
/// </summary>
|
||||
public class GenericPgSqlProvider : GenericDbProviderBase
|
||||
{
|
||||
protected override string LeftQuote => "\"";
|
||||
protected override string RightQuote => "\"";
|
||||
|
||||
public GenericPgSqlProvider() : base()
|
||||
{
|
||||
}
|
||||
protected override string BuildIdentitySql(TableColumnField keyColumn, bool batch = false)
|
||||
{
|
||||
// PostgreSQL 单条与批量均使用 RETURNING 语法
|
||||
return $" RETURNING {LeftQuote}{keyColumn.ColumnName}{RightQuote}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user