in the cache as well as records loaded from earlier passes in cases where we
split our query up to avoid database breaking in() clause sizes. Now we track
exactly what we got this time around and report that.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2417 6335cc39-0255-0410-8fd6-9bcaacd3b74c
database and need to provide a defaultValue at the time that you add it, but
don't want to have to define a permanent default value on the field.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2409 6335cc39-0255-0410-8fd6-9bcaacd3b74c
keys. So we can have loadAll(Class,Collection<Comparable>) and
loadAll(Collection<Key>) and not run into type erasure problems. Yay!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2402 6335cc39-0255-0410-8fd6-9bcaacd3b74c
got the primary keys, this goes right to phase two wherein we check the cache
for hits and load the remaining records by primary key (and cache them).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2400 6335cc39-0255-0410-8fd6-9bcaacd3b74c
server or if it's OK to get them from a (potentially slightly out of date)
replica. If you're going to modify rows based on the results of findAllKeys(),
you should probably get them from the master server, if you're just reading
data, you can talk to a replica.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2393 6335cc39-0255-0410-8fd6-9bcaacd3b74c
load or modify the rows that match those keys" pattern so that we can almost
always just magically do the right thing with regard to the cache. Added a
version of deleteAll() that makes use of this.
Also nixed a bunch of checked exception tomfoolery which was almost entirely
unnecessary and now with DatabaseException is completely unnecessary.
A few things remain to be done:
- PrimaryKeySet tries to be "smart" if its passed 0 keys and use
LiteralExp("false") but that causes things to freak out because Depot then
doesn't know what primary class it's dealing with. I'm probably going to make
All and None expressions that match all and none of the records in a table
respectively.
- deleteAll() doesn't currently split its keys into chunks small enough to be
digestible by the database if we match more than 32,768 rows. I'll see if I
can't abstract out that code from FindAllQuery so that we can easily use it
everywhere. It would be cool to handle that a a lower level and allow the
WhereClause to say that it needs to be run in phases, but that would probably
complicate the crap out of the low-level code.
- I need to create PrimaryKey to go between Key and PrimaryKeySet so that we
can avoid duplicating the primary key columns thousands of times in a large
PrimaryKeySet.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2384 6335cc39-0255-0410-8fd6-9bcaacd3b74c
of a checked exception. Invariably, we don't do anything with our
PersistenceExceptions except let them percolate all the way to the top and then
log a warning. We can probably automate the process of logging a warning with
useful information and save ourselves the trouble of doing it manually
everywhere.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2376 6335cc39-0255-0410-8fd6-9bcaacd3b74c
1. Schema version is now always required. The "support" for unversioned schemas
was half-baked anyway.
2. Migration and table creation is now done in such a way that multiple
processes can start up and won't step on one another as they all try to migrate
the same schemas. Instead one will get a lock and do the migration and the
others will patiently wait.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2364 6335cc39-0255-0410-8fd6-9bcaacd3b74c