Commit Graph

968 Commits

Author SHA1 Message Date
Ray Greenwell 9838e4922c Added OrderBy.Order.NULL.
"order by null" can be used in a query with a "group by" in it to tell
the database to suppress the overhead of sorting the results.
(Supported in postgres and mysql.)

Changed the build visitors to have a whitelist of supported
Orders, and to NPE on a null value for the Order enum.

Note that previously "order by null" could be accomplished by passing
a null value to your OrderBy, but now the enum constant must be used.
I can change that if this disrupts anything.
2011-12-06 19:26:53 +00:00
Ray Greenwell acbdfc4044 Added two new Order constants: ASC_NULLS_FIRST and DESC_NULLS_LAST.
Only supported on postgres. If needed we could allow for fallbacks
for other databases.
2011-12-03 22:06:08 +00:00
Michael Bayne fb0a5f2884 Improve the documentation here. 2011-11-23 03:06:14 +00:00
Michael Bayne 33615067d9 Fail early. 2011-10-24 21:13:25 +00:00
Michael Bayne 3fbd5f4993 Made log message less terrifying.
I don't like to see the words "Aborting creation." when I'm in the middle of
creating databases. If we're not creating the index, fine, but don't give me
the idea that we're aborting the entire creation of the table.
2011-10-20 20:10:59 +00:00
Michael Bayne bedc76db9b Fixed typo. 2011-10-15 16:39:21 +00:00
Michael Bayne 3acb035572 More target normalization. 2011-10-15 16:38:00 +00:00
Michael Bayne 856e795634 We have a property for the javadoc.dir. 2011-10-15 16:29:03 +00:00
Michael Bayne 0fd39f61f1 Switch to ooo-build 2.9 and install/deploy targets. 2011-10-15 16:28:28 +00:00
Michael Bayne 332abecef7 [maven-release-plugin] prepare for next development iteration 2011-09-30 00:46:03 +00:00
Michael Bayne fa263416ae [maven-release-plugin] prepare release depot-1.5 2011-09-30 00:45:33 +00:00
Michael Bayne 6faff4617b Ordering tweaks. 2011-09-30 00:44:29 +00:00
Michael Bayne c3a01d5883 Capitalized name, fixed description. 2011-09-30 00:44:07 +00:00
Michael Bayne 5a3266640f Update some depends and the samskivert API docs URL. 2011-09-30 00:41:39 +00:00
Ray Greenwell c3c651340b Guava 10.0. 2011-09-28 22:32:02 +00:00
Par Winzell 710d2ffaf2 From Bruno Garcia: Add a mode for FullText to search for rows that match all the words in a query rather than any of them. 2011-08-24 15:04:43 +00:00
Dave Hoover 3c1e6f7538 Depot needs java 1.6 2011-07-01 18:11:14 +00:00
Dave Hoover 27f33b8d90 Don't need that semicolon. 2011-07-01 18:11:11 +00:00
Michael Bayne 3f8f15af9f Added support for clearing caches. 2011-06-27 21:08:01 +00:00
Michael Bayne d5b06f23e2 Fixed javadoc classpath, samskivert apidocs URL. 2011-06-27 21:07:51 +00:00
Charlie Groves b6942ec74a Remove and ignore Eclipse files in favor of letting people generate their own using m2eclipse 2011-06-27 20:51:07 +00:00
Ray Greenwell c26d9b29fb Had this laying around...
- Added an IntegerIterable Transformer.
- Document that these *Iterable transformers work with List/Set/Collection...
  In case it wasn't clear.
- Added a sizeHint argument to the createCollectionBuilder method, take
  advantage of that in the IntegerIterable since we don't need to do any
  work to find the size.
2011-06-24 20:17:02 +00:00
Charlie Groves d5eb7cf3ff Bump to ooo-build 2.5 since the maven-ant-tasks jar 2.1 uses is no longer available 2011-06-24 20:11:48 +00:00
Charlie Groves cef1461109 Warning cleanup 2011-06-24 19:47:18 +00:00
Charlie Groves 7ba475e61c Use default values for the values section of an insert statement for hsqldb as well as postgres
It blows up expecting a column name in the values parenthesis, but the default values string that
postgres was working seems to work. It's not in http://hsqldb.org/doc/guide/ch09.html, but so it
goes.
2011-06-24 19:25:57 +00:00
Charlie Groves a28990116c Some test cleanup from Eclipse 2011-06-24 19:22:24 +00:00
Michael Bayne e3ff96745d Added support for limit to deleteAll.
I would have prefered to only add this support to the Query interface, and not
clutter up DepotRepository with two additional overloaded methods. However,
that would not have been possible without duplicating a bunch of logic from
DepotRepository. Yet another reason why the Query builder approach is awesome
and the fuckloads of overloaded methods approach isn't.
2011-06-23 22:12:47 +00:00
Dave Hoover ee93f91e61 Preparing for depot-1.5-SNAPSHOT development. 2011-05-24 20:57:26 +00:00
Dave Hoover 6c47a9c4ac Preparing for 1.4 release. 2011-05-24 20:50:06 +00:00
Ray Greenwell eb6d48d054 Changed selectCount() to not alter the state of the Query,
so that I can select a count of matching rows and then go on
to add an ordering and limit and select a particular page of results.
2011-05-13 16:43:31 +00:00
Andrzej Kapolka 5d9a584e4c Because MySQL can't abide parentheses around its intervals, let's put
them around the entire expression rather than around the operands
(which matches the behavior of the binary operator method).
2011-05-12 01:48:24 +00:00
Michael Bayne 607f63a7a1 Fixed a problem where the Postgres JDBC driver would call toString() on an
enum, when we need it to be using name() instead. We just take care to send it
the results of name() instead of the enum value itself.

