Fix slow query for fetching descendants of channels (#7008)
Release Notes: - N/A --------- Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
1313402a6b
commit
c008c78e87
3 changed files with 37 additions and 69 deletions
|
@ -39,6 +39,10 @@ impl Model {
|
|||
pub fn path(&self) -> String {
|
||||
format!("{}{}/", self.parent_path, self.id)
|
||||
}
|
||||
|
||||
pub fn descendant_path_filter(&self) -> String {
|
||||
format!("{}{}/%", self.parent_path, self.id)
|
||||
}
|
||||
}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue