|
C++ YT Wrapper
C++ library for working with YT clusters
|
RAII class for working with temporary tables. Constructor of this class creates temporary table and destructor removes it. More...
#include <temp.h>
Public Member Functions | |
| TTempTable (IClientBasePtr client, const TString &prefix={}, const TYPath &directory={}, const TCreateOptions &options={}) | |
| Constructor creates temporary table. | |
| TTempTable (const TTempTable &)=delete | |
| TTempTable & | operator= (const TTempTable &)=delete |
| TTempTable (TTempTable &&) noexcept | |
| TTempTable & | operator= (TTempTable &&) |
| TString | Name () const & |
| Return full path to the table. | |
| TString | Name () &&=delete |
| TString | Release () |
| Release table and return its path. Table will not be deleted by TTempTable destructor after this call. | |
Static Public Member Functions | |
| static TTempTable | CreateAutoremovingTable (IClientBasePtr client, TYPath path, const TCreateOptions &options) |
| Create table with given path that will be autoremoved in RAII manner. | |
RAII class for working with temporary tables. Constructor of this class creates temporary table and destructor removes it.
CAVEAT: when using with transactions destructor of TTempTable should be called before commiting transaction.
|
explicit |
Constructor creates temporary table.
| client | – YT client or transaction object. |
| prefix | – table name prefix |
| directory | – path to directory where temporary table will be created. |
| options | – options to be passed for table creation (might be useful if we want to set table attributes) |
|
static |
Create table with given path that will be autoremoved in RAII manner.
In contrast to TTempTable constructor this function uses provided path to table and don't modify it in any manner. It's user responsibility to provide unique path.