It would be nice to share this code with BuildVisitor.bindValue, but that would
require yet further twisting and factoring of the code, obscuring it even more.
We'll just hope that special cases like Enum and ByteEnum aren't going to keep
cropping up.
2011-05-05 19:02:38 +00:00
Michael Bayne fe028a1e42 Override toString in the enum we use for testing, to be sure we don't rely on
it in our internals. We actually do use the toString value, but only in
constructing the cache key for a query, which should generally not result in
badness, unless you override your enums to not return unique strings for
different enum values.

It's looking like the Postgres4 driver calls createArray with an Object[] full
of enums, and it calls toString on the values in the array. I have an idea for
how to fix that, which is coming up next.
2011-05-05 18:56:39 +00:00
Michael Bayne 4c1864ddd6 This is exactly the sort of place where it's useful to *not* turn a complex
value into a string and then throw it away when doing debug logging.
2011-05-05 18:56:33 +00:00
Michael Bayne e53288b7c4 Compactified header, extracted copyright and license bits into LICENSE. 2011-05-05 18:35:14 +00:00
Michael Bayne 72c4782b3c We need to quote identifiers in MySQL so that we can handle columns with names
like group.
2011-05-04 18:40:24 +00:00
Michael Bayne fd4be08c78 None would be best in this case. 2011-04-30 23:21:35 +00:00
Andrzej Kapolka 531b9a3234 Some changes to allow the ability to subclass the stats class and
record more extensive, per-table stats.
2011-04-01 04:44:04 +00:00
Charlie Groves e41e3c9961 Match the SQLBuilder changes in HSQLBuilder to fix the build 2011-03-29 19:36:35 +00:00
Ray Greenwell 903bb5181b From Mark Johnson: support long autogenerated fields. 2011-03-29 03:42:24 +00:00
Ray Greenwell 07e5b934b5 Patch from Mark Johnson: support long[] field types. 2011-03-29 01:52:59 +00:00
Charlie Groves 1f7263c6fa Preparing for 1.4-SNAPSHOT development. 2011-03-23 22:19:01 +00:00
Charlie Groves 19d9821f66 Preparing for 1.3 release. 2011-03-23 22:16:54 +00:00
Charlie Groves cd9854a8ca Ignore dist and target 2011-03-23 22:16:37 +00:00
Charlie Groves 8d56a93538 Meh, I was wrong in r841. Because the target version is 1.6, anything that tries to build against
depot with a 1.5 compiler is going to blow up with a mismatched version. Go back to 1.5 in build.xml
and pom.xml, but leave Eclipse using a 1.6 JVM. This means if anyone regenerates the m2eclipse
configuration, this will break in Eclipse again. Lame.
2011-03-23 22:09:29 +00:00
Charlie Groves 7129295906 Updates from running genrecord 2011-03-23 20:42:45 +00:00
Charlie Groves 1a2967b31f yohoho no longer cares if depot is built with 1.6, so build with that since we're using 1.6's Connection.createArrayOf in PostgreSQL4Builder. Sneak a ooo-buildification in with the compiler version bump. 2011-03-23 20:42:00 +00:00
Charlie Groves 1be9961245 Crap, missed a few 2011-03-23 01:44:48 +00:00
Charlie Groves 2dbfaa0ee6 Remove an @Override from an interface as that isn't 1.5 compatible, and remove some unused imports 2011-03-23 01:43:52 +00:00
Michael Bayne ad4f2c9970 Changed expressions that deal with count() results to Number because Postgres
in its burning desire to support the amazing four hundred billion rows, returns
a Long for count expressions.

Clients using selectCount() won't be impacted, but clients doing more complex
counting are going to have to sprinkle in some .intValue() calls.
2011-02-28 22:58:38 +00:00