File tree 3 files changed +5
-6
lines changed
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ class Consumer : public Executor {
128
128
129
129
int getDbId () const
130
130
{
131
- return getConsumerTable ()->getDbConnector ()-> getDbId ();
131
+ return getConsumerTable ()->getDbId ();
132
132
}
133
133
134
134
std::string dumpTuple (swss::KeyOpFieldsValuesTuple &tuple);
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ namespace swss
39
39
}
40
40
41
41
DBConnector::DBConnector (const std::string& dbName, unsigned int timeout, bool isTcpConn)
42
- : m_dbName(dbName)
43
42
{
44
43
if (swss::SonicDBConfig::isInit () == false )
45
44
swss::SonicDBConfig::initialize (" ./database_config.json" );
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ namespace swss
23
23
24
24
bool Table::get (const std::string &key, std::vector<FieldValueTuple> &ovalues)
25
25
{
26
- auto table = gDB [m_pipe-> getDbId ()][getTableName ()];
26
+ auto table = gDB [getDbId ()][getTableName ()];
27
27
if (table.find (key) == table.end ())
28
28
{
29
29
return false ;
@@ -35,7 +35,7 @@ namespace swss
35
35
36
36
bool Table::hget (const std::string &key, const std::string &field, std::string &value)
37
37
{
38
- auto table = gDB [m_pipe-> getDbId ()][getTableName ()];
38
+ auto table = gDB [getDbId ()][getTableName ()];
39
39
if (table.find (key) == table.end ())
40
40
{
41
41
return false ;
@@ -58,14 +58,14 @@ namespace swss
58
58
const std::string &op,
59
59
const std::string &prefix)
60
60
{
61
- auto &table = gDB [m_pipe-> getDbId ()][getTableName ()];
61
+ auto &table = gDB [getDbId ()][getTableName ()];
62
62
table[key] = values;
63
63
}
64
64
65
65
void Table::getKeys (std::vector<std::string> &keys)
66
66
{
67
67
keys.clear ();
68
- auto table = gDB [m_pipe-> getDbId ()][getTableName ()];
68
+ auto table = gDB [getDbId ()][getTableName ()];
69
69
for (const auto &it : table)
70
70
{
71
71
keys.push_back (it.first );
You can’t perform that action at this time.
0 commit comments