/src/NHibernate/Driver/CsharpSqliteDriver.cs

https://github.com/whut/nhibernate-core · C# · 53 lines · 29 code · 4 blank · 20 comment · 0 complexity · 4a435ef1abba488f1c4adfd409bac1f8 MD5 · raw file

  1. namespace NHibernate.Driver
  2. {
  3. /// <summary>
  4. /// NHibernate driver for the Community CsharpSqlite data provider.
  5. /// <p>
  6. /// Author: <a href="mailto:nick_tountas@hotmail.com"> Nikolaos Tountas </a>
  7. /// </p>
  8. /// </summary>
  9. /// <remarks>
  10. /// <p>
  11. /// In order to use this Driver you must have the Community.CsharpSqlite.dll and Community.CsharpSqlite.SQLiteClient assemblies referenced.
  12. /// </p>
  13. /// <p>
  14. /// Please check <a href="http://code.google.com/p/csharp-sqlite/"> http://code.google.com/p/csharp-sqlite/ </a> for more information regarding csharp-sqlite.
  15. /// </p>
  16. /// </remarks>
  17. public class CsharpSqliteDriver : ReflectionBasedDriver
  18. {
  19. /// <summary>
  20. /// Initializes a new instance of <see cref="CsharpSqliteDriver"/>.
  21. /// </summary>
  22. /// <exception cref="HibernateException">
  23. /// Thrown when the <c>Community.CsharpSqlite.dll</c> assembly can not be loaded.
  24. /// </exception>
  25. public CsharpSqliteDriver()
  26. : base(
  27. "Community.CsharpSqlite.SQLiteClient",
  28. "Community.CsharpSqlite.SQLiteClient.SqliteConnection",
  29. "Community.CsharpSqlite.SQLiteClient.SqliteCommand")
  30. {
  31. }
  32. public override bool UseNamedPrefixInSql
  33. {
  34. get { return true; }
  35. }
  36. public override bool UseNamedPrefixInParameter
  37. {
  38. get { return true; }
  39. }
  40. public override string NamedPrefix
  41. {
  42. get { return "@"; }
  43. }
  44. public override bool SupportsMultipleOpenReaders
  45. {
  46. get { return false; }
  47. }
  48. }
  49. }