Re: [sqlalchemy] Encapsulate multiple columns into one

2015-09-24 Thread Yegor Roganov
Thanks, it worked. If someone is interested: class UrlBundle(Bundle): def __init__(self, *args, suffix='', **kwargs): super().__init__(*args, **kwargs) self._suffix = suffix def create_row_processor(self, query, procs, labels): s_proc =

Re: [sqlalchemy] Encapsulate multiple columns into one

2015-09-22 Thread Mike Bayer
On 9/22/15 7:18 AM, Yegor Roganov wrote: I know that I can encapsulate multiple columns into one using either composite column or hybrid_property, but unfortunatelly neither suits me 100%. Let's say I have a `File` model which includes fields `id`, 'file_name`, `storage_type`, and there is

[sqlalchemy] Encapsulate multiple columns into one

2015-09-22 Thread Yegor Roganov
I know that I can encapsulate multiple columns into one using either composite column or hybrid_property, but unfortunatelly neither suits me 100%. Let's say I have a `File` model which includes fields `id`, 'file_name`, `storage_type`, and there is a `get_url` python function that when given