No worries, as long as it works for you then that's good.

V/r
Anthony

On 10/30/07, Evan David Light <[EMAIL PROTECTED]> wrote:
> Aw nuts.  No, the mistake that I made was more elementary than that.
>
> See, I was reading the code (while looking at the docs) but had not
> executed the code.  Double dumbass on me for not realizing that ["a",
> "b", ["c"]].join(' AND ') results in ' a AND b AND c '. :-(  '|='
> would have resulted in a flat array mergining the unique elements of
> the two arrays but that's unnecessary.  My bad.
>
> On Oct 30, 2007, at 7:53 AM, Anthony Eden wrote:
>
> > On 10/29/07, Evan David Light <[EMAIL PROTECTED]> wrote:
> >> Currently reads:
> >>
> >>         conditions << configuration[:conditions] if
> >> configuration[:conditions]
> >>
> >> However, because configuration[:conditions] appears to expect an
> >> Array
> >> of Strings representing conditions, shouldn't this read something
> >> more
> >> like:
> >>
> >>        conditions |= configuration[:conditions] if
> >> configuration[:conditions]
> >
> > It definitely needs to remain <<. The previous chunk of code creates
> > the conditions array and will add a condition if the new_records_only
> > configuration returns true. After this configuration[:conditions] is
> > appended to the conditions array which is then used in the query.
> >
> > Now, while ActiveRecord conditions does support the use of an array
> > where the first element is the conditions SQL string and the remaining
> > arguments are used as replacement variables, I have not used this
> > pattern inside AW ETL, so perhaps that's why you were thinking it
> > should work differently? What I could do is allow it to accept an
> > array in configuration[:conditions] and then flatten the whole array
> > before executing the query, would that work for you?
> >
> > V/r
> > Anthony
> >
> > --
> > Cell: 321 473-4966
> > Current Location: Melbourne, FL
> > Home Location: Melbourne, FL
>
> _______________________________________________
> Activewarehouse-discuss mailing list
> Activewarehouse-discuss@rubyforge.org
> http://rubyforge.org/mailman/listinfo/activewarehouse-discuss
>


-- 
Cell: 321 473-4966
Current Location: Melbourne, FL
Home Location: Melbourne, FL
_______________________________________________
Activewarehouse-discuss mailing list
Activewarehouse-discuss@rubyforge.org
http://rubyforge.org/mailman/listinfo/activewarehouse-discuss

Reply via email to