Commit Graph

57 Commits

Author SHA1 Message Date
mdb 38f09416b7 Eliminate the prepared statement caching as it's not useful since we can't use
server side prepared statement caching and it's causing things to break when
for some reason the prepared statements are being closed (perahps automatically
by the new MySQL deriver) and then being reused.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1834 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-28 21:30:35 +00:00
mdb e8cb1fb2d4 Add the NOOP back but deprecate it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1833 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-25 23:29:08 +00:00
mdb ec436833fb Type-safe result listeners. Whee!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1832 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-25 23:23:37 +00:00
mdb 5d6272c0ce Missed an auxiliary table.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1831 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-21 22:18:07 +00:00
mdb c67926d14d Revamped JORA to avoid keeping connection objects around which is not thread
safe and particularly not so in the webapp where one thread might come slip a
read-only connection into the session before an update was about to happen.

This ends up being a giant refactor, but it's much cleaner this way (to pass a
connection into the Table whenever it is doing anything), so I've taken the
pain. Fortuanately, code that uses the convenience methods doesn't need to
change, so as a part of this refactor I've taken the opportunity to switch a
bunch of old stuff to the new, concise, future proof hotness.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1830 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-21 21:26:07 +00:00
ray ca9adfe063 Better genericized typing for addAll() methods.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1829 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-19 18:41:44 +00:00
mdb f160f099f4 We can't use DriverManager if we want to use custom driver classes.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1828 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-17 18:22:32 +00:00
mdb 1e518d06bb Added methods for getting SQL dates to match the methods for getting util
dates.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1827 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-17 01:38:45 +00:00
mdb ccebc24367 Mark updating queries as such.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1826 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 19:55:36 +00:00
mdb 9946c3e311 Propagate more modified row counts.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1825 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 18:43:44 +00:00
mdb e6c4008258 Documented some return values.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1824 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 18:41:46 +00:00
mdb a1f2a34090 Return the number of rows modified by an update.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1823 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 18:40:31 +00:00
mdb 790d0dd35f Require a distinction to be made between read-only and read-write queries so
that we can route read-only queries to one or more read-only mirrors of a
database (the MySQL database drivers supports round-robin load balancing of
queries to read-only slaves).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1822 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-13 18:01:29 +00:00
mdb 86bce6f08f Beans, frank.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1821 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-12 23:35:08 +00:00
mdb 325630b84e Added loadAll() that supports joining with other tables.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1820 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-12 23:21:18 +00:00
mdb a7f04bb8b0 Make the lastInsertedId available when using store().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1819 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-12 22:21:15 +00:00
mdb 333ec4c439 Removed reference to 1.5-specific Collections; fixed ArrayList override.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1818 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-11 04:06:32 +00:00
mdb 9a3d1f1672 Added getColumnSize().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1817 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-11 03:02:44 +00:00
samskivert@gmail.com 7c751ee98d Ohforfucksake. Apparently we need it here as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1815 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-10 21:04:33 +00:00
mdb 270f915ad9 These need to be in the leaf classes.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1814 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-10 20:57:47 +00:00
andrzej b51d8df102 Fix for ClassCastException.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1813 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-10 18:56:31 +00:00
ray e27af6bfb3 Copy the array using clone; was unchecked-in in my copy of SortableArrayList.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1812 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-10 17:40:57 +00:00
mdb cf3b3148be git-svn-id: https://samskivert.googlecode.com/svn/trunk@1811 6335cc39-0255-0410-8fd6-9bcaacd3b74c 2006-04-10 09:00:44 +00:00
mdb acf8fea697 Genericized all of our Collections extensions; switched numerous other classes
to typesafe 1.5 patterns; tidied some things up. Two impactful changes:

- jora.Table now takes the class object of the row class, rather than its name;
  I also removed support for the derived table stuff as we don't use it and it
  was a PITA to make work cleanly with proper type-safety;

