Skip to content
Snippets Groups Projects
Commit 78be091b authored by Vladislav Shpilevoy's avatar Vladislav Shpilevoy Committed by Roman Tsisyk
Browse files

alter: add Handler::format()

Needed to get format fields during alter in #2754
parent d1e7ee51
No related branches found
No related tags found
No related merge requests found
......@@ -270,6 +270,12 @@ Handler::bsize() const
return 0;
}
struct tuple_format *
Handler::format()
{
return NULL;
}
/* }}} DDL */
/* {{{ Engine API */
......
......@@ -274,6 +274,14 @@ struct Handler {
/** Binary size of a space. */
virtual size_t
bsize() const;
/**
* Get format of a space.
* @retval not NULL Space format.
* @retval NULL Space has no format (Sysview engine,
* for example).
*/
virtual struct tuple_format *
format();
Engine *engine;
};
......
......@@ -786,4 +786,10 @@ MemtxSpace::commitAlterSpace(struct space *old_space, struct space *new_space)
((MemtxSpace *)old_space->handler)->m_bsize;
}
struct tuple_format *
MemtxSpace::format()
{
return m_format;
}
/* }}} DDL */
......@@ -106,6 +106,8 @@ struct MemtxSpace: public Handler {
updateBsize(const struct tuple *old_tuple,
const struct tuple *new_tuple);
virtual struct tuple_format *
format() override;
public:
/**
* A pointer to replace function, set to different values
......
......@@ -278,4 +278,10 @@ VinylSpace::commitAlterSpace(struct space *old_space, struct space *new_space)
diag_raise();
}
struct tuple_format *
VinylSpace::format()
{
return m_format;
}
/* }}} DDL */
......@@ -70,6 +70,8 @@ struct VinylSpace: public Handler {
*/
virtual void commitAlterSpace(struct space *old_space,
struct space *new_space) override;
virtual struct tuple_format *
format() override;
private:
struct tuple_format *m_format;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment