-
Notifications
You must be signed in to change notification settings - Fork 3
SQLite Implementation into DataContainer #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GregoryFan
wants to merge
11
commits into
master
Choose a base branch
from
databaseImpl
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b5ed976
Changed remove to now remove the first occurance of an element, in th…
GregoryFan 7e46011
Renaming add test for InMemContainerTest
GregoryFan abc0b0c
Merge branch 'master' into databaseImpl
GregoryFan c364f44
SQLiteContainer Implementation
GregoryFan faaadc0
Removed Excess FIle
GregoryFan 976f020
Removed testing code from TryMe
GregoryFan a3ff0dc
Merge branch 'master' into databaseImpl
GregoryFan 0615f05
Additional Documentation
GregoryFan a0a0c39
Added Batching For Time Effeciency
GregoryFan fdb61d3
Included Updates for SQLiteContainer
GregoryFan 16ad72a
Moved commitTransaction and beginTransaction to virtual database func…
GregoryFan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| /* This code is part of the GenSync project developed at Boston University. Please see the README for use and references. */ | ||
| // Created by GregoryFan on 7/10/2025 | ||
| // | ||
| #ifndef DATABASECONTAINER_H | ||
| #define DATABASECONTAINER_H | ||
| #include <GenSync/Data/DataContainer.h> | ||
|
|
||
| /** | ||
| * Implements a generic container that stores DataObject information. | ||
| * Information stored will be based on different database implementations. | ||
| */ | ||
| class DatabaseContainer : public DataContainer { | ||
| public: | ||
| //aliases | ||
| using DataContainer::iterator; | ||
| using DataContainer::const_iterator; | ||
| using DataContainer::size_type; | ||
|
|
||
| /** | ||
| * Default destructor, meant to be overriden by subclasses. | ||
| */ | ||
| virtual ~DatabaseContainer() = default; | ||
|
|
||
| /** | ||
| * @return An iterator that points to the beginning of the container. | ||
| */ | ||
| virtual iterator begin() override = 0; | ||
|
|
||
| /** | ||
| * @return An iterator that points to the end of the container. | ||
| */ | ||
| virtual iterator end() override = 0; | ||
|
|
||
| /** | ||
| * @return A const iterator that points to the beginning of the container. | ||
| */ | ||
| virtual const_iterator begin() const override = 0; | ||
|
|
||
| /** | ||
| * @return A const iterator that points to the end of the container. | ||
| */ | ||
| virtual const_iterator end() const override = 0; | ||
|
|
||
| /** | ||
| * @return The number of items inside the container. | ||
| */ | ||
| virtual size_type size() const override = 0; | ||
|
|
||
| /** | ||
| * @return Whether the container has no DataObjects. | ||
| */ | ||
| virtual bool empty() const override = 0; | ||
|
|
||
| /** | ||
| * Removes all DataObjects from the container. | ||
| */ | ||
| virtual void clear() override = 0; | ||
|
|
||
| /** | ||
| * Removes the first DataObject that contain the internal data as the given DataObject. | ||
| * The internal data refers to the information that the DataObject represents. | ||
| * @param val The given DataObject. | ||
| * @return Returns true if object is successfully removed. | ||
| */ | ||
| virtual bool remove (const shared_ptr<DataObject>& val) override = 0; | ||
|
|
||
| /** | ||
| * Pushes a given DataObject into the container for storage. | ||
| * @param val The given DataObject to store. | ||
| */ | ||
| virtual void add (const shared_ptr<DataObject>& val) override = 0; | ||
|
|
||
| }; | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple function, but proper documentation is required