     AND (?2 = '' OR local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
     AND local_relpath NOT IN (
       SELECT local_relpath FROM actual_node WHERE wc_id = ?1)
-    AND (presence = 'normal' OR presence = 'incomplete');
+    AND (presence = 'normal' OR presence = 'incomplete')
+/* ###  Need index?
 CREATE UNIQUE INDEX temp__node_props_cache_unique
-  ON temp__node_props_cache (local_relpath);
+  ON temp__node_props_cache (local_relpath) */
 
 -- STMT_CACHE_NODE_PROPS_OF_CHILDREN
 CREATE TEMPORARY TABLE temp__node_props_cache AS

    AND (local_relpath = ?2 OR parent_relpath = ?2)
    AND local_relpath NOT IN (
      SELECT local_relpath FROM actual_node WHERE wc_id = ?1)
    AND (presence = 'normal' OR presence = 'incomplete');
CREATE UNIQUE INDEX temp__node_props_cache_unique
  ON temp__node_props_cache (local_relpath);

-- STMT_SELECT_RELEVANT_PROPS_FROM_CACHE
SELECT local_relpath, kind, properties FROM temp__node_props_cache
ORDER BY local_relpath;

-- STMT_CLEAR_REVERT_CACHE
DROP TABLE IF EXISTS revert_cache;

-- STMT_CREATE_REVERT_CACHE
CREATE TEMPORARY TABLE revert_cache (

     conflict_old, conflict_new, conflict_working,
     prop_reject, changelist, text_mod, tree_conflict_data
FROM actual_node
WHERE wc_id = ?1 AND local_relpath = ?2

-- STMT_UPDATE_BASE_REVISION
UPDATE nodes SET revision = ?3
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0

-- STMT_UPDATE_BASE_REPOS
UPDATE nodes SET repos_id = ?3, repos_path = ?4
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0

-- STMT_SELECT_NODES_GE_OP_DEPTH_RECURSIVE
SELECT 1
FROM nodes
WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
  AND op_depth >= ?4

-- STMT_SELECT_ACTUAL_NODE_RECURSIVE
SELECT 1
FROM actual_node
WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
  AND tree_conflict_data IS NULL

-- STMT_SELECT_ACTUAL_CHILDREN
SELECT 1 FROM actual_node WHERE wc_id = ?1 AND parent_relpath = ?2

/* ------------------------------------------------------------------------- */

