make it more obvious that name is used in the select

This commit is contained in:
Chris Cromer 2023-02-16 00:44:32 -03:00
parent f7b62e4645
commit 7b515f1f07
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
7 changed files with 10 additions and 10 deletions

View File

@ -142,17 +142,17 @@ void obelisk::KnowledgeBase::addFacts(std::vector<obelisk::Fact>& facts)
void obelisk::KnowledgeBase::getEntity(obelisk::Entity& entity) void obelisk::KnowledgeBase::getEntity(obelisk::Entity& entity)
{ {
entity.select(dbConnection_); entity.selectByName(dbConnection_);
} }
void obelisk::KnowledgeBase::getVerb(obelisk::Verb& verb) void obelisk::KnowledgeBase::getVerb(obelisk::Verb& verb)
{ {
verb.select(dbConnection_); verb.selectByName(dbConnection_);
} }
void obelisk::KnowledgeBase::getFact(obelisk::Fact& fact) void obelisk::KnowledgeBase::getFact(obelisk::Fact& fact)
{ {
fact.select(dbConnection_); fact.selectByName(dbConnection_);
} }
void obelisk::KnowledgeBase::getFloat(float& result1, float& result2, double var) void obelisk::KnowledgeBase::getFloat(float& result1, float& result2, double var)

View File

@ -12,7 +12,7 @@ const char* obelisk::Entity::createTable()
)"; )";
} }
void obelisk::Entity::select(sqlite3* dbConnection) void obelisk::Entity::selectByName(sqlite3* dbConnection)
{ {
if (dbConnection == nullptr) if (dbConnection == nullptr)
{ {

View File

@ -108,11 +108,11 @@ namespace obelisk
/** /**
* @brief Select an Entity from the database based on the object's * @brief Select an Entity from the database based on the object's
* ID. * name.
* *
* @param[in] dbConnection The database connection to use. * @param[in] dbConnection The database connection to use.
*/ */
void select(sqlite3* dbConnection); void selectByName(sqlite3* dbConnection);
/** /**
* @brief Insert an Entity into the database based on the object's * @brief Insert an Entity into the database based on the object's

View File

@ -19,7 +19,7 @@ const char* obelisk::Fact::createTable()
)"; )";
} }
void obelisk::Fact::select(sqlite3* dbConnection) void obelisk::Fact::selectByName(sqlite3* dbConnection)
{ {
if (dbConnection == nullptr) if (dbConnection == nullptr)
{ {

View File

@ -76,7 +76,7 @@ namespace obelisk
bool& getIsTrue(); bool& getIsTrue();
void setIsTrue(bool isTrue); void setIsTrue(bool isTrue);
void select(sqlite3* dbConnection); void selectByName(sqlite3* dbConnection);
void insert(sqlite3* dbConnection); void insert(sqlite3* dbConnection);
}; };
} // namespace obelisk } // namespace obelisk

View File

@ -14,7 +14,7 @@ const char* obelisk::Verb::createTable()
)"; )";
} }
void obelisk::Verb::select(sqlite3* dbConnection) void obelisk::Verb::selectByName(sqlite3* dbConnection)
{ {
if (dbConnection == nullptr) if (dbConnection == nullptr)
{ {

View File

@ -112,7 +112,7 @@ namespace obelisk
* *
* @param[in] dbConnection The database connection to use. * @param[in] dbConnection The database connection to use.
*/ */
void select(sqlite3* dbConnection); void selectByName(sqlite3* dbConnection);
/** /**
* @brief Insert a new verb into the KnowledgeBase. * @brief Insert a new verb into the KnowledgeBase.