strus  0.17
storageAlterMetaDataTableInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_STORAGE_ALTER_META_DATA_TABLE_INTERFACE_HPP_INCLUDED
11 #define _STRUS_STORAGE_ALTER_META_DATA_TABLE_INTERFACE_HPP_INCLUDED
12 #include <string>
13 
14 namespace strus
15 {
16 
20 {
21 public:
24 
28  virtual void addElement(
29  const std::string& name,
30  const std::string& datatype)=0;
31 
36  virtual void alterElement(
37  const std::string& oldname,
38  const std::string& name,
39  const std::string& datatype)=0;
40 
44  virtual void renameElement(
45  const std::string& oldname,
46  const std::string& name)=0;
47 
50  virtual void deleteElement(
51  const std::string& name)=0;
52 
55  virtual void clearElement(
56  const std::string& name)=0;
57 
59  virtual bool commit()=0;
60 
62  virtual void rollback()=0;
63 };
64 
65 }//namespace
66 #endif
67 
68 
virtual ~StorageAlterMetaDataTableInterface()
Destructor that is the doing the rollback too, if commit() was not called before. ...
Definition: storageAlterMetaDataTableInterface.hpp:23
virtual void clearElement(const std::string &name)=0
Declare a meta data element to be reset (all values are reinitialized with their default) ...
virtual void alterElement(const std::string &oldname, const std::string &name, const std::string &datatype)=0
Declare a meta data element to be changed.
Interface to declare changes in the meta data table structure of the storage.
Definition: storageAlterMetaDataTableInterface.hpp:19
virtual bool commit()=0
Write the changes of the meta data table structure to the storage.
virtual void addElement(const std::string &name, const std::string &datatype)=0
Declare a new meta data element.
virtual void rollback()=0
Rollback of the meta data table changes, no changes made.
virtual void renameElement(const std::string &oldname, const std::string &name)=0
Declare a meta data element to be renamed.
virtual void deleteElement(const std::string &name)=0
Declare a meta data element to be deleted.