mirror of
https://github.com/zotero/zotero.git
synced 2026-09-19 00:01:31 +00:00
Remove unnecessary joins
This commit is contained in:
parent
2f7bf480c0
commit
07c450acbf
1 changed files with 2 additions and 4 deletions
|
|
@ -522,8 +522,7 @@ Zotero.Items = new function() {
|
|||
|
||||
// Then try editors
|
||||
"CASE (" +
|
||||
"SELECT COUNT(*) FROM itemCreators " +
|
||||
"NATURAL JOIN creatorTypes WHERE itemID=I.itemID AND creatorTypeID IN (3)" +
|
||||
"SELECT COUNT(*) FROM itemCreators WHERE itemID=I.itemID AND creatorTypeID IN (3)" +
|
||||
") " +
|
||||
"WHEN 0 THEN NULL " +
|
||||
"WHEN 1 THEN (" +
|
||||
|
|
@ -549,8 +548,7 @@ Zotero.Items = new function() {
|
|||
|
||||
// Then try contributors
|
||||
"CASE (" +
|
||||
"SELECT COUNT(*) FROM itemCreators " +
|
||||
"NATURAL JOIN creatorTypes WHERE itemID=I.itemID AND creatorTypeID IN (2)" +
|
||||
"SELECT COUNT(*) FROM itemCreators WHERE itemID=I.itemID AND creatorTypeID IN (2)" +
|
||||
") " +
|
||||
"WHEN 0 THEN NULL " +
|
||||
"WHEN 1 THEN (" +
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue