diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-02-01 15:47:37 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-02-01 15:47:37 +0300 |
commit | 62e234c114d2b6ead93a1d39593c66b648c3d0a6 (patch) | |
tree | ce6740b4508eb29400490b20efc8e100e38a7b7f /libodb-oracle/odb/oracle/query-dynamic.ixx | |
parent | 9072842a023c4b65ecb141292c4b63417fee1b98 (diff) |
Turn libodb-oracle repository into package for muti-package repositorylibodb-oracle
Diffstat (limited to 'libodb-oracle/odb/oracle/query-dynamic.ixx')
-rw-r--r-- | libodb-oracle/odb/oracle/query-dynamic.ixx | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/libodb-oracle/odb/oracle/query-dynamic.ixx b/libodb-oracle/odb/oracle/query-dynamic.ixx new file mode 100644 index 0000000..154f5cb --- /dev/null +++ b/libodb-oracle/odb/oracle/query-dynamic.ixx @@ -0,0 +1,72 @@ +// file : odb/oracle/query-dynamic.ixx +// license : ODB NCUEL; see accompanying LICENSE file + +namespace odb +{ + namespace oracle + { + // + // + template <typename T, database_type_id ID> + inline query_column<T, ID>:: + query_column (odb::query_column<T>& qc, + const char* table, + const char* column, + const char* conv, + unsigned short prec, + short scale) + : query_column_base (table, column, conv, prec, scale) + { + native_column_info& ci (qc.native_info[id_oracle]); + ci.column = static_cast<query_column_base*> (this); + + // For some reason GCC needs this statically-typed pointer in + // order to instantiate the functions. + // + query_param_factory f (&query_param_factory_impl<T, ID>); + ci.param_factory = reinterpret_cast<void*> (f); + } + + template <typename T> + inline query_column<T, id_blob>:: + query_column (odb::query_column<T>& qc, + const char* table, const char* column, const char*) + : lob_query_column (table, column) + { + native_column_info& ci (qc.native_info[id_oracle]); + ci.column = static_cast<query_column_base*> (this); + + // In Oracle LOBs cannot be compared. + // + ci.param_factory = 0; + } + + template <typename T> + inline query_column<T, id_clob>:: + query_column (odb::query_column<T>& qc, + const char* table, const char* column, const char*) + : lob_query_column (table, column) + { + native_column_info& ci (qc.native_info[id_oracle]); + ci.column = static_cast<query_column_base*> (this); + + // In Oracle LOBs cannot be compared. + // + ci.param_factory = 0; + } + + template <typename T> + inline query_column<T, id_nclob>:: + query_column (odb::query_column<T>& qc, + const char* table, const char* column, const char*) + : lob_query_column (table, column) + { + native_column_info& ci (qc.native_info[id_oracle]); + ci.column = static_cast<query_column_base*> (this); + + // In Oracle LOBs cannot be compared. + // + ci.param_factory = 0; + } + } +} |