Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Efcore.Pg
提交
a25593a6
E
Efcore.Pg
项目概览
jobily
/
Efcore.Pg
11 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Efcore.Pg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a25593a6
编写于
1月 07, 2019
作者:
A
Austin Drenski
提交者:
GitHub
1月 07, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add xmldocs for various public members (#786)
Leftovers from PR 617.
上级
f5e6633c
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
210 addition
and
51 deletion
+210
-51
src/EFCore.PG/Design/Internal/NpgsqlDesignTimeServices.cs
src/EFCore.PG/Design/Internal/NpgsqlDesignTimeServices.cs
+4
-0
src/EFCore.PG/Diagnostics/NpgsqlEventId.cs
src/EFCore.PG/Diagnostics/NpgsqlEventId.cs
+81
-49
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlArrayTypeMapping.cs
...ore.PG/Storage/Internal/Mapping/NpgsqlArrayTypeMapping.cs
+9
-0
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlBitTypeMapping.cs
...FCore.PG/Storage/Internal/Mapping/NpgsqlBitTypeMapping.cs
+9
-0
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlHstoreTypeMapping.cs
...re.PG/Storage/Internal/Mapping/NpgsqlHstoreTypeMapping.cs
+9
-0
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlListTypeMapping.cs
...Core.PG/Storage/Internal/Mapping/NpgsqlListTypeMapping.cs
+9
-2
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlNetworkTypeMappings.cs
....PG/Storage/Internal/Mapping/NpgsqlNetworkTypeMappings.cs
+36
-0
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlRangeTypeMapping.cs
...ore.PG/Storage/Internal/Mapping/NpgsqlRangeTypeMapping.cs
+25
-0
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlTypeMapping.cs
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlTypeMapping.cs
+17
-0
src/EFCore.PG/Update/Internal/NpgsqlModificationCommandBatch.cs
...Core.PG/Update/Internal/NpgsqlModificationCommandBatch.cs
+11
-0
未找到文件。
src/EFCore.PG/Design/Internal/NpgsqlDesignTimeServices.cs
浏览文件 @
a25593a6
...
...
@@ -8,6 +8,10 @@
namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Design.Internal
{
/// <summary>
/// Enables configuring Npgsql-specific design-time services.
/// Tools will automatically discover implementations of this interface that are in the startup assembly.
/// </summary>
[
UsedImplicitly
]
public
class
NpgsqlDesignTimeServices
:
IDesignTimeServices
{
...
...
src/EFCore.PG/Diagnostics/NpgsqlEventId.cs
浏览文件 @
a25593a6
...
...
@@ -6,24 +6,23 @@
namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Diagnostics
{
/// <summary>
///
<para>
///
Event IDs for PostgreSQL/Npgsql events that correspond to messages logged to an <see cref="ILogger" />
///
and events sent to a <see cref="DiagnosticSource" />.
///
</para>
///
<para>
///
These IDs are also used with <see cref="WarningsConfigurationBuilder" /> to configure the
///
behavior of warnings.
///
</para>
/// <para>
/// Event IDs for PostgreSQL/Npgsql events that correspond to messages logged to an <see cref="ILogger" />
/// and events sent to a <see cref="DiagnosticSource" />.
/// </para>
/// <para>
/// These IDs are also used with <see cref="WarningsConfigurationBuilder" /> to configure the
/// behavior of warnings.
/// </para>
/// </summary>
public
static
class
NpgsqlEventId
{
// Warning: These values must not change between releases.
// Only add new values to the end of sections, never in the middle.
// Try to use
<Noun><Verb>
naming and be consistent with existing names.
private
enum
Id
// Try to use
{Noun}{Verb}
naming and be consistent with existing names.
enum
Id
{
// Model validation events
// Scaffolding events
ColumnFound
=
CoreEventId
.
ProviderDesignBaseId
,
//ColumnNotNamedWarning,
...
...
@@ -57,123 +56,156 @@ private enum Id
UnsupportedConstraintIndexSkippedWarning
}
private
static
readonly
string
_validationPrefix
=
DbLoggerCategory
.
Model
.
Validation
.
Name
+
"."
;
private
static
EventId
MakeValidationId
(
Id
id
)
=>
new
EventId
((
int
)
id
,
_validationPrefix
+
id
);
// /// <summary>
// /// <para>
// /// No explicit type for a decimal column.
// /// </para>
// /// <para>
// /// This event is in the <see cref="DbLoggerCategory.Model.Validation" /> category.
// /// </para>
// /// <para>
// /// This event uses the <see cref="PropertyEventData" /> payload when used with a <see cref="DiagnosticSource" />.
// /// </para>
// /// </summary>
// public static readonly EventId DecimalTypeDefaultWarning = MakeValidationId(Id.DecimalTypeDefaultWarning);
/// <summary>
/// <para>
/// A byte property is set up to use a SQL Server identity column.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Model.Validation" /> category.
/// </para>
/// <para>
/// This event uses the <see cref="PropertyEventData" /> payload when used with a <see cref="DiagnosticSource" />.
/// </para>
/// </summary>
//public static readonly EventId ByteIdentityColumnWarning = MakeValidationId(Id.ByteIdentityColumnWarning);
private
static
readonly
string
_scaffoldingPrefix
=
DbLoggerCategory
.
Scaffolding
.
Name
+
"."
;
private
static
EventId
MakeScaffoldingId
(
Id
id
)
=>
new
EventId
((
int
)
id
,
_scaffoldingPrefix
+
id
);
static
readonly
string
ScaffoldingPrefix
=
DbLoggerCategory
.
Scaffolding
.
Name
+
"."
;
static
EventId
MakeScaffoldingId
(
Id
id
)
=>
new
EventId
((
int
)
id
,
ScaffoldingPrefix
+
id
);
/// <summary>
/// <para>
/// A column was found.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
ColumnFound
=
MakeScaffoldingId
(
Id
.
ColumnFound
);
/// <summary>
/// <para>
/// The database is missing a schema.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
MissingSchemaWarning
=
MakeScaffoldingId
(
Id
.
MissingSchemaWarning
);
/// <summary>
/// <para>
/// The database is missing a table.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
MissingTableWarning
=
MakeScaffoldingId
(
Id
.
MissingTableWarning
);
/// <summary>
/// <para>
/// A foreign key references a missing table at the principal end.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
ForeignKeyReferencesMissingPrincipalTableWarning
=
MakeScaffoldingId
(
Id
.
ForeignKeyReferencesMissingPrincipalTableWarning
);
/// <summary>
/// <para>
/// A table was found.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
TableFound
=
MakeScaffoldingId
(
Id
.
TableFound
);
/// <summary>
/// <para>
/// A sequence was found.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
SequenceFound
=
MakeScaffoldingId
(
Id
.
SequenceFound
);
/// <summary>
/// Primary key was found.
/// <para>
/// A primary key was found.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
PrimaryKeyFound
=
MakeScaffoldingId
(
Id
.
PrimaryKeyFound
);
/// <summary>
/// An unique constraint was found.
/// <para>
/// A unique constraint was found.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
UniqueConstraintFound
=
MakeScaffoldingId
(
Id
.
UniqueConstraintFound
);
/// <summary>
/// <para>
/// An index was found.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
IndexFound
=
MakeScaffoldingId
(
Id
.
IndexFound
);
/// <summary>
/// <para>
/// A foreign key was found.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
ForeignKeyFound
=
MakeScaffoldingId
(
Id
.
ForeignKeyFound
);
/// <summary>
/// <para>
/// A principal column referenced by a foreign key was not found.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
ForeignKeyPrincipalColumnMissingWarning
=
MakeScaffoldingId
(
Id
.
ForeignKeyPrincipalColumnMissingWarning
);
/// <summary>
/// <para>
/// Enum column cannot be scaffolded, define a CLR enum type and add the property manually.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
EnumColumnSkippedWarning
=
MakeScaffoldingId
(
Id
.
EnumColumnSkippedWarning
);
/// <summary>
/// Expression index cannot be scaffolded, expression indices aren't supported and must be added via raw SQL in migrations.
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// <para>
/// Expression index cannot be scaffolded, expression indices aren't supported and must be added via raw SQL in migrations.
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
ExpressionIndexSkippedWarning
=
MakeScaffoldingId
(
Id
.
ExpressionIndexSkippedWarning
);
/// <summary>
/// Index '{name}' on table {tableName} cannot be scaffolded because it includes a column that cannot be scaffolded (e.g. enum).
/// <para>
/// Index '{name}' on table {tableName} cannot be scaffolded because it includes a column that cannot be scaffolded (e.g. enum).
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
UnsupportedColumnIndexSkippedWarning
=
MakeScaffoldingId
(
Id
.
UnsupportedColumnIndexSkippedWarning
);
/// <summary>
/// Constraint '{name}' on table {tableName} cannot be scaffolded because it includes a column that cannot be scaffolded (e.g. enum).
/// <para>
/// Constraint '{name}' on table {tableName} cannot be scaffolded because it includes a column that cannot be scaffolded (e.g. enum).
/// </para>
/// <para>
/// This event is in the <see cref="DbLoggerCategory.Scaffolding" /> category.
/// </para>
/// </summary>
public
static
readonly
EventId
UnsupportedColumnConstraintSkippedWarning
=
MakeScaffoldingId
(
Id
.
UnsupportedConstraintIndexSkippedWarning
);
}
...
...
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlArrayTypeMapping.cs
浏览文件 @
a25593a6
...
...
@@ -11,20 +11,29 @@ namespace Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
/// </summary>
/// <remarks>
/// Note that mapping PostgreSQL arrays to .NET List{T} is also supported via <see cref="NpgsqlListTypeMapping"/>.
/// See: https://www.postgresql.org/docs/current/static/arrays.html
/// </remarks>
public
class
NpgsqlArrayTypeMapping
:
RelationalTypeMapping
{
// ReSharper disable once MemberCanBePrivate.Global
/// <summary>
/// The relational type mapping used to initialize the array mapping.
/// </summary>
public
RelationalTypeMapping
ElementMapping
{
get
;
}
/// <summary>
/// Creates the default array mapping (i.e. for the single-dimensional CLR array type)
/// </summary>
/// <param name="storeType">The database type to map.</param>
/// <param name="elementMapping">The element type mapping.</param>
public
NpgsqlArrayTypeMapping
(
string
storeType
,
RelationalTypeMapping
elementMapping
)
:
this
(
storeType
,
elementMapping
,
elementMapping
.
ClrType
.
MakeArrayType
())
{}
/// <summary>
/// Creates the default array mapping (i.e. for the single-dimensional CLR array type)
/// </summary>
/// <param name="elementMapping">The element type mapping.</param>
/// <param name="arrayType">The array type to map.</param>
public
NpgsqlArrayTypeMapping
(
RelationalTypeMapping
elementMapping
,
Type
arrayType
)
:
this
(
elementMapping
.
StoreType
+
"[]"
,
elementMapping
,
arrayType
)
{}
...
...
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlBitTypeMapping.cs
浏览文件 @
a25593a6
...
...
@@ -6,8 +6,17 @@
namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
{
/// <summary>
/// The type mapping for the PostgreSQL bit string type.
/// </summary>
/// <remarks>
/// See: https://www.postgresql.org/docs/current/static/datatype-bit.html
/// </remarks>
public
class
NpgsqlBitTypeMapping
:
NpgsqlTypeMapping
{
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlBitTypeMapping"/> class.
/// </summary>
public
NpgsqlBitTypeMapping
()
:
base
(
"bit"
,
typeof
(
BitArray
),
NpgsqlDbType
.
Bit
)
{}
protected
NpgsqlBitTypeMapping
(
RelationalTypeMappingParameters
parameters
)
...
...
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlHstoreTypeMapping.cs
浏览文件 @
a25593a6
...
...
@@ -6,10 +6,19 @@
namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
{
/// <summary>
/// The type mapping for the PostgreSQL hstore type.
/// </summary>
/// <remarks>
/// See: https://www.postgresql.org/docs/current/static/hstore.html
/// </remarks>
public
class
NpgsqlHstoreTypeMapping
:
NpgsqlTypeMapping
{
static
readonly
HstoreComparer
ComparerInstance
=
new
HstoreComparer
();
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlHstoreTypeMapping"/> class.
/// </summary>
public
NpgsqlHstoreTypeMapping
()
:
base
(
new
RelationalTypeMappingParameters
(
...
...
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlListTypeMapping.cs
浏览文件 @
a25593a6
...
...
@@ -11,16 +11,23 @@ namespace Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
/// <summary>
/// Maps PostgreSQL arrays to <see cref="List{T}"/>.
/// </summary>
/// <remarks>
/// Note that mapping PostgreSQL arrays to .NET arrays is also supported via <see cref="NpgsqlArrayTypeMapping"/>.
/// See: https://www.postgresql.org/docs/current/static/arrays.html
/// </remarks>
public
class
NpgsqlListTypeMapping
:
RelationalTypeMapping
{
// ReSharper disable once MemberCanBePrivate.Global
/// <summary>
/// The
CLR type of the list items
.
/// The
relational type mapping used to initialize the list mapping
.
/// </summary>
public
RelationalTypeMapping
ElementMapping
{
get
;
}
/// <summary>
/// Creates the default list mapping.
/// </summary>
/// <param name="elementMapping">The element type mapping.</param>
/// <param name="listType">The database type to map.</param>
public
NpgsqlListTypeMapping
(
RelationalTypeMapping
elementMapping
,
Type
listType
)
:
this
(
elementMapping
.
StoreType
+
"[]"
,
elementMapping
,
listType
)
{}
...
...
@@ -65,7 +72,7 @@ protected override string GenerateNonNullSqlLiteral(object value)
#
region
Value
Comparison
// Note that the value comparison code is largely duplicated from NpgsqlAr
ar
yTypeMapping.
// Note that the value comparison code is largely duplicated from NpgsqlAr
ra
yTypeMapping.
// However, a limitation in EF Core prevents us from merging the code together, see
// https://github.com/aspnet/EntityFrameworkCore/issues/11077
...
...
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlNetworkTypeMappings.cs
浏览文件 @
a25593a6
...
...
@@ -6,8 +6,17 @@
namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
{
/// <summary>
/// The type mapping for the PostgreSQL macaddr type.
/// </summary>
/// <remarks>
/// See: https://www.postgresql.org/docs/current/static/datatype-net-types.html#DATATYPE-MACADDR
/// </remarks>
public
class
NpgsqlMacaddrTypeMapping
:
NpgsqlTypeMapping
{
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlMacaddrTypeMapping"/> class.
/// </summary>
public
NpgsqlMacaddrTypeMapping
()
:
base
(
"macaddr"
,
typeof
(
PhysicalAddress
),
NpgsqlDbType
.
MacAddr
)
{}
protected
NpgsqlMacaddrTypeMapping
(
RelationalTypeMappingParameters
parameters
)
...
...
@@ -25,8 +34,17 @@ public override Expression GenerateCodeLiteral(object value)
Expression
.
Constant
(((
PhysicalAddress
)
value
).
ToString
()));
}
/// <summary>
/// The type mapping for the PostgreSQL macaddr8 type.
/// </summary>
/// <remarks>
/// See: https://www.postgresql.org/docs/current/static/datatype-net-types.html#DATATYPE-MACADDR8
/// </remarks>
public
class
NpgsqlMacaddr8TypeMapping
:
NpgsqlTypeMapping
{
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlMacaddr8TypeMapping"/> class.
/// </summary>
public
NpgsqlMacaddr8TypeMapping
()
:
base
(
"macaddr8"
,
typeof
(
PhysicalAddress
),
NpgsqlDbType
.
MacAddr8
)
{}
protected
NpgsqlMacaddr8TypeMapping
(
RelationalTypeMappingParameters
parameters
)
...
...
@@ -44,8 +62,17 @@ public override Expression GenerateCodeLiteral(object value)
Expression
.
Constant
(((
PhysicalAddress
)
value
).
ToString
()));
}
/// <summary>
/// The type mapping for the PostgreSQL inet type.
/// </summary>
/// <remarks>
/// See: https://www.postgresql.org/docs/current/static/datatype-net-types.html#DATATYPE-INET
/// </remarks>
public
class
NpgsqlInetTypeMapping
:
NpgsqlTypeMapping
{
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlInetTypeMapping"/> class.
/// </summary>
public
NpgsqlInetTypeMapping
()
:
base
(
"inet"
,
typeof
(
IPAddress
),
NpgsqlDbType
.
Inet
)
{}
protected
NpgsqlInetTypeMapping
(
RelationalTypeMappingParameters
parameters
)
...
...
@@ -63,8 +90,17 @@ public override Expression GenerateCodeLiteral(object value)
Expression
.
Constant
(((
IPAddress
)
value
).
ToString
()));
}
/// <summary>
/// The type mapping for the PostgreSQL cidr type.
/// </summary>
/// <remarks>
/// See: https://www.postgresql.org/docs/current/static/datatype-net-types.html#DATATYPE-CIDR
/// </remarks>
public
class
NpgsqlCidrTypeMapping
:
NpgsqlTypeMapping
{
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlCidrTypeMapping"/> class.
/// </summary>
public
NpgsqlCidrTypeMapping
()
:
base
(
"cidr"
,
typeof
((
IPAddress
,
int
)),
NpgsqlDbType
.
Cidr
)
{}
protected
NpgsqlCidrTypeMapping
(
RelationalTypeMappingParameters
parameters
)
...
...
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlRangeTypeMapping.cs
浏览文件 @
a25593a6
...
...
@@ -8,12 +8,29 @@
namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
{
/// <summary>
/// The type mapping for the PostgreSQL range types.
/// </summary>
/// <remarks>
/// See: https://www.postgresql.org/docs/current/static/rangetypes.html
/// </remarks>
public
class
NpgsqlRangeTypeMapping
:
NpgsqlTypeMapping
{
[
NotNull
]
readonly
ISqlGenerationHelper
_sqlGenerationHelper
;
// ReSharper disable once MemberCanBePrivate.Global
/// <summary>
/// The relational type mapping used to initialize the bound mapping.
/// </summary>
public
RelationalTypeMapping
SubtypeMapping
{
get
;
}
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlRangeTypeMapping"/> class.
/// </summary>
/// <param name="storeType">The database type to map</param>
/// <param name="clrType">The CLR type to map.</param>
/// <param name="subtypeMapping">The type mapping for the range subtype.</param>
/// <param name="sqlGenerationHelper">The SQL generation helper to delimit the store name.</param>
public
NpgsqlRangeTypeMapping
(
[
NotNull
]
string
storeType
,
[
NotNull
]
Type
clrType
,
...
...
@@ -21,6 +38,14 @@ public class NpgsqlRangeTypeMapping : NpgsqlTypeMapping
[
NotNull
]
ISqlGenerationHelper
sqlGenerationHelper
)
:
this
(
storeType
,
null
,
clrType
,
subtypeMapping
,
sqlGenerationHelper
)
{}
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlRangeTypeMapping"/> class.
/// </summary>
/// <param name="storeType">The database type to map</param>
/// <param name="storeTypeSchema">The schema of the type.</param>
/// <param name="clrType">The CLR type to map.</param>
/// <param name="subtypeMapping">The type mapping for the range subtype.</param>
/// <param name="sqlGenerationHelper">The SQL generation helper to delimit the store name.</param>
public
NpgsqlRangeTypeMapping
(
[
NotNull
]
string
storeType
,
[
CanBeNull
]
string
storeTypeSchema
,
...
...
src/EFCore.PG/Storage/Internal/Mapping/NpgsqlTypeMapping.cs
浏览文件 @
a25593a6
...
...
@@ -6,11 +6,23 @@
namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.Mapping
{
/// <summary>
/// The base class for mapping Npgsql-specific types.
/// </summary>
public
abstract
class
NpgsqlTypeMapping
:
RelationalTypeMapping
{
/// <summary>
/// The database type used by Npgsql.
/// </summary>
public
NpgsqlDbType
NpgsqlDbType
{
get
;
}
// ReSharper disable once PublicConstructorInAbstractClass
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlTypeMapping"/> class.
/// </summary>
/// <param name="storeType">The database type to map.</param>
/// <param name="clrType">The CLR type to map.</param>
/// <param name="npgsqlDbType">The database type used by Npgsql.</param>
public
NpgsqlTypeMapping
(
[
NotNull
]
string
storeType
,
[
NotNull
]
Type
clrType
,
...
...
@@ -18,6 +30,11 @@ public abstract class NpgsqlTypeMapping : RelationalTypeMapping
:
base
(
storeType
,
clrType
)
=>
NpgsqlDbType
=
npgsqlDbType
;
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlTypeMapping"/> class.
/// </summary>
/// <param name="parameters">The parameters for this mapping.</param>
/// <param name="npgsqlDbType">The database type of the range subtype.</param>
protected
NpgsqlTypeMapping
(
RelationalTypeMappingParameters
parameters
,
NpgsqlDbType
npgsqlDbType
)
:
base
(
parameters
)
=>
NpgsqlDbType
=
npgsqlDbType
;
...
...
src/EFCore.PG/Update/Internal/NpgsqlModificationCommandBatch.cs
浏览文件 @
a25593a6
...
...
@@ -10,6 +10,9 @@
namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Update.Internal
{
/// <summary>
/// The Npgsql-specific implementation for <see cref="ModificationCommandBatch" />.
/// </summary>
/// <remarks>
/// The usual ModificationCommandBatch implementation is <see cref="AffectedCountModificationCommandBatch"/>,
/// which selects the number of rows modified via a SQL query.
...
...
@@ -28,6 +31,14 @@ public class NpgsqlModificationCommandBatch : ReaderModificationCommandBatch
readonly
int
_maxBatchSize
;
long
_parameterCount
;
/// <summary>
/// Constructs an instance of the <see cref="NpgsqlModificationCommandBatch"/> class.
/// </summary>
/// <param name="commandBuilderFactory">The builder to build commands.</param>
/// <param name="sqlGenerationHelper">A helper for SQL generation.</param>
/// <param name="updateSqlGenerator">A SQL generator for insert, update, and delete commands.</param>
/// <param name="valueBufferFactoryFactory">A factory for creating <see cref="ValueBuffer" /> factories.</param>
/// <param name="maxBatchSize">The maximum count of commands to batch.</param>
public
NpgsqlModificationCommandBatch
(
[
NotNull
]
IRelationalCommandBuilderFactory
commandBuilderFactory
,
[
NotNull
]
ISqlGenerationHelper
sqlGenerationHelper
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录