mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
core: Fix codegen for rowid alias
We should emit `Column` bytecode for a primary key, unless it is an alias for a rowid.
This commit is contained in:
parent
8d4d2f32ee
commit
828fb813a8
2 changed files with 8 additions and 1 deletions
|
@ -154,6 +154,13 @@ pub struct Column {
|
|||
pub primary_key: bool,
|
||||
}
|
||||
|
||||
impl Column {
|
||||
pub fn is_rowid_alias(&self) -> bool {
|
||||
self.primary_key && self.ty == Type::Integer
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum Type {
|
||||
Null,
|
||||
Text,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue