Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NHibernate with Firebird... are these features enabled?

We're using NHibernate to great success with a Firebird backend. My question relates to the features available in NHibernate being supported by Firebird. If you have any expertise with Firebird and NHibernate your comments are welcome.

  1. Does Firebird support "Future" queries? From my reading it would appear that Firebird is one of a few databases that doesn't support this feature. Does anyone have a workaround as "Future" would be a good feature to utilise.

  2. Does Firebird support the NHibernate feature "prepare_sql". For some reason I cannot get this to work in Firebird and continually receive the warning (in Nhibernate Profiler) about parameter sizes not being equal.

  3. Does Firebird support batching? In NHibernate mappings we specify batching however cannot see any evidence of this in the profiler.

For those interested we are using Fluent NHibernate to configure NHibernate. Everything works well and we have a great deal of control over the ORM however just need clarification on the above items.

Your thoughts?

like image 827
Kotarsi Avatar asked Jun 16 '11 16:06

Kotarsi


2 Answers

As far as I know batching is supported only for MsSql and Oracle. Not even MySql has batching support.

You can always download NH source code and take a look if these features are supported. IMO firebird is not very popular in recent years and it is possible that there is not much interes in bringing these features in NH for firebird.

like image 78
pero Avatar answered Nov 20 '22 13:11

pero


"Future" is a feature of NHibernate. From what I understood by reading about futures the database feature needed would be to send multiple statements in one batch (round-trip) to the server and receive the results back in one batch, too.

I think Firebird doesn't allow this, since you have to prepare and execute statements individually.

Though if you only do insert/update/delete you could group those statements within an execute block statement, but that can only return one result set.

To get a definitive answer be sure to ask this in the firebird-support mailing list.

like image 28
magnoz Avatar answered Nov 20 '22 11:11

magnoz