Re: [sqlalchemy] printing a 'compiler' results in AttributeError: 'PGCompiler_psycopg2' object has no attribute 'string'

2015-06-30 Thread Mike Bayer
On 6/30/15 7:21 PM, Jonathon Nelson wrote: On Tue, Jun 30, 2015 at 6:18 PM, Mike Bayer mike...@zzzcomputing.com mailto:mike...@zzzcomputing.com wrote: how are you getting this Compiler object? the .string element is created within the constructor. It was actually as a result of

[sqlalchemy] Re: sqlaclhemy ORM don't update jsonb[postgres-psycopg2]

2015-06-30 Thread Jonathan Vanasco
This sounds like you may be having issues with mutation tracking on edits. http://docs.sqlalchemy.org/en/rel_1_0/dialects/postgresql.html?highlight=jsonb#sqlalchemy.dialects.postgresql.JSONB The JSON

[sqlalchemy] Warning in tree structure consisting of 3 models

2015-06-30 Thread Viktor Roytman
I have a three classes that I am using to represent a tree: Tree has some information about the tree at large and a list of nodes. Node has some information specific to a node, a list of subtrees, and needs a particular piece of information about the Tree for a constraint. SubTree has a list of

[sqlalchemy] sqlaclhemy ORM don't update jsonb[postgres-psycopg2]

2015-06-30 Thread Yaser Abbasi
Hi, Sqlalchemy orm don't find out jsonb changes for update when call for example Model.add(obj) !!! now I use Model.update({jsonb_filed_name:jsonb_filed_name}) What is problem? thanks, best -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To

Re: [sqlalchemy] Warning in tree structure consisting of 3 models

2015-06-30 Thread Mike Bayer
On 6/30/15 3:54 PM, Viktor Roytman wrote: I have a three classes that I am using to represent a tree: Tree has some information about the tree at large and a list of nodes. Node has some information specific to a node, a list of subtrees, and needs a particular piece of information about the

Re: percentile symbol quoting in op

2015-06-30 Thread Jonathon Nelson
On Fri, Jun 26, 2015 at 11:49 AM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/26/15 12:23 PM, Jonathon Nelson wrote: Greetings! I am trying to use alembic to drop and re-create a PL/pgSQL function, and the function has embedded percentile (for use in RAISE but also present in

[sqlalchemy] Re: Warning in tree structure consisting of 3 models

2015-06-30 Thread Viktor Roytman
I think I see why the warning pops up, thank you for clarifying that. I'd prefer to live with the warning since in my actual application that contradiction won't be cropping up. What's the best way to suppress this particular warning? On Tuesday, June 30, 2015 at 3:54:51 PM UTC-4, Viktor

Re: [sqlalchemy] printing a 'compiler' results in AttributeError: 'PGCompiler_psycopg2' object has no attribute 'string'

2015-06-30 Thread Jonathon Nelson
On Tue, Jun 30, 2015 at 6:18 PM, Mike Bayer mike...@zzzcomputing.com wrote: how are you getting this Compiler object? the .string element is created within the constructor. It was actually as a result of trying to figure out how to use the code you gave me for the psycopg2 percentile

[sqlalchemy] TypeDecorators and raw inserts

2015-06-30 Thread Lele Gaifax
Hi all, I have a custom migration script that connects to two different databases and transfers data from one to the other, adapting it to the new structure and format. On the source side it uses the autoloading feature of a Table, while on the target each table is fully described, and some of

[sqlalchemy] printing a 'compiler' results in AttributeError: 'PGCompiler_psycopg2' object has no attribute 'string'

2015-06-30 Thread Jonathon Nelson
When trying to debug something, I tried to acquire the string representation of a 'compiler' object. I got this error: File /usr/lib64/python2.7/site-packages/sqlalchemy/sql/compiler.py, line 218, in __str__ return self.string or '' AttributeError: 'PGCompiler_psycopg2' object has no

Re: [sqlalchemy] printing a 'compiler' results in AttributeError: 'PGCompiler_psycopg2' object has no attribute 'string'

2015-06-30 Thread Mike Bayer
how are you getting this Compiler object? the .string element is created within the constructor. On 6/30/15 6:32 PM, Jonathon Nelson wrote: When trying to debug something, I tried to acquire the string representation of a 'compiler' object. I got this error: File

Re: [sqlalchemy] TypeDecorators and raw inserts

2015-06-30 Thread Mike Bayer
On 6/30/15 6:56 PM, Lele Gaifax wrote: Hi all, I have a custom migration script that connects to two different databases and transfers data from one to the other, adapting it to the new structure and format. On the source side it uses the autoloading feature of a Table, while on the target