[odb-users] Querying with native SQL Statements
boris at codesynthesis.com
Fri Mar 26 05:26:23 EDT 2021
Raj, Phani <PRAJ at beckman.com> writes:
> * Views will work on queries that are created at design time.
More precisely, native views will work for queries which have the
number of columns in the result and their types known at design
time. In other words, you can execute multiple queries with varying
"WHERE ..." clauses using a single native view.
> My App needs to generate the SQL Statement dynamically as we are
> using a lot of polymorphic objects in a large hierarchy. So we
> want to use the query by simply building the query and execute
> them to return the results.
As I mentioned above, if the result of such a query is "fixed"
at compile-time, then you can use a native view. If you need
to execute a (SELECT) query with a result set that is only
know at runtime, then ODB won't be of much help to you and you
are probably better off using a fully dynamic API like ODBC
(or low-level wrappers found in libodb-<db> libraries).
More information about the odb-users