hello all!
probably this was asked before, as I already grabbed some answers
already from here and stackoverflow, but I don't really feel happy about it.
problem: i have a query that it's result must go directly as a json (web
/ rpc usage), and I wonder if I must go from the cycle .
class
thanks Simon!
yes, i'm already using hooks so I can pass datetime, decimal, enums and
so on; of course, it can help if I have to go with the result proxy. i
just wonder if there's another way of doing this without having
sqlalchemy to provide me helpers of proxy objects. i'm thinking about
On Mon, Jun 1, 2015 at 1:51 PM, Richard Gerd Kuesters
rich...@pollux.com.br wrote:
hello all!
probably this was asked before, as I already grabbed some answers already
from here and stackoverflow, but I don't really feel happy about it.
problem: i have a query that it's result must go
Alright, thanks!
I would try to submit the PR. But it does look like a transitional package
to me. How do we generally handle such upstream changes anyway?
On Monday, June 1, 2015 at 9:06:20 AM UTC+5:30, Michael Bayer wrote:
On 5/31/15 8:58 PM, Fayaz Yusuf Khan wrote:
On Sunday 31 May
Hello,
I'm trying to do create a class with joined inheritance.
Some have their name in their table and have to access it from another
table using a join.
I did this mixin and what though it creates an expression error because the
SQL generated is not the good one.
class NameMixin(object):
Thanks Jonathan,
I agree with you, 100%. I have methods for that also, when I have to
deal with the real objects and queries and stuff.
The point, in my question, is that I have some services that are not
vital to my application, but are used constantly -- and it just spits
out data. I'm
argh!
results = map(lambda r: dict(r.items()),
session.execute(my_select).fetchall())
much simplier :) but, the question persists: is this the best approach
for a raw data dictionary result query?
best regards,
richard.
On 06/01/2015 10:22 AM, Richard Gerd Kuesters wrote:
well, i can
I would like create table as select statement
http://www.postgresql.org/docs/8.1/static/sql-createtableas.html
On 1 June 2015 at 20:48, Mike Bayer mike...@zzzcomputing.com wrote:
On 6/1/15 9:39 AM, Ranjith Ramachandra wrote:
I am using sqlalchemy's core features do write some abstraction
On Sunday, May 31, 2015 at 4:48:09 AM UTC-4, Fayaz Yusuf Khan wrote:
I do the former in cases which involve very long transactions. (Batch
uploads and processing. I'm counting batch and background tasks as part of
the controller layer here.)
I manage transactions manually in the
All my models inherit from an additional base class with this method:
def columns_as_dict(self):
return a dict of the columns; does not handle relationships
return dict((col.name, getattr(self, col.name)) for col in
sqlalchemy_orm.class_mapper(self.__class__).mapped_table.c)
On 6/1/15 9:39 AM, Ranjith Ramachandra wrote:
I am using sqlalchemy's core features do write some abstraction layer.
The layer itself needs to be able to create tables from select statements.
Sample code:
metadata = MetaData(bind=engine)
table = Table(table_name, metadata,
On 6/1/15 5:56 AM, Alexis Benoist wrote:
Hello,
I'm trying to do create a class with joined inheritance.
Some have their name in their table and have to access it from
another table using a join.
I did this mixin and what though it creates an expression error
because the SQL generated is
On 6/1/15 11:19 AM, Ranjith wrote:
I would like create table as select statement
http://www.postgresql.org/docs/8.1/static/sql-createtableas.html
OK but also you want to use bound parameters, apparently. I've answered
the question at http://stackoverflow.com/a/30577608/34549.
On 1
I am using sqlalchemy's core features do write some abstraction layer. The
layer itself needs to be able to create tables from select statements.
Sample code:
metadata = MetaData(bind=engine)
table = Table(table_name, metadata, autoload=True, autoload_with=engine)
s =
well, i can use select and zip ... don't know if this is the best approach:
foo = session.execute(my_select) # my_select have the same rules as
the session.query(A...,
A).filter(...).order_by(...).offset(...).limit()
results = map(lambda r: dict(foo.keys(), r), foo.fetchall())
any
I have also asked the question
at
http://stackoverflow.com/questions/30575111/how-to-create-a-new-table-from-select-statement-in-sqlalchemy
On Monday, 1 June 2015 19:09:13 UTC+5:30, Ranjith Ramachandra wrote:
I am using sqlalchemy's core features do write some abstraction layer. The
layer
Nailed it, removing quote;False and setting the quoting characters to []
did the job. Huge thanks for the help,
On Friday, 29 May 2015 09:43:27 UTC+10, Michael Bayer wrote:
On 5/28/15 7:13 PM, Adam Darwin wrote:
Thanks for the response Michael as far as I can tell there is no
17 matches
Mail list logo