File tree Expand file tree Collapse file tree 5 files changed +32
-2
lines changed
src/Simplify.FluentNHibernate Expand file tree Collapse file tree 5 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ 3.2.0] - 2024-04-26
4+
5+ ### Added
6+
7+ - PostgreSQL 8.3 dialect which uses timestamptz DateTime format
8+
39## [ 3.1.0] - 2024-03-24
410
511### Added
Original file line number Diff line number Diff line change 55using Microsoft . Extensions . Configuration ;
66using NHibernate . Dialect ;
77using NHibernate . Driver ;
8+ using Pas . Database . Session . Dialects ;
89using Simplify . FluentNHibernate . Dialects ;
910using Simplify . FluentNHibernate . Drivers ;
1011using Simplify . FluentNHibernate . Interceptors ;
@@ -613,6 +614,7 @@ private static void InitializeFromConfigPostgreSql(FluentConfiguration fluentCon
613614 PostgreSqlDialect . PostgreSQL81 => PostgreSQLConfiguration . PostgreSQL81 ,
614615 PostgreSqlDialect . PostgreSQL82 => PostgreSQLConfiguration . PostgreSQL82 ,
615616 PostgreSqlDialect . PostgreSQL83 => PostgreSQLConfiguration . PostgreSQL83 ,
617+ PostgreSqlDialect . PostgreSQL83Z => PostgreSQLConfiguration . PostgreSQL83 ,
616618 _ => throw new InvalidOperationException ( )
617619 } ;
618620
@@ -623,6 +625,9 @@ private static void InitializeFromConfigPostgreSql(FluentConfiguration fluentCon
623625 . Username ( settings . UserName )
624626 . Password ( settings . UserPassword ) ) ;
625627
628+ if ( dialect == PostgreSqlDialect . PostgreSQL83Z )
629+ clientConfiguration . Dialect < PostgreSql83ZDialect > ( ) ;
630+
626631 additionalClientConfiguration ? . Invoke ( clientConfiguration ) ;
627632
628633 fluentConfiguration . Database ( clientConfiguration ) ;
Original file line number Diff line number Diff line change 1+ using System . Data ;
2+ using NHibernate . Dialect ;
3+
4+ namespace Pas . Database . Session . Dialects ;
5+
6+ /// <summary>
7+ /// Provides PostgreSQL dialect which uses timestamptz DateTime format
8+ /// </summary>
9+ public class PostgreSql83ZDialect : PostgreSQL83Dialect
10+ {
11+ /// <summary>
12+ /// Initialize PostgreSql83WithUtcDialect
13+ /// </summary>
14+ public PostgreSql83ZDialect ( ) => RegisterColumnType ( DbType . DateTime , "timestamptz" ) ;
15+ }
Original file line number Diff line number Diff line change @@ -20,5 +20,9 @@ public enum PostgreSqlDialect
2020 /// <summary>
2121 /// The PostgreSQL 8.3 dialect
2222 /// </summary>
23- PostgreSQL83
23+ PostgreSQL83 ,
24+ /// <summary>
25+ /// The PostgreSQL 8.3 dialect using timestamptz DateTime format
26+ /// </summary>
27+ PostgreSQL83Z
2428}
Original file line number Diff line number Diff line change 88 <SymbolPackageFormat >snupkg</SymbolPackageFormat >
99 <GenerateDocumentationFile >true</GenerateDocumentationFile >
1010
11- <Version >3.1 </Version >
11+ <Version >3.2 </Version >
1212
1313 <Authors >Alexander Krylkov</Authors >
1414 <Product >Simplify</Product >
You can’t perform that action at this time.
0 commit comments