Skip to content

Commit

Permalink
fixing a couple of sql syntax related issues in this file (the diff e…
Browse files Browse the repository at this point in the history
…xplains better)
  • Loading branch information
bill-brown committed Apr 16, 2012
1 parent 5e63006 commit 584a71a
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -487,7 +487,7 @@ public void processRow(ResultSet rs) throws SQLException {

namedParameterJdbcOperations.query(
"SELECT CHLD_STRUCT_ID, NEXT_STRUCT_ID FROM up_layout_struct WHERE user_id = :userId AND STRUCT_ID " +
(queryNodeIds.size() == 1 ? "=" : "in") + " ",
(queryNodeIds.size() == 1 ? "=" : "in") + ":nodeIds ",
ImmutableMap.of(
"userId", person.getID(),
"nodeIds", queryNodeIds),
Expand Down Expand Up @@ -515,8 +515,8 @@ public void processRow(ResultSet rs) throws SQLException {
else {
struct_count = namedParameterJdbcOperations.queryForInt(
"SELECT COUNT(*) FROM up_layout_struct WHERE user_id = :userId AND STRUCT_ID " +
(ignoredNodeIds.size() == 1 ? "<>" : "not in")
+ ":nodeIds AND (type is null or type not IN ('root', 'header', 'footer'))",
(ignoredNodeIds.size() == 1 ? "<>" : "not in ")
+ "(:nodeIds) AND (type is null or type not IN ('root', 'header', 'footer'))",
ImmutableMap.of(
"userId", person.getID(),
"nodeIds", ignoredNodeIds));
Expand Down

0 comments on commit 584a71a

Please sign in to comment.