This allows two separate services which share a database to assign "control" of
the schema to one of the services. The non-controlling service can be
configured to simply fail if new code is deployed to said service before new
code is deployed to the controlling service, rather than have the
non-controlling service migrate the schema out from under the controlling
service.
version is set to what we expect it to be.
Otherwise if one node reads an old value for the schema version, it will
be able to grab the migration lock as long as another node has already
completed the migration.
"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.
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.
- 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.
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.
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.
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.
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.