Re: [sqlalchemy] python customer function

2015-05-11 Thread Jose Soares
thanks for point me to this docs, Jonathan, I'm going to take a look at it. j On 08/05/2015 23:30, Jonathan Vanasco wrote: Would you be able to use a TypeDecorator? http://docs.sqlalchemy.org/en/latest/core/custom_types.html#sqlalchemy.types.TypeDecorator That will allow you to define a

Re: [sqlalchemy] python customer function

2015-05-08 Thread Jose Soares
Hi Mike, thanks to reply my question. In my case the extract function is unuseful because it needs a datetime to extract parts of it but I don't have a datetime but a codified date. I need to manage a string which is a personal code with info about name, birthday, birth place and gender.

Re: [sqlalchemy] python customer function

2015-05-08 Thread Jonathan Vanasco
Would you be able to use a TypeDecorator? http://docs.sqlalchemy.org/en/latest/core/custom_types.html#sqlalchemy.types.TypeDecorator That will allow you to define a function for handling how sqlalchemy inserts and accesses the data from sql. -- You received this message because you are

Re: [sqlalchemy] python customer function

2015-05-07 Thread Mike Bayer
On 5/7/15 9:10 AM, jo wrote: Hi all, I would like to create a python customer function to extract data from a table column and return a calculated value as in: def birth(data): mm = dict(A='01',B='02',C='03',D='04',E='05',H='06',L='07',M='08',P='09',R='10',S='11',T='12')

[sqlalchemy] python customer function

2015-05-07 Thread jo
Hi all, I would like to create a python customer function to extract data from a table column and return a calculated value as in: def birth(data): mm = dict(A='01',B='02',C='03',D='04',E='05',H='06',L='07',M='08',P='09',R='10',S='11',T='12') return '19'+data[6:8] +'-'+