Skip to content

Commit c79155d

Browse files
committed
added comments
1 parent bf02430 commit c79155d

File tree

1 file changed

+6
-4
lines changed
  • crates/core/src/db/datastore/locking_tx_datastore

1 file changed

+6
-4
lines changed

crates/core/src/db/datastore/locking_tx_datastore/mod.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,10 @@ impl CommittedState {
438438
}
439439
Ok(())
440440
}
441+
//TODO(shubham): Need to confirm, if indexes exist during bootstrap to be used here.
441442

442-
fn iter_by_col<'a>(
443+
// This iter has only been implemented to use during bootstrap
444+
fn iter_by_col_eq<'a> (
443445
&'a self,
444446
table_id: &'a TableId,
445447
table_id_col: &'a NonEmpty<ColId>,
@@ -469,7 +471,7 @@ impl CommittedState {
469471
let table_id_col = NonEmpty::new(StTableFields::TableId.col_id());
470472
let value: AlgebraicValue = table_id.into();
471473
let rows = self
472-
.iter_by_col(&ST_TABLES_ID, &table_id_col, &value)?
474+
.iter_by_col_eq(&ST_TABLES_ID, &table_id_col, &value)?
473475
.collect::<Vec<_>>();
474476
let row = rows
475477
.first()
@@ -481,7 +483,7 @@ impl CommittedState {
481483

482484
// Look up the columns for the table in question.
483485
let mut columns = self
484-
.iter_by_col(&ST_COLUMNS_ID, &NonEmpty::new(StColumnFields::TableId.col_id()), &value)?
486+
.iter_by_col_eq(&ST_COLUMNS_ID, &NonEmpty::new(StColumnFields::TableId.col_id()), &value)?
485487
.map(|row| {
486488
let el = StColumnRow::try_from(row.view())?;
487489
Ok(ColumnSchema {
@@ -498,7 +500,7 @@ impl CommittedState {
498500

499501
// Look up the indexes for the table in question.
500502
let indexes = self
501-
.iter_by_col(&ST_INDEXES_ID, &StIndexFields::TableId.into(), &table_id_value)?
503+
.iter_by_col_eq(&ST_INDEXES_ID, &StIndexFields::TableId.into(), &table_id_value)?
502504
.map(|row| {
503505
let el = StIndexRow::try_from(row.view())?;
504506
Ok(IndexSchema {

0 commit comments

Comments
 (0)