Commit Graph

57 Commits

Author SHA1 Message Date
mdb bc41237e00 Classes go after methods.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2169 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-13 21:59:25 +00:00
mdb ac3ab74a4b More Zell changes:
- Re-read the table metadata after we run pre-default migrations, since those
are pretty much guaranteed to change the table.
- Changed EntityMigration.Rename to a pre-default rather than a post-default
migration.
- Made all the static EntityMigration subclasses use the generic liaison rather
than JDBCUtil.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2167 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-13 19:42:46 +00:00
mdb 1f7d58d290 Patch from Zell to quell warnings about mismatched schemas for database-
specific auxiliary columns (specifically Postgres's FTS column).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2166 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-13 19:37:09 +00:00
mdb d58e6a3457 Patch from Zell to properly walk the inheritance tree and aggregate all
index-related annotations.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2164 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-08 23:58:43 +00:00
mdb ec68201645 Small fix from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2160 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-07 18:05:49 +00:00
mdb df61cc8cf3 Reinstate automatic schema migration, per Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2159 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-08-06 21:52:52 +00:00
mdb 1f2450d8ba Full text index support from Zell, also a fix for deletion.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2156 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-31 21:36:02 +00:00
mdb 8a4c7ba54f El Giganto Depot database dialects support from Zell. PostgresSQL here we
come. Automatic schema migration is currently disabled and remains to be
dialectified.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2136 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-25 20:53:40 +00:00
mdb 4747fa8f68 Header updates.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2132 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-13 00:20:09 +00:00
mdb 0e7f8d0e43 Another Zell Depot patch:
- refactoring query construction;
- modified collection lookup to first look up the matching primary keys, then
check the cache for hits then look up the remainder from the database;
- other small renamery and cleanup.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2129 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-07-12 20:02:54 +00:00
mdb 16753a8d0c Check that our schema does not contain stale columns and issue a warning if it
does.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2118 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-29 00:25:40 +00:00
mdb 7932dbde0e We need to initialize migrations here as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2109 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-06-02 00:07:41 +00:00
mdb 9f24bd4549 Improved @Computed support for subset record queries, from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2072 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-16 00:21:27 +00:00
mdb 1335ce4b2e When we create a table for a persistent record, set the starting version to the
correct value to avoid spuriously trying to migrate it immediately thereafter.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2065 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-03-01 23:43:21 +00:00
mdb c877f8120a Do the same magic for DATETIME that we do when adding a TIMESTAMP column.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2058 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-02-20 02:17:56 +00:00
mdb f8003a05c8 git-svn-id: https://samskivert.googlecode.com/svn/trunk@2042 6335cc39-0255-0410-8fd6-9bcaacd3b74c 2007-01-30 22:40:24 +00:00
mdb 2893383dfa Patch from Zell to fix index bits.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2041 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-01-30 20:57:38 +00:00
mdb a63eef36a6 Modifications to clone() on insertion and extraction from cache, from Zell. A
whole bunch of type safety jockeying and concretification of QueryClause by
yours truly.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2035 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-01-16 05:30:02 +00:00
mdb 689ec8c231 @Table(uniqueConstraints) support from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2033 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-01-15 01:57:35 +00:00
mdb e4eabab6f8 Some fixes and documentation from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2032 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-01-14 20:40:54 +00:00
mdb 1d86a5e5cf Caching support from Zell. Hard drives the world round rejoice!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2030 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-01-11 00:43:08 +00:00
mdb ad26c89af2 Don't auto-remove indices either. Deciphering whether that's the right thing to
do is a PITA and not really worth the trouble.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2025 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2007-01-02 22:12:05 +00:00
mdb 32feed579b Missed a space.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2024 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-12-24 01:30:44 +00:00
mdb f8a33859ae Nix auto-column dropping, add simple concrete migrations that can be used to
easily register a column drop or a column rename should the need arise.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2014 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-12-21 22:55:27 +00:00
mdb daafade9e6 Automatically add and remove indices and primary key (though it's extremely
unlikely that one would do the latter), automatically remove obsolete columns
(might be dangerous, I could be pursuaded to reconsider).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2013 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-12-21 22:34:06 +00:00
mdb afd3d35f17 Index handling. Automatic addition and removal of indices not yet implemented.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2007 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-12-21 20:53:55 +00:00
mdb 5d9c17a853 Added support for hand-registered migrations (untested).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2005 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-12-21 19:06:18 +00:00
mdb 1e6043b264 Added Entity.postamble, wired it and Entity.name up properly.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2004 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-12-21 18:06:59 +00:00
mdb 9288bebaec Add some hackery to work around MySQL's strange habit of assigning 0 instead of
the current time when adding a TIMESTAMP column to a table (even if you
explicitly define the TIMESTAMP column with DEFAULT CURRENT_TIMESTAMP).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1996 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-12-11 21:35:05 +00:00
mdb 8437bb657f Switched to our own set of annotation classes, provided by Zell. This removes
the dependency on the EJB3 persistence library.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1977 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-11-20 21:03:22 +00:00
mdb 162deee43d A whole heap of new Depot stuff from Zell. Clauses, operators, expressions, oh
my!


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1966 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-11-08 02:34:42 +00:00
mdb 9f9b4cde72 Some refactoring of query generation; addition of "for update" support. From
Zell.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1961 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-10-23 23:12:55 +00:00
mdb 46d67e76a3 Another @Computed related patch.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1956 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-10-20 18:52:49 +00:00
mdb 13b914952d Out vile extra space!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1952 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-10-13 21:42:25 +00:00
mdb cacfd18a8c @Computed support from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1951 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-10-13 21:39:49 +00:00
mdb 51135b5fe1 Support for query clauses, joins, field overriding and a bunch of
other useful stuff from Zell. Adjusted formatting to 100 columns.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1946 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-10-13 02:36:21 +00:00
mdb 1058f270a8 Promoted a number of classes out of DepotRepository because they are used all
across the package. Moved marshaller creation and management into the
PersistenceContext because marshallers should be shared across a persistence
context.

Also moved the actual "get a connection and do the query" code into the
persistence context which is sort of a nice separation. The repository and
friends now just put together Query and Modifier objects and pass them to the
context for execution. The context will eventually handle interaction with the
cache as well (exposing manual manipulation mechanisms as needed to the
DepotRepository).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1944 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-10-11 20:07:05 +00:00
mdb 4607cf4b6a The Java compiler uses the platform's default encoding when reading source
files which explains why Ray's "there are no languages but English" system
resulted in complaints and my "named after the African word for community"
system did not. Fortunately we can just tell the Java compiler what to expect.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1942 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-10-11 18:36:53 +00:00
mdb 66b86adbe9 Go through the fields in declaration order when doing the migration otherwise
we might try to add a field after a field that we haven't yet added.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1941 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-10-11 02:46:41 +00:00
ray b66931cd7f Changed these to make me (and the compiler) happy.
I'm pretty sure source files should be ISO-8859-1.
If you're more comfortable with entity tags appearing in a  /* */ style
comment, then maybe that's what we should use for the header text.
(The Java Coding Guidlines say you should use a /* */ comment at the top
of the file.)


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1938 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-30 02:34:36 +00:00
mdb c237cd7a6d Copyright date and header fiddling.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1937 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-29 18:51:30 +00:00
mdb 015279cceb git-svn-id: https://samskivert.googlecode.com/svn/trunk@1936 6335cc39-0255-0410-8fd6-9bcaacd3b74c 2006-09-29 18:40:04 +00:00
mdb e773767e32 Multi-column primary key support from Zell.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1935 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-29 18:38:33 +00:00
mdb 09ac6097a6 Always update then insert in case for whatever reason the zeroth schema version
is not one (like for ItemRecord).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1933 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-29 01:28:53 +00:00
mdb 504cd21b7c Added auto-migration for adding new columns.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1932 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-29 01:21:53 +00:00
mdb 60bd39e8b6 Update our Modifier's key on an insert (and store) so that it can (eventually)
properly cache the results of our insert based on the newly assigned primary
key. Also avoid freakout if an attempt is made to store() a non-primary-key
using object.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1928 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-26 19:51:58 +00:00
mdb eaa520044b Unbork handling of objects with no primary key. Added a comment indicating
where we will need to cache the results of a modifier (like an insert or an
update). Added hasPrimaryKey() to DepotMarshaller which we will soon use
externally.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1927 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-26 19:41:40 +00:00
mdb c29a7e91d3 Allow the scope of globally scoped annotations to be managed explicitly instead
of making them shared across a JVM.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1924 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-22 18:59:48 +00:00
mdb f45349dca7 External table primary key generation from Zell, with some rearranging.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1923 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-22 18:06:43 +00:00
mdb 121b864558 Added support for byte arrays and full table loads.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1921 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-09-21 00:31:21 +00:00