Skip to content

Commit 6aef609

Browse files
Quick&Dirty driver for Anywhere 17.
1 parent a602b00 commit 6aef609

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
namespace NHibernate.Driver
2+
{
3+
/// <summary>
4+
/// The SybaseSQLAnywhereDriver Driver provides a database driver for Sap SQL Anywhere 17 and above
5+
/// </summary>
6+
public class SapSQLAnywhere17Driver : ReflectionBasedDriver
7+
{
8+
/// <summary>
9+
/// Initializes a new instance of the <see cref="SapSQLAnywhere17Driver"/> class.
10+
/// </summary>
11+
/// <exception cref="HibernateException">
12+
/// Thrown when the Sap.Data.SQLAnywhere assembly is not found or can not be loaded.
13+
/// </exception>
14+
public SapSQLAnywhere17Driver()
15+
: base("Sap.Data.SQLAnywhere.v4.5", "Sap.Data.SQLAnywhere.SAConnection", "Sap.Data.SQLAnywhere.SACommand")
16+
{
17+
}
18+
19+
public override bool UseNamedPrefixInSql => true;
20+
21+
public override bool UseNamedPrefixInParameter => true;
22+
23+
public override string NamedPrefix => ":";
24+
25+
public override bool RequiresTimeSpanForTime => true;
26+
}
27+
}

src/NHibernate/NHibernate.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
<Compile Include="Context\AsyncLocalSessionContext.cs" />
148148
<Compile Include="Dialect\AnsiSqlKeywords.cs" />
149149
<Compile Include="Dialect\PostgreSQL83Dialect.cs" />
150+
<Compile Include="Driver\SapSQLAnywhere17Driver.cs" />
150151
<Compile Include="Impl\ISharedSessionCreationOptions.cs" />
151152
<Compile Include="ISharedSessionBuilder.cs" />
152153
<Compile Include="IStatelessSessionBuilder.cs" />

0 commit comments

Comments
 (0)