aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/statement.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-08-30 06:05:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-08-30 06:05:32 +0200
commitb5ed13549a87dccb56f756d6fbc5f7bf537e9640 (patch)
treefbd04a8212da865758db44b6f41c2d4818eea359 /odb/pgsql/statement.hxx
parent0745f84e2d5c7133f6ee6608487089d69d7ad519 (diff)
Statement processing/optimization base work
Diffstat (limited to 'odb/pgsql/statement.hxx')
-rw-r--r--odb/pgsql/statement.hxx28
1 files changed, 27 insertions, 1 deletions
diff --git a/odb/pgsql/statement.hxx b/odb/pgsql/statement.hxx
index 8effbe1..4cc1f42 100644
--- a/odb/pgsql/statement.hxx
+++ b/odb/pgsql/statement.hxx
@@ -71,22 +71,34 @@ namespace odb
bool truncated = false);
protected:
+ // We keep two versions to take advantage of std::string COW.
+ //
statement (connection_type&,
const std::string& name,
const std::string& text,
+ statement_kind,
+ const binding* process,
+ bool optimize,
const Oid* types,
std::size_t types_count);
statement (connection_type&,
const char* name,
const char* text,
+ statement_kind,
+ const binding* process,
+ bool optimize,
bool copy_name_text,
const Oid* types,
std::size_t types_count);
private:
void
- init (const Oid* types, std::size_t types_count);
+ init (statement_kind,
+ const binding* process,
+ bool optimize,
+ const Oid* types,
+ std::size_t types_count);
protected:
connection_type& conn_;
@@ -110,6 +122,8 @@ namespace odb
select_statement (connection_type& conn,
const std::string& name,
const std::string& text,
+ bool process_text,
+ bool optimize_text,
const Oid* types,
std::size_t types_count,
binding& param,
@@ -119,6 +133,8 @@ namespace odb
select_statement (connection_type& conn,
const char* name,
const char* stmt,
+ bool process_text,
+ bool optimize_text,
const Oid* types,
std::size_t types_count,
binding& param,
@@ -129,17 +145,23 @@ namespace odb
select_statement (connection_type& conn,
const std::string& name,
const std::string& text,
+ bool process_text,
+ bool optimize_text,
binding& result);
select_statement (connection_type& conn,
const char* name,
const char* text,
+ bool process_text,
+ bool optimize_text,
binding& result,
bool copy_name_text = true);
select_statement (connection_type& conn,
const std::string& name,
const std::string& text,
+ bool process_text,
+ bool optimize_text,
const Oid* types,
std::size_t types_count,
native_binding& native_param,
@@ -240,6 +262,7 @@ namespace odb
insert_statement (connection_type& conn,
const std::string& name,
const std::string& text,
+ bool process_text,
const Oid* types,
std::size_t types_count,
binding& param,
@@ -249,6 +272,7 @@ namespace odb
insert_statement (connection_type& conn,
const char* name,
const char* text,
+ bool process_text,
const Oid* types,
std::size_t types_count,
binding& param,
@@ -289,6 +313,7 @@ namespace odb
update_statement (connection_type& conn,
const std::string& name,
const std::string& text,
+ bool process_text,
const Oid* types,
std::size_t types_count,
binding& param,
@@ -297,6 +322,7 @@ namespace odb
update_statement (connection_type& conn,
const char* name,
const char* text,
+ bool process_text,
const Oid* types,
std::size_t types_count,
binding& param,