Michael Bayne
a9c992bb44
Great big revampage: no more strings anywhere. It's all ColumnExps all the way
...
down (well, all the way to the public API anyway).
Revamped index creation while I was in there because that was one of the big
string users. Now you just put @Index on the field you want indexed, and if you
want a multi-column index you do things with a magical static method just like
we do for complex (function) indices.
@UniqueConstraint may still go away since it's basically exactly the same thing
as @Index(unique=true), so it's kind of pointless to support both.
2009-01-08 02:10:54 +00:00
Michael Bayne
a66f15e355
Minor edits.
2009-01-07 19:36:43 +00:00
Par Winzell
f5fc65f1e1
More cache configuration options for findAll(), especially a new CONTENTS strategy which will cache the entire result set of the supplied query, without the restrictions of the KEYS approach. This is very lovely and perhaps a little scary.
2009-01-07 19:32:24 +00:00
Par Winzell
269a3ffb92
Let's make this an insertion-ordered set so that all logically identical queries get assigned table abbreviations in the same order. This is mostly cosmetic, but has no significant cost.
2009-01-01 17:10:34 +00:00
Par Winzell
68aac7fd11
Progress notification during migration soothes the soul.
2009-01-01 15:47:42 +00:00
Par Winzell
c41534c7e6
We need these two fellows for the previous patch to make sense.
2008-12-31 00:59:28 +00:00
Par Winzell
0ccd8bdb82
Extend our Index annotation to accept a 'complex' attribute. If an index ixFoo is marked complex for a given record, Depot will call the static method ixFooDefinition on that record class and expect a List<Tuple<SQLExpression, OrderBy.Order>> return value.
...
The purpose of all this is to create function (or expression, rather) indexes, which PostgreSQL does quite happily.
2008-12-31 00:25:29 +00:00
Michael Bayne
e3aed39330
Document our thrown exceptions.
2008-12-16 00:00:52 +00:00
Par Winzell
44fd01cc2d
Switch to nulls here, too, making migration work right for HSQLDB.
2008-12-10 23:02:34 +00:00
Par Winzell
b3cb1d6214
Cut and paste error.
2008-12-10 21:09:56 +00:00
Michael Bayne
50d31cfcc5
Unused import nixage.
2008-12-10 20:05:34 +00:00
Par Winzell
f0f08f9516
More HSQL support:
...
- HSQL doesn't have full text search, so we just OR up a bunch of LIKE conditions to catch any and all matches. This is not efficient, but it'll do just fine for things like unit tests and development work.
- HSQL doesn't have & and |, it calls them BITAND and BITOR.
- HSQL doesn't have MySQL's unix_timestamp() or a way to get an 'epoch' from a date like PostgreSQL, so we count the number of seconds since 1970-01-01. I have not investigated to make sure this is exact, but it should at least be internally consistent.
- HSQL has a very neat list of data types that (no surprise) map very well to Java types.
2008-12-09 23:26:11 +00:00
Par Winzell
96dfa3ca04
Break up the function that generates ColumnDefinitions for our fields and pass around a mutable instance of that object so as to give subclasses more freedom to do whatever weird stuff they need to to generate SQL for all the incompatible dialects out there. This is not elegant, and I feel this code along with ColumnDefinition and some of DatabaseLiaison, should pperhaps find a new home in the SQLBuilder structure.
2008-12-09 23:20:14 +00:00
Par Winzell
b9bb84d3af
Cope with the new ColumnDefinition.
2008-12-09 23:18:17 +00:00
Par Winzell
7eaaea15e7
Instead of enumerating columns for which values will be auto-generated and supplying magical DEFAULT arguments for them, simply don't include those columns in the insert.
2008-12-09 23:00:50 +00:00
Par Winzell
cc07817238
Remove an ancient TODO: Get rid of SELECT FOR UPDATE and instead locklessly claim the next available primary key value.
2008-12-09 22:56:55 +00:00
Par Winzell
817857d20e
HSQL doesn't think 'false' is a proper condition in a DELETE statement, and I suppose it has a point. This should always work.
2008-12-09 20:28:20 +00:00
Michael Bayne
76268a7fb1
This should have been deleted.
2008-12-01 18:17:14 +00:00
Michael Bayne
14a85d0de6
Differentiate between explicit queries and decomposed queries.
2008-11-25 22:02:15 +00:00
Michael Bayne
8ab95ec10e
Unconcretification of QueryClause. I concreted it a while back when it did
...
something and then those needs went away and now it's just a marker that
differentiates arbitrary SQLExpression instances from those that represent
clauses of a query.
2008-11-25 20:53:33 +00:00
Michael Bayne
8fec576663
Moved things that are not part of the Depot public API into an impl package.
...
Also moved WhereClause into depot.clause since it really wanted to be there.
2008-11-25 20:44:22 +00:00
Michael Bayne
980be19918
Unused import pruning and other cleaning.
2008-11-25 20:14:09 +00:00
Michael Bayne
0b439978fb
Stubbed out Depot support for HSQLDB. This also doesn't work yet but will some
...
day be made to work and enable more sophisticated unit testing of Depot and
systems that use Depot.
2008-11-25 20:13:43 +00:00
Michael Bayne
bc44c4e58e
A cache adapter for testing.
2008-11-25 00:57:22 +00:00
Michael Bayne
9e2dbeb174
Finished collection caching implementation. Our databases will shortly breath a
...
great sigh of relief.
2008-11-25 00:57:04 +00:00
Michael Bayne
ae34697c8d
KeySet is going to get stuffed into the cache, so we're making it more memory
...
efficient.
Also switched from Collection to Iterable in some internal spots where we don't
need anything other than an iterator. I wanted to push this all the way out to
DepotRepository but ran into some snags. I'm leaving in this change in case I
feel like desnaggling the external bits later.
2008-11-24 22:05:04 +00:00
Michael Bayne
ae414006bc
These don't *really* override anything so we can't mark them as such as JDK 1.5
...
will do le freak out.
2008-11-21 06:30:32 +00:00
Michael Bayne
f6339978bf
Missed a spot.
2008-11-21 06:11:57 +00:00
Michael Bayne
475200849c
Extract query and record cache tracking into parent.
2008-11-21 03:19:44 +00:00
Michael Bayne
e347f4ac17
More toString()ery. Changed KeyUtil to DepotUtil so I could jam some more
...
useful stuff in it.
2008-11-21 03:15:47 +00:00
Michael Bayne
e98ad09588
If loadAll() can return its results entirely from the cache before invoke(),
...
have it do so. Down to the last couple of steps for collection caching.
2008-11-21 02:50:16 +00:00
Michael Bayne
22c086f64e
Extracted findAllKeys() query into a helper class, made it possible for Query
...
to request a read-write connection.
2008-11-21 02:30:08 +00:00
Michael Bayne
3cf711e083
More toString()s.
2008-11-21 02:04:07 +00:00
Michael Bayne
9880ff326c
A whole bunch of revampery on the way to collection caching, including some
...
basic stats reporting and query and cache logging.
PersistenceContext no longer sticks its nose so deeply into the business of
Query and Modifier. It just passes itself along and allows them to do any cache
activity they need during their normal execution. The one situation where we
keep our nose in their business is to allow a Query to return a result from the
cache before it is even invoked so that we can avoid requesting a database
connection if we won't ever need one.
2008-11-21 01:49:28 +00:00
Michael Bayne
5f26eb28c9
Fixed sed error.
2008-11-20 00:16:57 +00:00
Michael Bayne
22a3c138b7
We need our template files as well.
2008-11-20 00:13:21 +00:00
Michael Bayne
c4eb78e0b8
Use the correct variable name.
2008-11-20 00:10:15 +00:00
Michael Bayne
566ebcf7f9
Only release the connection if we didn't report it as failed.
2008-11-17 21:55:02 +00:00
Michael Bayne
42aa622551
Added README and build target descriptions.
2008-11-17 19:10:33 +00:00
Michael Bayne
ceafda9f83
We need google-collect.jar.
2008-11-17 18:47:46 +00:00
Michael Bayne
76aa7f2cef
Tell Eclipse about our dependency on samskivert.
2008-11-17 18:43:30 +00:00
Michael Bayne
bc30c2061c
Some Eclipse bits.
2008-11-17 18:41:06 +00:00
Michael Bayne
1f86dbd9c4
Google Collectivised.
2008-11-16 18:31:25 +00:00
Michael Bayne
0fc1d68bbe
Fixed up svn:keywords property.
2008-11-16 08:03:33 +00:00
Michael Bayne
9c0dbb5b47
Fixed up packages.
2008-11-16 08:01:19 +00:00
Michael Bayne
c60181a484
We need a GWT module.
2008-11-16 07:53:22 +00:00
Michael Bayne
50053f5282
Oh boy, we have to build a GWT source jar file.
2008-11-16 07:34:30 +00:00
Michael Bayne
7a23a6bd49
Copy the tests over. I couldn't migrate these with the rest of the SVN
...
migration because svndumpfilter is a royal pain in my ass.
2008-11-16 07:30:20 +00:00
Michael Bayne
711fd44911
No longer needed.
2008-11-16 06:55:13 +00:00
Michael Bayne
601a15c00f
Added snapshot target.
2008-11-16 06:49:09 +00:00