diff options
author | Constantin Michael <constantin@codesynthesis.com> | 2011-09-16 10:04:45 +0200 |
---|---|---|
committer | Constantin Michael <constantin@codesynthesis.com> | 2011-09-16 10:04:45 +0200 |
commit | a5510b8f0ef6d5aa7cce21a719de726b669aa394 (patch) | |
tree | 14d3d5bd1f5eb32543e647470c5488dd82757bd4 | |
parent | ee99d2c795d9b6afc263f7ae5c15a62abd258e4e (diff) |
Allow select statement without parameters
-rw-r--r-- | odb/oracle/statement.cxx | 13 | ||||
-rw-r--r-- | odb/oracle/statement.hxx | 6 |
2 files changed, 18 insertions, 1 deletions
diff --git a/odb/oracle/statement.cxx b/odb/oracle/statement.cxx index 70859a4..5a31a13 100644 --- a/odb/oracle/statement.cxx +++ b/odb/oracle/statement.cxx @@ -326,7 +326,7 @@ namespace odb const string& s, binding& cond, binding& data, - std::size_t lob_prefetch_size) + size_t lob_prefetch_size) : statement (conn, s), done_ (false) { @@ -334,6 +334,17 @@ namespace odb bind_result (data.bind, data.count, lob_prefetch_size); } + select_statement:: + select_statement (connection& conn, + const string& s, + binding& data, + size_t lob_prefetch_size) + : statement (conn, s), + done_ (false) + { + bind_result (data.bind, data.count, lob_prefetch_size); + } + void select_statement:: execute () { diff --git a/odb/oracle/statement.hxx b/odb/oracle/statement.hxx index add263a..8d0b491 100644 --- a/odb/oracle/statement.hxx +++ b/odb/oracle/statement.hxx @@ -76,6 +76,12 @@ namespace odb binding& cond, binding& data, std::size_t lob_prefetch_size = 0); + + select_statement (connection& conn, + const std::string& statement, + binding& data, + std::size_t lob_prefetch_size = 0); + enum result { success, |