-
Notifications
You must be signed in to change notification settings - Fork 13
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
Use TableDescriptor in InMemoryTable #111
Conversation
7ccfc12
to
39c5b09
Compare
var tables = repo.tables(); | ||
new StdTxManager(repo).tx(() -> tables | ||
.forEach(table -> Tx.Current.get().getRepositoryTransaction().table((Class) table).deleteAll())); | ||
repository.dropDb(); |
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.
is it possible to do it?
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.
You should probably keep the old logic, which deletes all data from the tables actually created (from repo.tables()), but DOES NOT DROP THE TABLES themselves. You should be able recreate the old logic just fine, because now repo.tables() returns a set of TableDescriptors
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.
👍 Looks good, see my comment about cleanup vs dropDb()
var tables = repo.tables(); | ||
new StdTxManager(repo).tx(() -> tables | ||
.forEach(table -> Tx.Current.get().getRepositoryTransaction().table((Class) table).deleteAll())); | ||
repository.dropDb(); |
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.
You should probably keep the old logic, which deletes all data from the tables actually created (from repo.tables()), but DOES NOT DROP THE TABLES themselves. You should be able recreate the old logic just fine, because now repo.tables() returns a set of TableDescriptors
39c5b09
to
e290822
Compare
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.
Looks good!
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.
👍 LGTM
No description provided.