mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-03 17:48:17 +00:00
Use BTreeTable::primary_key_column_names in column_is_rowid_alias
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
This commit is contained in:
parent
f98c62bfb7
commit
861716f343
1 changed files with 4 additions and 2 deletions
|
@ -78,8 +78,10 @@ pub struct BTreeTable {
|
|||
|
||||
impl BTreeTable {
|
||||
pub fn column_is_rowid_alias(&self, col: &Column) -> bool {
|
||||
let composite_primary_key = self.columns.iter().filter(|col| col.primary_key).count() > 1;
|
||||
col.primary_key && col.ty == Type::Integer && !composite_primary_key && self.has_rowid
|
||||
col.primary_key
|
||||
&& col.ty == Type::Integer
|
||||
&& self.primary_key_column_names.len() == 1
|
||||
&& self.has_rowid
|
||||
}
|
||||
|
||||
pub fn get_column(&self, name: &str) -> Option<(usize, &Column)> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue