mirror of https://github.com/logseq/logseq
fix(sqlite): wrong db query
parent
c90050aee9
commit
eb4476c0b6
|
@ -203,7 +203,7 @@ const SQLiteDB = {
|
|||
await this.newDB(dbName);
|
||||
db = dbMap[dbName];
|
||||
}
|
||||
const sql = sqlite3.str_new(db, "SELECT uuid, page_uuid FROM blocks");
|
||||
const sql = sqlite3.str_new(db, "SELECT uuid, page_uuid FROM blocks WHERE type = 1");
|
||||
const prepared = await sqlite3.prepare_v2(db, sqlite3.str_value(sql));
|
||||
const rows = [];
|
||||
while (await sqlite3.step(prepared.stmt) === SQLite.SQLITE_ROW) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -141,12 +141,17 @@
|
|||
block? (boolean block-id)
|
||||
block (get-block page-name)
|
||||
block-unloaded? (state/sub-block-unloaded? repo (:block/uuid block))]
|
||||
(prn ::page page-name block-id block? block page-e
|
||||
(:block/_parent block))
|
||||
(cond
|
||||
block-unloaded?
|
||||
(ui/loading "Loading...")
|
||||
|
||||
(and (not block?)
|
||||
(empty? (:block/_parent block)))
|
||||
(and
|
||||
(not block?)
|
||||
(empty? (:block/_parent block))
|
||||
|
||||
)
|
||||
(dummy-block page-name)
|
||||
|
||||
:else
|
||||
|
|
|
@ -41,6 +41,4 @@
|
|||
([repo exclude-uuids]
|
||||
(<fetch-blocks-excluding repo exclude-uuids {}))
|
||||
([repo exclude-uuids opts]
|
||||
(p/let [ret (protocol/<fetch-blocks-excluding (get-impl) repo exclude-uuids opts)]
|
||||
(js/console.log "fetch-by-exclude" ret)
|
||||
ret)))
|
||||
(protocol/<fetch-blocks-excluding (get-impl) repo exclude-uuids opts)))
|
||||
|
|
Loading…
Reference in New Issue