summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbpp/command.h3
-rw-r--r--libdbpp/connection.h12
2 files changed, 13 insertions, 2 deletions
diff --git a/libdbpp/command.h b/libdbpp/command.h
index 90bd5e4..40b5e2a 100644
--- a/libdbpp/command.h
+++ b/libdbpp/command.h
@@ -26,8 +26,7 @@ namespace DB {
virtual void bindNull(unsigned int i) = 0;
- protected:
- std::string sql;
+ const std::string sql;
};
}
diff --git a/libdbpp/connection.h b/libdbpp/connection.h
index 8959840..b350842 100644
--- a/libdbpp/connection.h
+++ b/libdbpp/connection.h
@@ -6,6 +6,16 @@
namespace DB {
class SelectCommand;
class ModifyCommand;
+ enum BulkDeleteStyle {
+ BulkDeleteUsingSubSelect,
+ BulkDeleteUsingUsing,
+ BulkDeleteUsingUsingAlias,
+ };
+ enum BulkUpdateStyle {
+ BulkUpdateByIteration,
+ BulkUpdateUsingFromSrc,
+ BulkUpdateUsingJoin,
+ };
class Connection {
public:
virtual ~Connection();
@@ -15,6 +25,8 @@ namespace DB {
virtual int rollbackTx() const = 0;
virtual bool inTx() const = 0;
virtual void ping() const = 0;
+ virtual BulkDeleteStyle bulkDeleteStyle() const = 0;
+ virtual BulkUpdateStyle bulkUpdateStyle() const = 0;
virtual SelectCommand * newSelectCommand(const std::string & sql) const = 0;
virtual ModifyCommand * newModifyCommand(const std::string & sql) const = 0;