File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ namespace NHibernate . Driver
2
+ {
3
+ /// <summary>
4
+ /// Provides a database driver for dotConnect for MySQL by DevArt.
5
+ /// </summary>
6
+ /// <remarks>
7
+ /// <para>
8
+ /// In order to use this driver you must have the assembly <c>Devart.Data.MySql.dll</c> available for
9
+ /// NHibernate to load, including its dependencies (<c>Devart.Data.dll</c>).
10
+ /// </para>
11
+ /// <para>
12
+ /// Please check the product's <see href="http://www.devart.com/dotconnect/mysql/">website</see>
13
+ /// for any updates and/or documentation regarding dotConnect for MySQL.
14
+ /// </para>
15
+ /// </remarks>
16
+ public class DotConnectMySqlDriver : ReflectionBasedDriver
17
+ {
18
+ /// <summary>
19
+ /// Initializes a new instance of the <see cref="DotConnectMySqlDriver"/> class.
20
+ /// </summary>
21
+ /// <exception cref="HibernateException">
22
+ /// Thrown when the <c>Devart.Data.MySql</c> assembly can not be loaded.
23
+ /// </exception>
24
+ public DotConnectMySqlDriver ( ) : base (
25
+ "Devart.Data.MySql" ,
26
+ "Devart.Data.MySql.NHibernate.NHibernateMySqlConnection" ,
27
+ "Devart.Data.MySql.NHibernate.NHibernateMySqlCommand" )
28
+ {
29
+ }
30
+
31
+ /// <summary>
32
+ /// Devart.Data.MySql uses named parameters in the sql.
33
+ /// </summary>
34
+ /// <value><see langword="true" /> - MySql uses <c>@</c> in the sql.</value>
35
+ public override bool UseNamedPrefixInSql
36
+ {
37
+ get { return true ; }
38
+ }
39
+
40
+ /// <summary></summary>
41
+ public override bool UseNamedPrefixInParameter
42
+ {
43
+ get { return true ; }
44
+ }
45
+
46
+ /// <summary>
47
+ /// Devart.Data.MySql use the <c>@</c> to locate parameters in sql.
48
+ /// </summary>
49
+ /// <value><c>@</c> is used to locate parameters in sql.</value>
50
+ public override string NamedPrefix
51
+ {
52
+ get { return "@" ; }
53
+ }
54
+ }
55
+ }
Original file line number Diff line number Diff line change 159
159
<Compile Include =" Dialect\SybaseSQLAnywhere12Dialect.cs" />
160
160
<Compile Include =" Dialect\TypeNames.cs" />
161
161
<Compile Include =" Driver\DB2Driver.cs" />
162
+ <Compile Include =" Driver\DotConnectMySqlDriver.cs" />
162
163
<Compile Include =" Driver\DriverBase.cs" />
163
164
<Compile Include =" Driver\FirebirdDriver.cs" />
164
165
<Compile Include =" Driver\IDriver.cs" />
You can’t perform that action at this time.
0 commit comments