Michael Bayne
b3ee76f914
Added FooRecord.FOO_ID.join(BarRecord.FOO_ID).
2009-06-10 21:07:07 +00:00
Michael Bayne
1e5c201501
Javadocs.
2009-06-10 20:59:34 +00:00
Michael Bayne
6d520a33d6
Oops, those should be static.
2009-06-10 20:58:55 +00:00
Michael Bayne
f57795c48f
More import relief: add builder classes Ops and Exps which have methods for
...
creating common operators and expressions that don't fit nicely into the fluent
style. For example: Ops.and(expr1, expr2) is preferable to expr1.and(expr2)
and Ops.not(expr) is definitely nicer than expr.not() (which we don't even
provide).
2009-06-10 20:58:12 +00:00
Michael Bayne
03ac710d4f
Yet more fluency.
2009-06-10 18:39:56 +00:00
Michael Bayne
3cc29e08b9
More fluency.
2009-06-10 18:37:28 +00:00
Michael Bayne
d4a376e78b
FluentExpression -> FluentExp, made a few other base expressions fluent.
2009-06-10 18:35:07 +00:00
Michael Bayne
d1e8ed43e2
Added in().
2009-06-10 17:42:52 +00:00
Michael Bayne
c8417a366e
Added bitAnd and bitOr.
2009-06-10 17:29:16 +00:00
Michael Bayne
12e612fe34
OMG I can't believe I didn't think of this earlier: provide fluent builder
...
methods for expressions. Now you can do FooRecord.BAR.eq(5) instead of new
Equals(FootRecord.BAR, 5), which also saves you the Equals import. Added
methods for operators, some are probably missing and some don't make sense.
I'll fill this out more as I discover where else this style is useful.
2009-06-10 17:27:10 +00:00
Michael Bayne
b029dfd6cd
Javadoc and import cleanup.
2009-06-10 17:20:31 +00:00
Par Winzell
fce2c05f9b
So, milli/nano is 1E6, not 1E3, thanks Ray.
2009-06-03 18:49:45 +00:00
Michael Bayne
bde9404ca5
Oh Java, I do wish that Map.get() took K not Object.
2009-05-29 23:43:50 +00:00
Michael Bayne
83a4149cbf
Fix array indexing booches.
2009-05-29 23:15:04 +00:00
Michael Bayne
79c6f364fa
Javadoc and variable naming improvements.
2009-05-29 22:24:58 +00:00
Michael Bayne
a8da0d960f
Those need to be Object because they could be (probably are in fact)
...
SQLExpression instances.
2009-05-29 22:16:37 +00:00
Michael Bayne
c46741cbe2
Let's make the varargs version of updatePartial a little safer by requiring a
...
typed (ColumnExp, Comparable) as our first pair of arguments and only let you
get jiggy after that.
2009-05-29 22:14:19 +00:00
Michael Bayne
3062afe1b5
updateLiteral -> updatePartial. It's all partial updates now and you can either
...
pass in a map or use the varargs methods.
2009-05-29 21:54:12 +00:00
Michael Bayne
962a9cfb5a
No String[]. Use ColumnExp[] all the way down. Now that things are getting
...
tidier, it's a shame that ColumnExp is named as it is because really it's a
FieldExp as it represents the name of the Java object field, not the actual
name of the column which may be something different (if you use
@Column(name="foo")). Maybe next time.
2009-05-29 21:40:17 +00:00
Michael Bayne
08122cda8b
Nixed a bit more unneeded parameterized typing.
2009-05-29 21:04:26 +00:00
Michael Bayne
cc961d14e2
Consolidated some duplicated update-related code in DepotMarshaller, nixed some
...
unneeded type parameterization.
2009-05-29 21:00:33 +00:00
Michael Bayne
04d7fedb92
Boop boop. Final methods with Comparable<?> nixed. The javadocs for
...
DepotRepository are looking positively svelt and comprehensible.
2009-05-29 19:12:44 +00:00
Michael Bayne
2b847056bf
More strictness. Have to use a key to load individual records. Again this is
...
just as succinct, but type safer:
load(FooRecord.class, fooId) vs load(FooRecord.getKey(fooId))
2009-05-29 18:36:25 +00:00
Michael Bayne
f052bba59d
Nix obsolete cache documentation. The enum is pretty self documenting.
2009-05-29 00:13:07 +00:00
Michael Bayne
4b6dc9f5c7
Nix a bunch of untyped methods in favor of just a version that takes Key. It's
...
only one character more to type FooRecord.getKey(someId) than to type
FooRecord.class, someId and with the new Key.newKey() methods, you can also
create ad hoc keys briefly when needed.
2009-05-29 00:11:53 +00:00
Michael Bayne
1b6c3752df
Helpy helper functions!
2009-05-28 22:55:23 +00:00
Michael Bayne
bde87ac0e6
Added support for intervals which would almost be exactly the same except that
...
Postgres insists that you quote: interval '7 day' and MySQL insists that you
not quote: interval 7 day. Frawesome!
2009-05-28 22:53:30 +00:00
Michael Bayne
965cd7fd60
Unused import nixy.
2009-05-28 21:29:58 +00:00
Michael Bayne
5f6e4f80b4
We were one variation short.
2009-05-28 21:29:51 +00:00
Michael Bayne
ed6eaae7b7
This is going to break everything, but I couldn't stand our operator inner
...
classes any more, so I promoted them all to standalone classes.
2009-05-27 23:30:19 +00:00
Michael Bayne
601b9eaba1
Sanity checking makes for more sanity.
2009-05-27 22:26:47 +00:00
Michael Bayne
c8e5a3b413
Covariance here makes it easier to use ImmutableMap.
2009-05-27 17:35:04 +00:00
Michael Bayne
a765645307
We don't really need to hear stats on shutdown.
2009-05-19 06:01:50 +00:00
Michael Bayne
636e2d7046
Factored out metadata handling into separate class. Modified repository
...
initialization to not hit the database at all in the up-to-date case (after a
single query to load the versions of all known records). This is about six
hundred fewer queries than we were doing on Whirled at server startup. To be
fair, they were pretty fast queries. :)
2009-05-19 05:30:47 +00:00
Michael Bayne
8b202f530e
More fluency.
2009-05-11 19:30:25 +00:00
Michael Bayne
dec7482c1b
Using Timestamp as a primary key? omg cray-z.
2009-05-01 16:48:38 +00:00
Par Winzell
78c5a458de
Get rid of one trailing space. :)
2009-04-29 18:56:05 +00:00
Par Winzell
f8480b1f5b
Update the copyright year.
2009-04-29 18:41:10 +00:00
Michael Bayne
259da94d3f
Wrapped some long lines, nixed unwanted blankness.
2009-04-29 17:01:03 +00:00
Par Winzell
273b0b8fd0
Handle ByteEnums. Not actually tested.
2009-04-29 16:22:37 +00:00
Par Winzell
27b108b0c4
Overrides, from David Hoover (belatedly): 'Also nukes trailing whitespace, foreaches a couple loops and varags one thing that leapt out at me while i was skimming it.'
2009-04-29 16:17:39 +00:00
Michael Bayne
95212f57e2
Added as().
2009-04-28 06:27:04 +00:00
Michael Bayne
825b15d5f7
Driver wants 'varchar' not 'character varying'. For future reference, these
...
mappings seem to be in appendix B of the JDBC specification.
2009-04-27 22:48:14 +00:00
Michael Bayne
cbde87c6a2
Detect our type based on the first element of the array rather than the type of
...
the array which may be Comparable[] or Object[] and therefore not informative.
2009-04-27 22:42:23 +00:00
Par Winzell
5a1dfdc306
I should be shot for writing this code originally. I can hardly think of a place where the exception is more important to see.
2009-04-27 21:58:31 +00:00
Par Winzell
262ef317ad
Remove confusing and pointless incrementing.
2009-04-27 21:21:50 +00:00
Michael Bayne
9bb640f334
Detect our JDBC major version when starting Depot. If we are using JDBC4 then
...
use JDBC4's array support when doing In() clauses for Postgres.
2009-04-27 19:45:07 +00:00
Michael Bayne
d2e1ea6eda
We need the connection during the binding step for Postgres array machinations.
2009-04-27 18:06:55 +00:00
Michael Bayne
1468275c18
Patch from Charlie to update to Google Collect rc1.
2009-04-24 23:19:18 +00:00
Michael Bayne
ae2f7316f6
Oops. Can't do that.
2009-04-17 22:58:39 +00:00