Re Parametrizable statements

18 views
Skip to first unread message

Maxime Lévesque

unread,
Oct 31, 2011, 10:02:34 PM10/31/11
to Matthew Pocock, David Whittaker, squeryl-co...@googlegroups.com
Here's a proof of concept for a 're parametrizable' statement
the idea is that the SQL, and AST can be reused for multiple calls,
and within a session, the JDBC prepared statement can be reused as well.

 https://github.com/max-l/Squeryl/commit/4ff9cb14a878bfd35a5739cc5dd0a7e40018fb55

update statements (partial updates) might not yet work with this method (not tested yet)
but it could use the same idea.

This is part of the optimization effort initiated my Matthew, last we discussed
three things that could be done, re parametrizable statement, is one, the two others are :

  https://github.com/drdozer/Squeryl/commit/531657aaa52bd4a3627a9145553f0d3fc606d06f
  https://github.com/drdozer/Squeryl/commit/9602db732c54fd3c5055ce1ddec69d77b7ddcdf9


ML

Maxime Lévesque

unread,
Oct 31, 2011, 10:04:58 PM10/31/11
to Matthew Pocock, David Whittaker, squeryl-co...@googlegroups.com
One difficulty that has nothing to do with performance but esthetics, is
that I'm not yet able to have these two methods have the same name :

  protected def varArgN[A,B <% NumericalExpression[A]](b: B) =   ..
  protected def varArgNN[A,B <% NonNumericalExpression[A]](b: B) = ..

without having an ambiguity at the call site !

ML

2011/10/31 Maxime Lévesque <maxime....@gmail.com>
Reply all
Reply to author
Forward
0 new messages