Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 272981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:23:13+00:00 2026-05-12T00:23:13+00:00

If I needed to get NHibernate to support more databases (not included in the

  • 0

If I needed to get NHibernate to support more databases (not included in the list of supported: https://www.hibernate.org/361.html), assuming that database can be accessed using it’s built-in query language,but not SQL (example: http://kx.com/Products/kdb+.php)…

  • How will I be able to get NHibernate to work with these databases?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T00:23:13+00:00Added an answer on May 12, 2026 at 12:23 am

    NHibernate is designed to operate with dialects of SQL and not ad hoc query languages. This will be very tricky to accomplish. But to answer your question, you need:

    1. An ADO.NET provider for your database (this would be a separate question).
    2. A Driver class (derived from NHibernate’s DriverBase). Here is one I have written in the past (somewhat anonymised):

      public sealed class XxxClientDriver : DriverBase
      {
          public override IDbConnection CreateConnection()
          {
              return XxxClientFactory.Instance.CreateConnection();
          }
          public override IDbCommand CreateCommand()
          {
              return XxxClientFactory.Instance.CreateCommand();
          }
          public override bool UseNamedPrefixInSql
          {
              get { return true; }
          }
          public override bool UseNamedPrefixInParameter
          {
              get { return true; }
          }
          public override string NamedPrefix
          {
              get { return "@"; }
          }
      }
      
    3. Possibly (definitely in your case) a Dialect, deriving from NHibernate’s Dialect class, that defines classes to render each particular syntax element in your language (note, though, that this is still SQL-orientated, which is I suspect where you are going to fall down here). An example in my case:

      public sealed class XxxDialect : Dialect
      {
          public override JoinFragment CreateOuterJoinFragment()
          {
              return new XxxJoinFragment();
          }
      }
      
    4. As many non-standard syntax elements (compared to normal SQL) as your language has. Again, an example from my case:

      public sealed class XxxJoinFragment : JoinFragment
      {
          private readonly SqlStringBuilder _afterFrom;
          public XxxJoinFragment()
          {
              _afterFrom = new SqlStringBuilder();
          }
          private SqlStringBuilder AfterFrom
          {
              get { return _afterFrom; }
          }
          public override SqlString ToFromFragmentString
          {
              get { return _afterFrom.ToSqlString(); }
          }
          public override SqlString ToWhereFragmentString
          {
              get { return SqlString.Empty; }
          }
          public override void AddJoin(string tableName, string alias,
              string[] fkColumns, string[] pkColumns,
              JoinType joinType)
          {
              AddCrossJoin(tableName, alias);
          }
          public override void AddJoin(string tableName, string alias,
              string[] fkColumns, string[] pkColumns,
              JoinType joinType, string on)
          {
              AddJoin(tableName, alias, fkColumns, pkColumns, joinType);
          }
          public override void AddCrossJoin(string tableName, string alias)
          {
              AfterFrom.Add(", ").Add(tableName).Add(" ").Add(alias);
          }
          public override void AddJoins(SqlString fromFragment, SqlString whereFragment)
          {
              AddFromFragmentString(fromFragment);
          }
          public override bool AddCondition(string condition)
          {
              return true;
          }
          public override bool AddCondition(SqlString condition)
          {
              return true;
          }
          public override void AddFromFragmentString(SqlString fromFragmentString)
          {
              AfterFrom.Add(fromFragmentString);
          }
      }
      

    As you can see, in my case (a SQL-based query language with implicit join conditions) this was not too hard. But in your case I suspect you’re going to be up against it. Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi found below forum which describes not to use Spring hibernate template: http://forum.springsource.org/showthread.php?111771-what-is-the-difference-between-hibernate-template-and-hibernate-dao-support .
I want to make one project that parse wiki pages and get needed information
I could get the handle to the google text doc i needed. I am
i needed help. How do i get domain from a string? For example: Hi
I can't get why, but suddenly some css broke and I was needed to
** EDIT ** Nevermind, just needed to take out the parens... I get this
I recently needed to get the integrity level of a process, and I found
i'm trying to get my head around 2nd Level Caching in Fluent NHibernate. So
I am seeking a way to get information about my hibernate entity classes at
I am attempting to get nhibernate working in medium-trust. What I found said that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.