Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/redisselect.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class RedisSelect : public Selectable
bool hasCachedData() override;
bool initializedWithData() override;
void updateAfterRead() override;
int getDbConnectorId() override;
std::string getDbNamespace() override;
int getDbConnectorId();
std::string getDbNamespace();
Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft Sep 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest add only one function const DBConnector* getDbConnector() const, and caller could call ret->getNamespace(), or any other member functions. #Closed

Copy link
Copy Markdown
Contributor Author

@abdosi abdosi Sep 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


/* Create a new redisContext, SELECT DB and SUBSCRIBE */
void subscribe(DBConnector* db, const std::string &channelName);
Expand Down
10 changes: 0 additions & 10 deletions common/selectable.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ class Selectable
return m_priority;
}

virtual int getDbConnectorId()
{
return 0;
}

virtual std::string getDbNamespace()
{
return std::string();
}

private:

friend class Select;
Expand Down
6 changes: 6 additions & 0 deletions pyext/swsscommon.i
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
%typemap(in, numinputs=0) swss::Selectable ** (swss::Selectable *temp) {
$1 = &temp;
}

%inline %{
swss::RedisSelect *CastSelectableToRedisSelectObj(swss::Selectable *temp) {
return dynamic_cast<swss::RedisSelect *>(temp);
}
%}
%typemap(argout) swss::Selectable ** {
PyObject* temp = NULL;
if (!PyList_Check($result)) {
Expand Down