 SELECT local_relpath, presence, depth FROM nodes
 WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
   AND op_depth = 0
-  AND (presence = 'absent' OR presence = 'excluded' OR
-       (depth != 'infinity' AND depth != 'unknown'))
+  AND (presence IN ('absent', 'excluded')
+        OR depth NOT IN ('infinity', 'unknown'))
   AND file_external IS NULL
 
 -- STMT_SUBTREE_HAS_TREE_MODIFICATIONS
 SELECT 1 FROM nodes
 WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
   AND op_depth > 0
-  AND (presence = 'normal' OR presence = 'incomplete' OR
-       presence = 'base-deleted')
+  AND presence IN ('normal', 'incomplete', 'base-deleted')
   AND file_external IS NULL
 LIMIT 1
 

SELECT local_relpath, kind FROM nodes_current
WHERE wc_id = ?1
  AND (?2 = '' OR local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
  AND (presence = 'normal' OR presence = 'incomplete')
  AND file_external IS NULL

/* Grab all the statements related to the schema.  */

  SELECT A.local_relpath, N.kind, A.properties
  FROM actual_node AS A JOIN nodes_current AS N
    ON A.wc_id = N.wc_id AND A.local_relpath = N.local_relpath
       AND N.presence IN ('normal', 'incomplete')
  WHERE A.wc_id = ?1
    AND (?2 = '' OR A.local_relpath = ?2 OR A.local_relpath LIKE ?3 ESCAPE '#')
    AND A.local_relpath NOT IN
