I think the most simple option in your situation is use computed fields.

But if you really need to use a SQL function, you should write your
query by hand.



On Thu, Dec 13, 2012 at 3:48 PM, at <matifa...@gmail.com> wrote:
>
> Hi,
>
> Lets say we've a table with name taxpayers; it contains 5 fields. Out of
> these 5, two start with ar_.
> What I want is to run some special function (say convertme() ) on these two
> fields starting with ar_ , while fetching data through DAL, like:
>
> query = (db.taxpayers.id > 10)
> result = db(query)
>
> Can we somehow override the above method in a way that it would run the
> following query:
> select field1, field2, convertme(ar_field3), field4, convertme(ar_field5)
> from taxpayers where id > 0
>
> Thanks in advance.
>
>
> --
>
>
>

-- 



Reply via email to