[sqlalchemy] Json format on Flask Restful

2016-10-17 Thread Ramesh G
"} Program Code... import flask_restful_extend import collections from flask import Flask, jsonify, json from flask_restful import reqparse, abort, Api, Resource from sqlalchemy.ext.declarative import DeclarativeMeta from sqlalchemy import create_engine from sqlalchemy import

[sqlalchemy] How to convert sqlalchemy to json format

2016-10-17 Thread Ramesh G
How to convert sqlalchemy to json format My sample code is below... I'm struggling using various packages..etc. to convert.. the result that was received under variable rows. from flask import Flask, jsonify, json from flask_restful import reqparse, abort, Api, Resource from

[sqlalchemy] Re: querying Class Inheritance Hierarchies

2015-06-03 Thread g
all the existing inherited class type in @POLYMORPHICLS.expression Regards G On Tuesday, June 2, 2015 at 6:30:44 PM UTC+2, g wrote: Hi all Is there a way to get the classname of the polymorphic class result in a single query on the base class ? soemthing like this session.query

[sqlalchemy] querying Class Inheritance Hierarchies

2015-06-02 Thread g
? Regards G -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: relationship(with lazy=dynamic) different behavior on session.delete() btw. SA 0.9.3 and SA 1.0.4

2015-05-27 Thread g
using SA. parent = session.query(Node).get(1) session.delete(parent) session.commit() In my case should raise the same IntegrityError. Some hints ? Regards G On Tuesday, May 26, 2015 at 5:18:27 PM UTC+2, g wrote: Hi all With SA 1.0.4 I can delete rows that i could not delete

[sqlalchemy] Re: relationship(with lazy=dynamic) different behavior on session.delete() btw. SA 0.9.3 and SA 1.0.4

2015-05-27 Thread g
to the stringall. This has the effect of entirely disabling SQLAlchemy’s behavior of setting the foreign key column to NULL, and a DELETE will be emitted for the parent row without any affect on the child row, even if the child row is present in memory. Regards G On Tuesday, May 26, 2015 at 5:18

[sqlalchemy] relationship(with lazy=dynamic) different behavior on session.delete() btw. SA 0.9.3 and SA 1.0.4

2015-05-26 Thread g
as in SA 0.9.3 ? Regards G -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email

[sqlalchemy] Re: column_descriptions on recursive query : AttributeError: 'CTE' object has no attribute 'entity'

2015-04-30 Thread g
2583 ] 2584 AttributeError: 'CTE' object has no attribute 'entity' Cheers g On Wednesday, April 29, 2015 at 11:16:54 AM UTC+2, g wrote: Hi all I have a query like that from sqlalchemy.orm import aliased class Part(Base): __tablename__ = 'part' part = Column(String

[sqlalchemy] column_descriptions on recursive query : AttributeError: 'CTE' object has no attribute 'entity'

2015-04-29 Thread g
('total_quantity') ).\ group_by(included_parts.c.sub_part) in sqlalchemy 1.0 we do: q.column_descriptions to get the query columns result is *AttributeError: 'CTE' object has no attribute 'entity'* *Note:* This was working with release 0.9.9 Any idea how to fix it ? Cheers g -- You received

[sqlalchemy] quoting in a sub clause

2013-07-23 Thread matt g
Hi, We are using sqlalchemy with Amazon Redshift. One of the things that I wanted to do was to create a custom construct for Redshift's unload statement. I modified the sample InsertFromSelect (http://docs.sqlalchemy.org/en/rel_0_8/core/compiler.html?highlight=insertfromselect). However, we

Re: [sqlalchemy] quoting in a sub clause

2013-07-23 Thread matt g
, for example), you need to escape them in the query text. For example: ('select * from venue where venuestate=\'NV\'') On Tuesday, July 23, 2013 10:22:09 AM UTC-5, Michael Bayer wrote: On Jul 23, 2013, at 11:09 AM, matt g mge...@gmail.com javascript: wrote: Hi, We are using

Re: [sqlalchemy] oracle cursor outparameters

2012-09-23 Thread matt g
For the parts I'm working on right now, this is perfect. Thank you. Matt On Friday, September 21, 2012 5:19:17 PM UTC-5, Michael Bayer wrote: On Sep 21, 2012, at 3:49 PM, matt g wrote: Hi, I'm working with a client that does most of their work in stored procedures on an oracle database

[sqlalchemy] oracle cursor outparameters

2012-09-21 Thread matt g
Hi, I'm working with a client that does most of their work in stored procedures on an oracle database. One of the things I'm trying to help them with is transitioning to use sqlalchemy for calling said procedures. For simple input and output types i was able to follow threads in this group and

Re: [sqlalchemy] sqla on app engine?

2011-10-08 Thread Thomas G. Willis
you can run unittests against the sdk. there's a couple of setup things that have to be done though. I use the NoseGAE plugin for it. I don't think sql on gae is available in the sdk yet so there's not really much that can be done at the moment. When it does become available I'd be happy to

[sqlalchemy] Updating attributes of an instance

2010-10-07 Thread Alok G. Singh
Is there an elegant way of replacing all the attributes of an instance, except the primary key ? Currently, I create a new object with all the date, fetch the old object and do for k,v in new: old.__setattr__(k, v), taking care to skip the primary key attribute. There's a custom __iter__ method

[sqlalchemy] Re: web development with sqlalchemy

2009-10-21 Thread Thomas G. Willis
Sqlalchemy fits in nicely with pylons, turbogears 2, and repoze.bfg and I'm sure many others. So you have options. I wouldn't be able to offer any advice other than that, but spend a few moments getting familiar with each and you'll probably reach some conclusion. On Oct 21, 11:09 am, webdexter

[sqlalchemy] Selecting a column of a Secondary table

2008-02-13 Thread g
Say we have a many-to-many relation: mapper(Group, group_tbl, properties={'users' : relation(User, secondary=group_user_tbl) } ) group_user_tbl = Table('group_user', metadata, Column('group_id', Integer, ForeignKey('group.group_id')), Column('user_id', Integer,