[sqlalchemy] transform a set to an array

2007-09-07 Thread Kai_002
Hello, I want to call a stored procedure which takes an array as input. Provides sqlalchemy an opportunity to call a procedure with an array as parameter? Also, I'm looking to find a solution to transform a set into an array string (ARRAY[..,..]), but I can't find it in sqlalchemy. Thanks Kai

[sqlalchemy] Re: sqlalchemy.select() and tablename.select() why are they different?

2007-09-07 Thread Lukasz Szybalski
On 9/6/07, Lukasz Szybalski [EMAIL PROTECTED] wrote: On 9/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Thursday 06 September 2007 23:03:35 Lukasz Szybalski wrote: Hello, So it seems to me there are two select function that I can use but they are different First:

[sqlalchemy] Re: bisect.insort

2007-09-07 Thread jason kirtland
Jean-Philippe Dutreve wrote: Thanks Jason for your clear explanation. Is there any mean to do your suggestion to call the pure Python version without coping/pasting it into my module? Not that I know of- the Python functions get overwritten by the C implementations when the module is

[sqlalchemy] Re: sqlalchemy with turbogears and assign_mapper: select

2007-09-07 Thread Paul Johnston
Hi, And if I wanted to select a year and group by year? select User.Year from User group by User.Year db.execute(select([User.Year]) ??? Have a look at http://www.sqlalchemy.org/docs/04/sqlexpression.html Paul --~--~-~--~~~---~--~~ You received this message

[sqlalchemy] Re: bisect.insort

2007-09-07 Thread sdobrev
On Friday 07 September 2007 13:54:03 Jean-Philippe Dutreve wrote: I was using SA 0.3.9 to insert an item in an ordered list with bisect method insort (py 2.5): mapper(Entry, table_entries) mapper(Account, table_accounts, properties = dict( entries = relation(Entry,

[sqlalchemy] Re: bisect.insort

2007-09-07 Thread jason kirtland
Jean-Philippe Dutreve wrote: I was using SA 0.3.9 to insert an item in an ordered list with bisect method insort (py 2.5): mapper(Entry, table_entries) mapper(Account, table_accounts, properties = dict( entries = relation(Entry, lazy=True, backref=backref('account',

[sqlalchemy] Re: bisect.insort

2007-09-07 Thread Jean-Philippe Dutreve
Thanks Jason for your clear explanation. Is there any mean to do your suggestion to call the pure Python version without coping/pasting it into my module? On 7 sep, 16:28, jason kirtland [EMAIL PROTECTED] wrote: Jean-Philippe Dutreve wrote: I was using SA 0.3.9 to insert an item in an ordered

[sqlalchemy] Re: sqlalchemy.select() and tablename.select() why are they different?

2007-09-07 Thread sdobrev
ok. So this time I am trying to get data from my widget from database that has two compound keys, using assign_mapper. #Initialize: User_table = sqlalchemy.Table('User', metadata, autoload=True) class User(object): pass usermapper=assign_mapper(session.context,User,user_table) #get

[sqlalchemy] Re: sqlalchemy.select() and tablename.select() why are they different?

2007-09-07 Thread Lukasz Szybalski
ok. So this time I am trying to get data from my widget from database that has two compound keys, using assign_mapper. #Initialize: User_table = sqlalchemy.Table('User', metadata, autoload=True) class User(object): pass usermapper=assign_mapper(session.context,User,user_table) #get

[sqlalchemy] Re: problem with Numeric type and mysqll

2007-09-07 Thread jason kirtland
remi jolin wrote: Hello, I have the following definition (using Elixir) class Manifestation(Entity): has_field('price', Numeric) The DB is mysql and something like m = Manifestation(price=10.0) then when accessing to this manifestation again (after flush, clear, etc...) I have

[sqlalchemy] Re: rev 3449 breaks MapperExtension?

2007-09-07 Thread Michael Bayer
we've got plenty of MapperExtensions running. i dont see how you are getting mapper.extension to be your actual mapper, its supposed to point to a container called ExtensionCarrier (unless, you are saying mapper.extension = _MapExt(). not supported, unless you want to provide a

[sqlalchemy] Re: problem with Numeric type and mysqll

2007-09-07 Thread Michael Bayer
numeric types are going to come out using decimal.Decimal objects in 0.4 but not exactly sure whats happening there...do a repr(m.price). On Sep 7, 2007, at 12:57 PM, remi jolin wrote: Hello, I have the following definition (using Elixir) class Manifestation(Entity):

[sqlalchemy] Re: transform a set to an array

2007-09-07 Thread Michael Bayer
PG arrays ? you can do it like this: from sqlalchemy.databases.postgres import PGArray engine.execute(select([func.my_procedure(literal(['a', 'b', 'c'], type_=PGArray(String)))])) On Sep 7, 2007, at 8:22 AM, Kai_002 wrote: Hello, I want to call a stored procedure which takes an

[sqlalchemy] Changeset 2795

2007-09-07 Thread Jean-Philippe Dutreve
It seems that the bug fixed by changeset 2795 (column_prefix with synonym) is still active in 0.4 branch. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] rev 3449 breaks MapperExtension?

2007-09-07 Thread sdobrev
or has something in MapperExt protocol changed? File dbcook/usage/samanager.py, line 189, in query_BASE_instances return session.query( m.plain ) File sqlalchemy/orm/session.py, line 638, in query q = self._query_cls(mapper_or_class, self, **kwargs) File sqlalchemy/orm/query.py, line 31,

[sqlalchemy] Re: problem with Numeric type and mysqll

2007-09-07 Thread remi jolin
le 07.09.2007 19:47 remi jolin a écrit: le 07.09.2007 19:27 Michael Bayer a écrit: numeric types are going to come out using decimal.Decimal objects in 0.4 but not exactly sure whats happening there...do a repr(m.price). it gives Decimal(10.00) and I'm using SA 0.3.10 Is

[sqlalchemy] Re: problem with Numeric type and mysqll

2007-09-07 Thread jason kirtland
remi jolin wrote: le 07.09.2007 19:47 remi jolin a écrit: le 07.09.2007 19:27 Michael Bayer a écrit: numeric types are going to come out using decimal.Decimal objects in 0.4 but not exactly sure whats happening there...do a repr(m.price). it gives Decimal(10.00) and I'm

[sqlalchemy] Re: rev 3449 breaks MapperExtension?

2007-09-07 Thread sdobrev
On Friday 07 September 2007 20:25:50 Michael Bayer wrote: we've got plenty of MapperExtensions running. i dont see how you are getting mapper.extension to be your actual mapper, its supposed to point to a container called ExtensionCarrier ( unless, you are saying mapper.extension =

[sqlalchemy] Re: rev 3449 breaks MapperExtension?

2007-09-07 Thread Michael Bayer
On Sep 7, 2007, at 3:06 PM, [EMAIL PROTECTED] wrote: On Friday 07 September 2007 20:25:50 Michael Bayer wrote: we've got plenty of MapperExtensions running. i dont see how you are getting mapper.extension to be your actual mapper, its supposed to point to a container called