Open TomasTurina opened 2 months ago
I've reviewed the existing components related to persistence:
Persistence.hpp: This is an interface class responsible for defining how messages are stored and retrieved from a message queue.
PersistenceFactory.hpp: A factory class that currently instantiates a Persistence
object, limited to the SQLiteStorage for now.
SQLiteStorage: A concrete implementation of the Persistence
interface, handling the storage and retrieval of messages specifically within a SQLite database.
SQLiteManager: A more generic SQL operation implementation, designed to provide broader database functionality.
I'm examining these classes to develop a structured plan moving forward.
Created branch and started doing a preparatory cleanup. Created outline for a common interface that can implement different relational db.
Worked on modifying AgentInfoPersistence to use the SQLiteManager.
AgentInfoPersistence now is fully implemented with SQLiteManager. Currently working on moving MultiTypeQueue and Persistence to use it too.
Made several fixes and separated what was ready for merging from the other developments. Branch was merged and issue is now on hold.
Description
With the development of the new sqlite_manager, we have a centralized place to manage database queries.
Currently this component is only being used by
command_store
, but we also need to start using it in the following components:agent_info
related PR: https://github.com/wazuh/wazuh-agent/pull/276multitype_queue
dbsync
This issue consists of starting to use the new database manager in the mentioned components to avoid having duplicate code and centralize access to the databases.
Considerations
sqlite_manager
component topersistence
.