From 784d3c18ca61489ed83f9a113b736f54b20aab9e Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Thu, 10 Dec 2009 15:48:54 +0000 Subject: [PATCH] Typo fix, TODO note. --- src/java/com/samskivert/depot/KeySet.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/java/com/samskivert/depot/KeySet.java b/src/java/com/samskivert/depot/KeySet.java index 900f8c7..5b5b954 100644 --- a/src/java/com/samskivert/depot/KeySet.java +++ b/src/java/com/samskivert/depot/KeySet.java @@ -163,8 +163,8 @@ public abstract class KeySet extends WhereClause super(pClass); // TODO: remove when we update to 1.6 and change Postgres In handling if (keys.length > In.MAX_KEYS) { - throw new IllegalArgumentException("Cannot create where clause for more than " + - In.MAX_KEYS + " at a time."); + throw new IllegalArgumentException( + "Cannot create where clause for more than " + In.MAX_KEYS + " keys at a time."); } _keys = keys; } @@ -210,6 +210,10 @@ public abstract class KeySet extends WhereClause protected Comparable[] _keys; } + // TODO: This algorithm very commonly creates huge lists of expressions like: + // TODO: (A = 1 and B = 'dog') or (A = 1 and B = 'cat') or (A = 1 and B = 'elephant') or ... + // TODO: It would be worthwhile to optimize this common case to + // TODO: (A = 1 and B in ('dog', 'cat', 'elephant', ...)) protected static class MultiKeySet extends KeySet { public MultiKeySet (Class pClass, Comparable[][] keys)