limbo/core/translate/optimizer
Jussi Saurio 696c98877c Merge 'btree: Remove assumption that all btrees have a rowid' from Jussi Saurio
For example, implementing `SELECT DISTINCT` (#1517) and `UNION` (#1545)
require that we are able to create indexes without a rowid column
present. Similarly, `WITHOUT ROWID` tables require this.
I implemented this by replacing the `rowid` and `empty_record`
properties in `BtreeCursor` with
```rust
/// Whether the cursor is currently pointing to a record.
#[derive(Debug, Clone, Copy, PartialEq)]
enum CursorHasRecord {
    Yes {
        rowid: Option<u64>, // not all indexes and btrees have rowids, so this is optional.
    },
    No,
}
```

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #1518
2025-05-21 14:53:00 +03:00
..
access_method.rs Remove unnecessary method 2025-05-14 09:42:26 +03:00
constraints.rs Add some utilities to constraint related structs 2025-05-14 09:42:26 +03:00
cost.rs cost.rs: simplify cost estimation 2025-05-14 09:42:26 +03:00
join.rs schema: add Index::has_rowid 2025-05-20 14:22:17 +03:00
lift_common_subexpressions.rs Adjust logic not to delete WhereTerms, since 'consumed' property was introduced 2025-05-20 14:28:05 +03:00
mod.rs Merge 'btree: Remove assumption that all btrees have a rowid' from Jussi Saurio 2025-05-21 14:53:00 +03:00
OPTIMIZER.md Add more documentation to OPTIMIZER.MD 2025-05-14 09:42:26 +03:00
order.rs optimizer: remove order by if group by already sorts the result properly 2025-05-17 17:42:52 +03:00