mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Add search_cards_of_notes_into_table.sql
This commit is contained in:
parent
f03df4ac3a
commit
20322fb753
2 changed files with 8 additions and 5 deletions
|
@ -502,11 +502,7 @@ impl super::SqliteStorage {
|
|||
pub(crate) fn search_cards_of_notes_into_table(&self) -> Result<usize> {
|
||||
self.setup_searched_cards_table()?;
|
||||
self.db
|
||||
.prepare(concat!(
|
||||
"INSERT INTO search_cids",
|
||||
" SELECT id FROM cards WHERE nid IN",
|
||||
" (SELECT nid FROM search_nids)",
|
||||
))?
|
||||
.prepare(include_str!("search_cards_of_notes_into_table.sql"))?
|
||||
.execute([])
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
INSERT INTO search_cids
|
||||
SELECT id
|
||||
FROM cards
|
||||
WHERE nid IN (
|
||||
SELECT nid
|
||||
FROM search_nids
|
||||
)
|
Loading…
Reference in a new issue