Skip to content

Commit 305a511

Browse files
Use the newly added PostgreSQL dialect for tests
1 parent a653cca commit 305a511

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

doc/reference/modules/configuration.xml

+26-5
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,20 @@ var session = sessions.OpenSession(conn);
871871
</para>
872872
</entry>
873873
</row>
874+
<row>
875+
<entry>
876+
<literal>escape_backslash_in_strings</literal>
877+
</entry>
878+
<entry>
879+
Indicates if the database needs to have backslash escaped in string literals.
880+
The default value is dialect dependant. That is <literal>false</literal> for
881+
most dialects.
882+
<para>
883+
<emphasis role="strong">eg.</emphasis>
884+
<literal>true</literal> | <literal>false</literal>
885+
</para>
886+
</entry>
887+
</row>
874888
<row>
875889
<entry>
876890
<literal>show_sql</literal>
@@ -1510,15 +1524,13 @@ in the parameter binding.</programlisting>
15101524
<entry><literal>NHibernate.Dialect.Oracle12cDialect</literal></entry>
15111525
<entry></entry>
15121526
</row>
1513-
<row>
1514-
<entry>PostgreSQL</entry>
1515-
<entry><literal>NHibernate.Dialect.PostgreSQLDialect</literal></entry>
1516-
<entry></entry>
1517-
</row>
15181527
<row>
15191528
<entry>PostgreSQL</entry>
15201529
<entry><literal>NHibernate.Dialect.PostgreSQLDialect</literal></entry>
15211530
<entry>
1531+
This dialect enables backslash escape sequences by default,
1532+
see the <literal>escape_backslash_in_strings</literal> configuration
1533+
property.
15221534
</entry>
15231535
</row>
15241536
<row>
@@ -1545,6 +1557,15 @@ in the parameter binding.</programlisting>
15451557
This dialect supports <literal>XML</literal> type.
15461558
</entry>
15471559
</row>
1560+
<row>
1561+
<entry>PostgreSQL 9.1</entry>
1562+
<entry><literal>NHibernate.Dialect.PostgreSQL91Dialect</literal></entry>
1563+
<entry>
1564+
This dialect disables backslash escape sequences by default
1565+
see the <literal>escape_backslash_in_strings</literal> configuration
1566+
property.
1567+
</entry>
1568+
</row>
15481569
<row>
15491570
<entry>SQLite</entry>
15501571
<entry><literal>NHibernate.Dialect.SQLiteDialect</literal></entry>

psake.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Task Set-Configuration {
3636
'PostgreSQL' = @{
3737
'connection.connection_string' = 'Host=localhost;Port=5432;Username=postgres;Password=Password12!;Database=nhibernate;Enlist=true';
3838
'connection.driver_class' = 'NHibernate.Driver.NpgsqlDriver';
39-
'dialect' = 'NHibernate.Dialect.PostgreSQL83Dialect'
39+
'dialect' = 'NHibernate.Dialect.PostgreSQL91Dialect'
4040
};
4141
'SQLite' = @{
4242
<#

src/NHibernate.Config.Templates/PostgreSQL.cfg.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ for your own use before compile tests in VisualStudio.
1010
<property name="connection.connection_string">
1111
Server=localhost;Database=nhibernate;User ID=nhibernate;Password=nhibernate;Enlist=true;
1212
</property>
13-
<property name="dialect">NHibernate.Dialect.PostgreSQL83Dialect</property>
13+
<property name="dialect">NHibernate.Dialect.PostgreSQL91Dialect</property>
1414
</session-factory>
1515
</hibernate-configuration>

teamcity.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<target name="setup-teamcity-postgresql">
127127
<property name="db-service" value="postgresql-x64-10" />
128128
<property name="nhibernate.connection.driver_class" value="NHibernate.Driver.NpgsqlDriver" />
129-
<property name="nhibernate.dialect" value="NHibernate.Dialect.PostgreSQL83Dialect" />
129+
<property name="nhibernate.dialect" value="NHibernate.Dialect.PostgreSQL91Dialect" />
130130
<property name="nhibernate.connection.connection_string" value="Host=localhost;Port=5432;Database=nhibernate;Username=nhibernate;Password=nhibernate;Enlist=true" />
131131
</target>
132132

0 commit comments

Comments
 (0)