Skip to content
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

Update all store mut trait methods to take &mut self #1072

Merged
merged 4 commits into from
Jan 29, 2023

Conversation

panarch
Copy link
Member

@panarch panarch commented Jan 28, 2023

Remove IStoreMut, core only uses StoreMut with &mut self.
Update AlterTable, IndexMut and Transaction trait methods to take &mut self.

Change StoreMut methods to return &mut Self
@panarch panarch added the improvement Improvements for existing features label Jan 28, 2023
@panarch panarch self-assigned this Jan 28, 2023
@coveralls
Copy link

coveralls commented Jan 28, 2023

Pull Request Test Coverage Report for Build 4035481981

  • 409 of 436 (93.81%) changed or added relevant lines in 21 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 98.519%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/src/executor/alter/index.rs 18 19 94.74%
core/src/executor/insert.rs 17 18 94.44%
storages/sled-storage/src/transaction.rs 42 43 97.67%
storages/shared-memory-storage/src/alter_table.rs 12 14 85.71%
storages/sled-storage/src/alter_table.rs 24 26 92.31%
storages/sled-storage/src/index_mut.rs 17 19 89.47%
storages/sled-storage/tests/sled_transaction.rs 4 6 66.67%
core/src/executor/alter/table.rs 90 96 93.75%
core/src/executor/execute.rs 92 102 90.2%
Totals Coverage Status
Change from base Build 4023330447: 0.03%
Covered Lines: 37984
Relevant Lines: 38555

💛 - Coveralls

Update AlterTable, IndexMut and Transaction trait methods to take &mut Self and return Result<..>
@panarch panarch changed the title Remove IStoreMut, core only uses StoreMut with &mut self, Update all store mut trait methods to take &mut self Jan 28, 2023
@panarch panarch mentioned this pull request Jan 28, 2023
Copy link
Member

@ever0de ever0de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit-picking]
Other than minor comments, it looks good

Continue(column_types) => column_types,
Break(column_types) => column_types?,
) -> Result<()> {
let target_columns_defs = match source.as_ref().map(AsRef::as_ref) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let target_columns_defs = match source.as_ref().map(AsRef::as_ref) {
let target_columns_defs = match source.as_deref() {

}
}
}

async fn fetch_vec_rows<T: GStore + GStoreMut>(
async fn fetch_vec_rows<T: GStore>(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch !

@panarch panarch merged commit 6918ebf into main Jan 29, 2023
@panarch panarch deleted the storemut-interface-change branch January 29, 2023 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements for existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants