Why not supported this?
@Select({"SELECT * FROM send LIMIT #{offset}, #{limit}"})
List getAllItems(int offset, int limit);
Its limitation of Java or bug in actual version?
-
To unsubscribe, e-mail: user-java-unsubscr...@ib
On Fri, Oct 2, 2009 at 9:40 PM, Clinton Begin wrote:
> Unfortunately, by coincidence, I'm currently rewriting the entire
> DefaultResultSetHandler -- in a serious way. It's currently in a real state
> of flux.
> I'll work on it this weekend some more to try to get it to a Beta 4. Your
> feedback
It's a limitation in Java. However, we are working on a couple of potential
options. But it's not possible to do it the way you've written it (which is
really sad, because it's perfectly possible in C# and other languages).
Clinton
2009/10/4 Tomáš Procházka
>
> Why not supported this?
>
> @Sel
You should log a JIRA ticket. Our general rule of thumb is: If it isn't in
Jira, it's not getting done.
The one I addressed was in SqlRunner and was a Jira ticket logged against
the migrations framework.
Clinton
On Sun, Oct 4, 2009 at 2:41 PM, Martin Ellis wrote:
> On Fri, Oct 2, 2009 at 9:4
And if you have a patch, you can attach it to the Jira ticket.
On Sun, Oct 4, 2009 at 2:41 PM, Martin Ellis wrote:
> On Fri, Oct 2, 2009 at 9:40 PM, Clinton Begin
> wrote:
> > Unfortunately, by coincidence, I'm currently rewriting the entire
> > DefaultResultSetHandler -- in a serious way. It'
I'd be curious to understand what the Java limitation is. I would have
thought that with Java 1.5's support of varargs, limitations such as
this would no longer exists. Of course, to use varargs here, I suppose
we'd have to use Object[], which would shoot your type safety.
Clinton Begin wrot
There's no way to introspect on the parameter names.
So your choices become:
@Select({"SELECT * FROM send LIMIT #{1}, #{2}"})
List getAllItems(int offset, int limit);
...Or...
@Select({"SELECT * FROM send LIMIT #{offset}, #{limit}"})
List getAllItems(@Param("offset") int offset, @Param("limit")
Currently, performing a single row select throws an exception if zero or
> 1 rows are returned. While this is certainly workable, an
alternative that would be easier on the programmer would be to set the
result to null if no rows are found, and only throw an exception if > 1
rows are found.
Ignore this. I realized after taking a break that it doesn't work with
primitive types. I think the thing I find most frustrating with Java is
that it doesn't treat primitive types in a consistent manner with
classes derived from Object.
Guy Rouillier wrote:
Currently, performing a single ro
I'm glad to see you are considering allowing multiple parameters. I've
found having to bind everything into one is cumbersome.
What are you thinking of doing for XML? I'd suggest replacing
ParameterType with ParameterList, with the latter a cut and paste from
the mapper method. Your example
10 matches
Mail list logo