2013/6/18 <[email protected]> > Hi! > > > Looks interesting! So I guess your converter type really worked? >> class AsOption[T: ClassTag] extends Converter[T, Option[T]] >> > I didn't tried it on inserts/updates, selects are working fine > > How about re-defining NVL, such that >> >> - nvl(Option[T], T) => T >> - nvl(Option[T], Option[T]) => Option[T] >> > I'll take a look... > > For now I tried to work on simplifying working on query templates, please, > take a look if you have time: https://gist.github.com/newffy/5807295 >
I think I get your point. There's probably some room for improvement, to make the code at the call-site even less verbose (e.g. making ".ext" unnecessary). But yes, it seems to be possible to play around with those Scala tools, to extract row value type information from a subselect... > P.S. I think, it's better to rename package org.jooq.scala to smth > like org.jooq.scalawrap, because import statement like import org.jooq._ > causes interferences with root scala package (scala._) > Heh, I remember the discussions about using asterisks for imports in the Java ecosystem. It is now well-agreed, that "global imports" aren't a good idea, specifically because IDEs are good at automating the task of importing single types and members. If you import org.jooq._, you might also have lots of clashes with jOOQ's own, short type names, such as: Condition, Configuration, DSL, Field, Row, Record, Result, Table... I'm actually a bit surprised by this feature, of being able to import subpackages that way. That's just looking for trouble :-) Isn't there a better way to resolve such things? How do other libraries deal with this? Or do you have an alternative suggestion? I'm not a fan of using a "trick "package name to avoid problems with powerful (but ambiguous) secondary-target languages. Can Scala imports rename imported objects for their local scope, such as Ceylon can? -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
