Pretty please? On Fri, Feb 12, 2010 at 2:36 PM, Naftoli Gugenheim <[email protected]>wrote:
> (FYI: buildSetXXValue methods are called when loading the field from the > database in MetaMapper.scala. This question is relevant in the context of a > Mapped(Date)(Time) that corresponds to a database column with a char-based > type.) > > If the toDate calls in buildSetXXValue are to be replaced with the > field-customized parser, then the current design of buildSetXXValue would > require the field-level parser-customize method to take the form > > def parse(s: String): Box[Date] // no side effect > > rather than something like say > > def fromString(s: String): Unit // set the value > > On the other hand if buildSetXXValue needs to have some more general > parsing logic then it would be better to have the second syntax. > > Therefore until someone can comment, my current work for Lift is > effectively frozen midair. > > > 2010/2/10 Naftoli Gugenheim <[email protected]> > > >>> - Until now there were two places in Mapped(Date)(Time) where parsing >>> occurred. setFromAny used LiftRules.parseDate, while buildSetStringValue >>> etc. used TimeHelpers.toDate. >>> - Do we need methods like setFromAny and TimeHelpers.toDate, which take >>> an Any and pattern match on several types of inputs? Isn't that very >>> un-typesafe? >>> - Why the inconsistency between setFromAny and buildSetStringValue? >>> Should both use ConversionRules? Should both use toDate which should use >>> ConversionRules? >>> >> >> David, it would be great if you could comment on at least these points. >> Thanks. >> >> >> > -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
