[sqlalchemy] Re: Tipo Money con Postgres

2008-01-17 Thread Alexandre da Silva
Numeric(18,4) creio que deva ser este o tipo interno utilizado no money, eu mesmo iria pesquisar ou perguntar aqui no grupo a respeito disso. --- May someone have a best solution to postgresql Money datatype? or I need to use Numeric? thank's -- Alexandre da Silva Analista de Sistemas

[sqlalchemy] Re: Tipo Money con Postgres

2008-01-17 Thread Alexandre da Silva
://www.postgresql.org/docs/7.3/interactive/datatype-money.html and http://www.postgresql.org/docs/8.2/interactive/datatype-money.html I suggest, if you can, change the datatype in next versions of your software. Att, -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003

[sqlalchemy] postgresql truncate table

2008-01-16 Thread Alexandre da Silva
someone know why when I execute a session.execute(truncate table some_table cascade) in a postgresql database nothing happens? I need to put some extra parameter? -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007

[sqlalchemy] Re: postgresql truncate table

2008-01-16 Thread Alexandre da Silva
you probably need to begin/commit a transaction since the PG dialect doesnt pick up truncate as an autocommit keyword. exactly, thank you for reply Att -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007

[sqlalchemy] parent table

2008-01-15 Thread Alexandre da Silva
the entire fk table. any suggestion? Att -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: SQLAlchemy and SQLRelay

2008-01-14 Thread Alexandre da Silva
da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com

[sqlalchemy] Re: Get default value

2008-01-11 Thread Alexandre da Silva
employee Technical id=5 ,name=technical name technical Thanks again, Att -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-11 Thread Alexandre da Silva
(): print o, o.poly print LIST FROM PERSONS # for o in session.query(Person).all(): print o, o.poly print Catalog # y= session.query(Catalog).one() print y ---code--8--code- I Hope it helps you Att -- Alexandre da Silva

[sqlalchemy] Depreciation warning

2008-01-10 Thread Alexandre da Silva
to modularization, each file have more than 10 tables, the model seems to have just one wrong column, is not so dificult to me find the wrong colum, but if model was greater it could be. maybe you can include this information at traceback. Att, -- Alexandre da Silva Analista de Sistemas

[sqlalchemy] Get default value

2008-01-10 Thread Alexandre da Silva
Hello all, is there a way that I can get the default value defined on Column(default=something) ? the default I get is a ColumDefault, and I don't know how to get it's value. any suggestion? -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007

[sqlalchemy] Re: Get default value

2008-01-10 Thread Alexandre da Silva
be null any suggestion? thank's for previous replies. -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] Re: Get default value

2008-01-10 Thread Alexandre da Silva
FROM PERSONS # Person id=2 ,name=person name Employee id=4 ,name=employee name Technical id=5 ,name=technical name I think it is working properly. but I will try to remove the type columns Thank's for help -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas

[sqlalchemy] Re: Get default value

2008-01-10 Thread Alexandre da Silva
suggest to I do this? or I cannot? -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send

[sqlalchemy] polymorphic inheritance

2008-01-10 Thread Alexandre da Silva
# for o in session.query(Person).all(): print o code---8--code-- Att, -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Re: broken relationship

2008-01-07 Thread Alexandre da Silva
( -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) gedit-todo http://alexandredasilva.wordpress.com/gedit-todo-list-plugin/ MicroDB http://www.assembla.com/space/microdb Open Sales Force System http://www.assembla.com/space/osfs opencomanche ([stopped] mail-me

[sqlalchemy] Re: Emptying out the session of new objects

2008-01-04 Thread Alexandre da Silva
Is there an easy way of flushing all objects that are categorised as new in the session ?? I think you can use session.clear(), it will remove objects from session, and persistent objects will stay on database. Att Alexandre --~--~-~--~~~---~--~~ You

[sqlalchemy] get related table object via mapped class

2008-01-04 Thread Alexandre da Silva
I want to access the Address class (and/or address_table) through a Person object, any sugestion? -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) gedit-todo http://alexandredasilva.wordpress.com/gedit-todo-list-plugin/ MicroDB http://www.assembla.com

[sqlalchemy] Re: get related table object via mapped class

2008-01-04 Thread Alexandre da Silva
Person.address._get_target_class() thank you for reply, it is always more readable that Person.address.property.mapper.class_ Thank's for all -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) gedit-todo http://alexandredasilva.wordpress.com/gedit

[sqlalchemy] Re: get related table object via mapped class

2008-01-04 Thread Alexandre da Silva
using the Person class directly: Person.address.property.mapper.class_ Person.address.property.mapper.mapped_table Thank you so much, works like a charm -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) gedit-todo http

[sqlalchemy] Re: Execute query without a mapper

2008-01-01 Thread Alexandre da Silva
http://www.sqlalchemy.org/docs/04/sqlexpression.html yes, I've already been read that, but I am using TurboGears and using session if you mean that youd like to execute using the Session itself, use the execute() method on Session and you probably want to bind your Session to the engine

[sqlalchemy] Execute query without a mapper

2007-12-31 Thread Alexandre da Silva
on database. Thanks for any help -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003-2007) gedit-todo http://alexandredasilva.wordpress.com/gedit-todo-list-plugin/ MicroDB http://www.assembla.com/space/microdb Open Sales Force System http://www.assembla.com/space/osfs

[sqlalchemy] Re: Session.execute (PostgreSQL) function not doing anything?

2007-12-30 Thread Alexandre da Silva
What is missing there? Any tips/pointers would be greatly appreciated! I not tested here if is solve your problem, but, are you calling the commit() after execution? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: get mapped class

2007-12-22 Thread Alexandre da Silva
what u need? I need the list of mapped Classes, if mapper_registry have all classes I can use it. all tables? see metadata. all mappers? see the mapper_registry the relations inbetween? u have to dig the individual mappers, walk the polymorphisms and inheritances. I just want a list

[sqlalchemy] Re: Default data and table related database objects

2007-12-21 Thread Alexandre da Silva
database trigger syntax is pretty database specific so we dont have a generic DDL construct for that right now. you can issue the DDL using a textual execute like engine.execute(CREATE TRIGGER ...). for inserting of data you usually would use a table.insert() construct. ok, it helps if I

[sqlalchemy] Re: Default data and table related database objects

2007-12-21 Thread Alexandre da Silva
we have a ticket in the works for this: http://www.sqlalchemy.org/trac/ticket/903 ok, I will look at this ticket. note that this feature applies to Table objects, not ORM mapped classes. A central tenet of SQLAlchemy is that the object relational mapper is an optional package which

[sqlalchemy] get mapped class

2007-12-21 Thread Alexandre da Silva
the table object? something like: user_table = Table(...) class User(object) pass mapper(User, user_table) I have some method like user_table.getclass? or another way to get it from orm? thank's for help -- Alexandre da Silva Analista de Sistemas - Bacharel em Sistemas de Informação (2003