aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/statement.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-09-03 12:49:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-09-03 12:49:14 +0200
commit3b9fabfc20089fe9e9279a287c1db5bb37a6d275 (patch)
tree36d694072d10d9d95d0c24ed18fbda3029d79601 /odb/pgsql/statement.hxx
parent9715f388db714fb663b854883e4cad5f2aa3c860 (diff)
Handling of dynamic empty statements as result of versioning
Diffstat (limited to 'odb/pgsql/statement.hxx')
-rw-r--r--odb/pgsql/statement.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/odb/pgsql/statement.hxx b/odb/pgsql/statement.hxx
index 4cc1f42..6c6095c 100644
--- a/odb/pgsql/statement.hxx
+++ b/odb/pgsql/statement.hxx
@@ -50,6 +50,17 @@ namespace odb
return conn_;
}
+ // A statement can be empty. This is used to handle situations
+ // where a SELECT or UPDATE statement ends up not having any
+ // columns after processing. An empty statement cannot be
+ // executed.
+ //
+ bool
+ empty () const
+ {
+ return *text_ == '\0';
+ }
+
void
deallocate ();