- SortableArrayList got split into SortableArrayList (which does its sorting
  using a Comparator) and ComparableArrayList which contains elements that
  implement Comparable. In the world of loose typing, one class could do both,
  but in strong typing land, they have to be separate classes.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1810 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-10 08:57:47 +00:00
mdb cef9db2032 Starting down the path of converting everything to 1.5 and using Retroweaver to
make things work on the client. We're starting with parameterized types which
are backwards compatible with 1.4 anyway so all Retroweaver is doing to such
classes is changing the classfile format version number. We'll get more jiggy
later as we become more comfortable with the process.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1809 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-10 02:39:30 +00:00
mdb b79253cd76 Made sanitize() cope with null.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1808 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-05 02:40:18 +00:00
mdb b66e2d6e52 Moved robust jar unpacking code out of Narya and into Samskivert.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1807 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-04 18:41:45 +00:00
ray 8adbb71ad9 Added a needed method, since I have write permission to samskivert.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1806 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-04-04 17:22:35 +00:00
andrzej f5199e0baf Have the increment method return the new value.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1805 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-31 23:46:44 +00:00
mdb 046c9c29b9 Whoops, this is an Integer.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1804 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-28 20:24:00 +00:00
mdb c69526f67e Include our siteId if appropriate.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1803 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-27 23:47:29 +00:00
mdb b9a9f9635f Configure the loaded users with a field mask.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1802 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-27 19:56:49 +00:00
mdb 678d298039 Moved the public methods above the protected, added lookupUsersWhere().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1801 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-27 19:23:06 +00:00
mdb 843ce5cab4 Allow for a create table postamble.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1800 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-19 19:40:57 +00:00
ray 7739d75780 Shrink our capacity by half if, after removing an element, it is bigger
than the default capacity and we're using less than 1/8th of it.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1799 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-11 02:40:49 +00:00
mdb 81d2e89ee2 Make it easy to wire up an anonymous derivation of OneLineLogFormatter.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1798 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-10 19:16:52 +00:00
mdb 6b176b3e20 Third time's the charm.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1797 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-07 00:40:42 +00:00
mdb a099343163 We were not handling differences that were exactly (to the millisecond) an
integer number of months.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1796 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-06 23:54:36 +00:00
mdb 9663af0365 Fixed inadvertent change.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1795 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-06 23:29:13 +00:00
mdb 647a4a597d Added a couple of date calculation methods.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1794 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-03-06 23:25:02 +00:00
mdb fde58fe833 Note in the documentation that we convert things to uppercase.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1793 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-23 19:01:47 +00:00
andrzej 478a5826a0 Clear the snapshot array when we're done applying an op so that we don't
retain references that will interfere with garbage collection.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1792 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-23 03:10:47 +00:00
mdb 58cbc0e496 Screw having .sql files, let's just define the schema in code where everything
else lives anyway.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1791 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-20 22:41:16 +00:00
mdb 2624e2d9e1 Added loadSchema().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1790 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-20 21:58:50 +00:00
mdb d280925985 Added loadAll().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1788 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-20 21:58:13 +00:00
mdb b3049d6a1d Only put the colon in if we've got a logging context.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1787 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-16 00:44:46 +00:00
mdb 426eedfafe Make the logging context (the function we were in when we generated the
message) optional.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1786 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-16 00:41:21 +00:00
mdb 85b6a76cf2 Prevent NPE when operating on a null list. A null list should be treated as an
empty list.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1785 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-15 23:15:58 +00:00
ray aed7a53e28 git-svn-id: https://samskivert.googlecode.com/svn/trunk@1783 6335cc39-0255-0410-8fd6-9bcaacd3b74c 2006-02-06 22:02:43 +00:00
ray 7068ca93d1 Fixed build: left something in that I was hemming and hawing about:
something that would be slightly more efficient if the other Collection
was an ArrayIntSet, vs something more general for all Interables. I suppose
I could put both in: test of ArrayIntSet and do the most efficient thing,
then Interable and end up creating an Interator, or pass to the super method.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1781 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2006-02-06 19:32:23 +00:00