[sqlalchemy] support for timedeltas as operators on datetime columns

2010-12-20 Thread ellonweb
If I have an integer column I can easily select the column minus one:
session.query(mytable.column - 1)

If I want to select a datetime column minus one minute, there doesn't
seem to be an easy way to do it.
I would have expected to be to do something like:
session.query(mytable.column - datetime.timedelta(minutes=1))

The only way I've been able to do what I want is like this:
session.query(mytable.column - cast('60', Interval))
Is this the best way to do this or have I missed something?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] Re: support for timedeltas as operators on datetime columns

2010-12-20 Thread ellonweb
FYI, I'm using 0.6.5 and postgre8.4/psycopg2.
Passing in timedeltas didn't work, though I notice the opposite works:
I can pass in a datetime to compare to a db-datetime and SQLA gives me
a timedelta back, but I can't compare a timedelta with a db-datetime
to get a datetime back:

With a declarative table Updates, containing a column timestamp,
roughly like this:
class Updates(Base):
__tablename__ = 'updates'
timestamp = Column(DateTime, default=current_timestamp())


 td=timedelta(minutes=1)
 td
datetime.timedelta(0, 60)
 Updates.timestamp - td
sqlalchemy.sql.expression._BinaryExpression object at 0x033D5150
 print Updates.timestamp - td
updates.timestamp - %(timestamp_1)s
 session.query(Updates.timestamp - td).first()

sqlalchemy.exc.DataError: (DataError) invalid input syntax for type
timestamp: 0 days 60.00 seconds
LINE 1: SELECT updates.timestamp - '0 days 60.00 seconds' AS
ano...

On Dec 20, 3:02 pm, Michael Bayer mike...@zzzcomputing.com wrote:
 On Dec 20, 2010, at 8:22 AM, ellonweb wrote:

  If I have an integer column I can easily select the column minus one:
  session.query(mytable.column - 1)

  If I want to select a datetime column minus one minute, there doesn't
  seem to be an easy way to do it.
  I would have expected to be to do something like:
  session.query(mytable.column - datetime.timedelta(minutes=1))

  The only way I've been able to do what I want is like this:
  session.query(mytable.column - cast('60', Interval))
  Is this the best way to do this or have I missed something?

 This depends on the DBAPI and database backend in use.  For example, if you 
 use psycopg2 with postgresql, you can pretty much pass in timedeltas and 
 datetimes and date arithmetic is fully possible (SQLAlchemy 0.6 needed).   
 With other backends such as SQLIte and SQL Server, you typically need to use 
 the built-in functions of those backends to coerce timedeltas into integer 
 values and/or use the comparison functions provided by that backend.

 Some modicum of platform-neutrality can be achieved if you use the @compiles 
 extension to build higher level date functions that do what you need, such as 
 the date comparison function below I use for PG/MSSQL:

 from sqlalchemy import expression, Integer
 from sqlalchemy.ext.compiler import compiles

 class datediff(expression.FunctionElement):
     type = Integer()
     name = 'datediff'

 @compiles(datediff, 'postgresql')
 def _pg_datediff(element, compiler, **kw):
     return (%s::date - %s::date) % (
         compiler.process(element.clauses.clauses[1]),
         compiler.process(element.clauses.clauses[0]),
     )

 @compiles(datediff, 'mssql')
 def _ms_datediff(element, compiler, **kw):
     return DATEDIFF(day, %s, %s)  % (
             compiler.process(element.clauses.clauses[0], **kw),
             compiler.process(element.clauses.clauses[1], **kw),
         )



  Thanks

  --
  You received this message because you are subscribed to the Google Groups 
  sqlalchemy group.
  To post to this group, send email to sqlalch...@googlegroups.com.
  To unsubscribe from this group, send email to 
  sqlalchemy+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] Re: support for timedeltas as operators on datetime columns

2010-12-20 Thread ellonweb
 print session.query(Updates.timestamp - td).first()
2010-12-20 17:44:45,757 INFO sqlalchemy.engine.base.Engine.0x...dad0
BEGIN (implicit)
2010-12-20 17:44:45,766 INFO sqlalchemy.engine.base.Engine.0x...dad0
SELECT updates.timestamp - %(timestamp_1)s AS anon_1
FROM updates
 LIMIT 1 OFFSET 0
2010-12-20 17:44:45,779 INFO sqlalchemy.engine.base.Engine.0x...dad0
{'timestamp_1': datetime.timedelta(0, 60)}
Traceback (most recent call last):
...

I'm using psycopg2 2.0.14, I'm starting to think that's the cause?
Slightly off-topic but do you know if the binary distributions of
psycopg2 built against pg9 will work fine on 8.4? (This is the reason
I'm using such an old version)

Here's the full traceback if it's useful: 
http://paste.pound-python.org/show/740/

On Dec 20, 5:24 pm, Michael Bayer mike...@zzzcomputing.com wrote:
 On Dec 20, 2010, at 11:58 AM, ellonweb wrote:

  FYI, I'm using 0.6.5 and postgre8.4/psycopg2.
  Passing in timedeltas didn't work, though I notice the opposite works:
  I can pass in a datetime to compare to a db-datetime and SQLA gives me
  a timedelta back, but I can't compare a timedelta with a db-datetime
  to get a datetime back:

  With a declarative table Updates, containing a column timestamp,
  roughly like this:
  class Updates(Base):
     __tablename__ = 'updates'
     timestamp = Column(DateTime, default=current_timestamp())

 can't reproduce, psycopg2 2.2.2:

 from sqlalchemy import *
 from sqlalchemy.orm import *
 from sqlalchemy.ext.declarative import declarative_base
 from datetime import *

 Base = declarative_base()

 engine = create_engine('postgresql://scott:ti...@localhost/test', echo=True)

 class Updates(Base):
    __tablename__ = 'updates'
    id = Column(Integer, primary_key=True)
    timestamp = Column(DateTime, default=func.current_timestamp())

 Base.metadata.create_all(engine)

 session = Session(engine)
 session.add_all([Updates(), Updates(), Updates()])
 session.commit()

 td=timedelta(minutes=1)
 print Updates.timestamp - td

 print session.query(Updates.timestamp - td).first()

 output:

 2010-12-20 12:22:04,686 INFO sqlalchemy.engine.base.Engine.0x...7510 select 
 version()
 2010-12-20 12:22:04,686 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
 2010-12-20 12:22:04,688 INFO sqlalchemy.engine.base.Engine.0x...7510 select 
 current_schema()
 2010-12-20 12:22:04,688 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
 2010-12-20 12:22:04,690 INFO sqlalchemy.engine.base.Engine.0x...7510 select 
 relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where 
 n.nspname=current_schema() and lower(relname)=%(name)s
 2010-12-20 12:22:04,690 INFO sqlalchemy.engine.base.Engine.0x...7510 {'name': 
 u'updates'}
 2010-12-20 12:22:04,731 INFO sqlalchemy.engine.base.Engine.0x...7510 BEGIN 
 (implicit)
 2010-12-20 12:22:04,731 INFO sqlalchemy.engine.base.Engine.0x...7510 INSERT 
 INTO updates (timestamp) VALUES (CURRENT_TIMESTAMP) RETURNING updates.id
 2010-12-20 12:22:04,732 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
 2010-12-20 12:22:04,759 INFO sqlalchemy.engine.base.Engine.0x...7510 INSERT 
 INTO updates (timestamp) VALUES (CURRENT_TIMESTAMP) RETURNING updates.id
 2010-12-20 12:22:04,759 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
 2010-12-20 12:22:04,760 INFO sqlalchemy.engine.base.Engine.0x...7510 INSERT 
 INTO updates (timestamp) VALUES (CURRENT_TIMESTAMP) RETURNING updates.id
 2010-12-20 12:22:04,760 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
 2010-12-20 12:22:04,761 INFO sqlalchemy.engine.base.Engine.0x...7510 COMMIT
 updates.timestamp - :timestamp_1
 2010-12-20 12:22:04,763 INFO sqlalchemy.engine.base.Engine.0x...7510 BEGIN 
 (implicit)
 2010-12-20 12:22:04,764 INFO sqlalchemy.engine.base.Engine.0x...7510 SELECT 
 updates.timestamp - %(timestamp_1)s AS anon_1
 FROM updates
  LIMIT 1 OFFSET 0
 2010-12-20 12:22:04,764 INFO sqlalchemy.engine.base.Engine.0x...7510 
 {'timestamp_1': datetime.timedelta(0, 60)}
 (datetime.datetime(2010, 12, 20, 12, 21, 4, 732161),)



  td=timedelta(minutes=1)
  td
  datetime.timedelta(0, 60)
  Updates.timestamp - td
  sqlalchemy.sql.expression._BinaryExpression object at 0x033D5150
  print Updates.timestamp - td
  updates.timestamp - %(timestamp_1)s
  session.query(Updates.timestamp - td).first()

  sqlalchemy.exc.DataError: (DataError) invalid input syntax for type
  timestamp: 0 days 60.00 seconds
  LINE 1: SELECT updates.timestamp - '0 days 60.00 seconds' AS
  ano...

  On Dec 20, 3:02 pm, Michael Bayer mike...@zzzcomputing.com wrote:
  On Dec 20, 2010, at 8:22 AM, ellonweb wrote:

  If I have an integer column I can easily select the column minus one:
  session.query(mytable.column - 1)

  If I want to select a datetime column minus one minute, there doesn't
  seem to be an easy way to do it.
  I would have expected to be to do something like:
  session.query(mytable.column - datetime.timedelta(minutes=1))

  The only way I've been able to do what I want is like this:
  session.query(mytable.column

[sqlalchemy] Re: support for timedeltas as operators on datetime columns

2010-12-20 Thread ellonweb
I've updated to psycopg2 2.2.1, working now. Sorry for wasting your
time!

On Dec 20, 6:01 pm, ellonweb ellon...@gmail.com wrote:
  print session.query(Updates.timestamp - td).first()

 2010-12-20 17:44:45,757 INFO sqlalchemy.engine.base.Engine.0x...dad0
 BEGIN (implicit)
 2010-12-20 17:44:45,766 INFO sqlalchemy.engine.base.Engine.0x...dad0
 SELECT updates.timestamp - %(timestamp_1)s AS anon_1
 FROM updates
  LIMIT 1 OFFSET 0
 2010-12-20 17:44:45,779 INFO sqlalchemy.engine.base.Engine.0x...dad0
 {'timestamp_1': datetime.timedelta(0, 60)}
 Traceback (most recent call last):
 ...

 I'm using psycopg2 2.0.14, I'm starting to think that's the cause?
 Slightly off-topic but do you know if the binary distributions of
 psycopg2 built against pg9 will work fine on 8.4? (This is the reason
 I'm using such an old version)

 Here's the full traceback if it's 
 useful:http://paste.pound-python.org/show/740/

 On Dec 20, 5:24 pm, Michael Bayer mike...@zzzcomputing.com wrote:

  On Dec 20, 2010, at 11:58 AM, ellonweb wrote:

   FYI, I'm using 0.6.5 and postgre8.4/psycopg2.
   Passing in timedeltas didn't work, though I notice the opposite works:
   I can pass in a datetime to compare to a db-datetime and SQLA gives me
   a timedelta back, but I can't compare a timedelta with a db-datetime
   to get a datetime back:

   With a declarative table Updates, containing a column timestamp,
   roughly like this:
   class Updates(Base):
      __tablename__ = 'updates'
      timestamp = Column(DateTime, default=current_timestamp())

  can't reproduce, psycopg2 2.2.2:

  from sqlalchemy import *
  from sqlalchemy.orm import *
  from sqlalchemy.ext.declarative import declarative_base
  from datetime import *

  Base = declarative_base()

  engine = create_engine('postgresql://scott:ti...@localhost/test', echo=True)

  class Updates(Base):
     __tablename__ = 'updates'
     id = Column(Integer, primary_key=True)
     timestamp = Column(DateTime, default=func.current_timestamp())

  Base.metadata.create_all(engine)

  session = Session(engine)
  session.add_all([Updates(), Updates(), Updates()])
  session.commit()

  td=timedelta(minutes=1)
  print Updates.timestamp - td

  print session.query(Updates.timestamp - td).first()

  output:

  2010-12-20 12:22:04,686 INFO sqlalchemy.engine.base.Engine.0x...7510 select 
  version()
  2010-12-20 12:22:04,686 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
  2010-12-20 12:22:04,688 INFO sqlalchemy.engine.base.Engine.0x...7510 select 
  current_schema()
  2010-12-20 12:22:04,688 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
  2010-12-20 12:22:04,690 INFO sqlalchemy.engine.base.Engine.0x...7510 select 
  relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where 
  n.nspname=current_schema() and lower(relname)=%(name)s
  2010-12-20 12:22:04,690 INFO sqlalchemy.engine.base.Engine.0x...7510 
  {'name': u'updates'}
  2010-12-20 12:22:04,731 INFO sqlalchemy.engine.base.Engine.0x...7510 BEGIN 
  (implicit)
  2010-12-20 12:22:04,731 INFO sqlalchemy.engine.base.Engine.0x...7510 INSERT 
  INTO updates (timestamp) VALUES (CURRENT_TIMESTAMP) RETURNING updates.id
  2010-12-20 12:22:04,732 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
  2010-12-20 12:22:04,759 INFO sqlalchemy.engine.base.Engine.0x...7510 INSERT 
  INTO updates (timestamp) VALUES (CURRENT_TIMESTAMP) RETURNING updates.id
  2010-12-20 12:22:04,759 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
  2010-12-20 12:22:04,760 INFO sqlalchemy.engine.base.Engine.0x...7510 INSERT 
  INTO updates (timestamp) VALUES (CURRENT_TIMESTAMP) RETURNING updates.id
  2010-12-20 12:22:04,760 INFO sqlalchemy.engine.base.Engine.0x...7510 {}
  2010-12-20 12:22:04,761 INFO sqlalchemy.engine.base.Engine.0x...7510 COMMIT
  updates.timestamp - :timestamp_1
  2010-12-20 12:22:04,763 INFO sqlalchemy.engine.base.Engine.0x...7510 BEGIN 
  (implicit)
  2010-12-20 12:22:04,764 INFO sqlalchemy.engine.base.Engine.0x...7510 SELECT 
  updates.timestamp - %(timestamp_1)s AS anon_1
  FROM updates
   LIMIT 1 OFFSET 0
  2010-12-20 12:22:04,764 INFO sqlalchemy.engine.base.Engine.0x...7510 
  {'timestamp_1': datetime.timedelta(0, 60)}
  (datetime.datetime(2010, 12, 20, 12, 21, 4, 732161),)

   td=timedelta(minutes=1)
   td
   datetime.timedelta(0, 60)
   Updates.timestamp - td
   sqlalchemy.sql.expression._BinaryExpression object at 0x033D5150
   print Updates.timestamp - td
   updates.timestamp - %(timestamp_1)s
   session.query(Updates.timestamp - td).first()

   sqlalchemy.exc.DataError: (DataError) invalid input syntax for type
   timestamp: 0 days 60.00 seconds
   LINE 1: SELECT updates.timestamp - '0 days 60.00 seconds' AS
   ano...

   On Dec 20, 3:02 pm, Michael Bayer mike...@zzzcomputing.com wrote:
   On Dec 20, 2010, at 8:22 AM, ellonweb wrote:

   If I have an integer column I can easily select the column minus one:
   session.query(mytable.column - 1)

   If I want to select a datetime column minus one minute, there doesn't
   seem

[sqlalchemy] InvalidRequestError: Unknown PG numeric type: 23

2010-10-25 Thread ellonweb
I've added a few extra columns to one of my tables (nothing fancy,
just plain Integers and Floats) and created them manually in the db.
Now every time I try to query an object from this table I get the
error in the subject. Using declarative in SA 0.6.3 on PG8.4.
Traceback below, any help is much appreciated!

  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\orm\query.py, line 1405, in __getitem__
return list(res)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\orm\query.py, line 1565, in __iter__
return self._execute_and_instances(context)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\orm\query.py, line 1570, in
_execute_and_instances
mapper=self._mapper_zero_or_none())
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\orm\session.py, line 735, in execute
clause, params or {})
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 1157, in execute
params)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 1237, in
_execute_clauseelement
return self.__execute_context(context)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 1278, in __execute_context
r = context.get_result_proxy()._autoclose()
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\dialects\postgresql\psycopg2.py, line 156, in
get_result_proxy
return base.ResultProxy(self)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 2169, in __init__
self._init_metadata()
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 2176, in _init_metadata
self._metadata = ResultMetaData(self, metadata)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\engine\base.py, line 2047, in __init__
result_processor(dialect, coltype)
  File C:\Program Files\Python\lib\site-packages\sqlalchemy-0.6.3-
py2.6.egg\sqlalchemy\dialects\postgresql\psycopg2.py, line 99, in
result_processor
raise exc.InvalidRequestError(Unknown PG numeric type: %d %
coltype)
InvalidRequestError: Unknown PG numeric type: 23

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] window functions

2010-07-29 Thread ellonweb
Hi, just wondering if there's support for window functions, or if
there's any plans to add this yet?
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] double clause in outer join

2010-03-18 Thread ellonweb
Hi,
I have a query object to which I'm performing the following join and
filter:
Q = Q.outerjoin(Table.history_loader)
Q = Q.filter(TableHistory.tick == 123)
Table.history_loader is a dynamic loader that maps the two tables
based on their id property.

This produces the following SQL:
LEFT OUTER JOIN table_history ON table.id = table_history.id WHERE
table_history.tick = 123

What I actually want is something like this:
LEFT OUTER JOIN table_history ON table.id = table_history.id AND
table_history.tick = 123

What should I do to get this query generated? I've tried the
following:
Q = Q.outerjoin((Table.history_loader, TableHistory.tick ==
123))
Q = Q.outerjoin((Table.history_loader, and_(TableHistory,
TableHistory.tick == 123)))
Q = Q.outerjoin((Table.history_loader, and_(TableHistory.id ==
Table.id, TableHistory.tick == 123)))
All 3 of these generate the following error:
AttributeError: 'BooleanClauseList' object has no attribute
'is_derived_from'

What should I be doing?
Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] Re: double clause in outer join

2010-03-18 Thread ellonweb
Silly mistake, this works fine now, thanks!

On Mar 19, 12:53 am, Michael Bayer mike...@zzzcomputing.com wrote:
 On Mar 18, 2010, at 8:28 PM, ellonweb wrote:



  Hi,
  I have a query object to which I'm performing the following join and
  filter:
         Q = Q.outerjoin(Table.history_loader)
         Q = Q.filter(TableHistory.tick == 123)
  Table.history_loader is a dynamic loader that maps the two tables
  based on their id property.

  This produces the following SQL:
  LEFT OUTER JOIN table_history ON table.id = table_history.id WHERE
  table_history.tick = 123

  What I actually want is something like this:
  LEFT OUTER JOIN table_history ON table.id = table_history.id AND
  table_history.tick = 123

  What should I do to get this query generated? I've tried the
  following:
         Q = Q.outerjoin((Table.history_loader, TableHistory.tick ==
  123))
         Q = Q.outerjoin((Table.history_loader, and_(TableHistory,
  TableHistory.tick == 123)))

 the tuple form accepts the target, then the onclause.  Table.history_loader 
 is an onclause in itself  you want query(Table).join((TableHistory, 
 and_(TableHistory.tick==123, TableHistory.id==Table.id)).

         Q = Q.outerjoin((Table.history_loader, and_(TableHistory.id ==
  Table.id, TableHistory.tick == 123)))
  All 3 of these generate the following error:
         AttributeError: 'BooleanClauseList' object has no attribute
  'is_derived_from'

  What should I be doing?
  Thanks in advance

  --
  You received this message because you are subscribed to the Google Groups 
  sqlalchemy group.
  To post to this group, send email to sqlalch...@googlegroups.com.
  To unsubscribe from this group, send email to 
  sqlalchemy+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.



[sqlalchemy] association proxy with a 1:1:1 relationship

2010-01-14 Thread ellonweb
Hi
I'm using a few association proxies in a 1:1 relationship, it works
nicely, I have a proxy on table1 pointing to an attribute on table2,
and another on table1 that points to a relation between table2 and
table3. So what I really have is also a 1:1:1 relationship. Is there a
way to make a proxy on table1 to point to an attribute on table3? I
tried making a proxy of a proxy but that didn't work, not sure what
else to try!
Thanks
-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.




[sqlalchemy] Re: association proxy with a 1:1:1 relationship

2010-01-14 Thread ellonweb
I actually just realised that it's not a 1:1:1 relationship, 1:1 and
many:1 in the case of table1:table2 and table2:table3 respectively,
but I don't think it really matters here, given I've already got
proxies that work!

On Jan 15, 2:29 am, ellonweb ellon...@gmail.com wrote:
 Hi
 I'm using a few association proxies in a 1:1 relationship, it works
 nicely, I have a proxy on table1 pointing to an attribute on table2,
 and another on table1 that points to a relation between table2 and
 table3. So what I really have is also a 1:1:1 relationship. Is there a
 way to make a proxy on table1 to point to an attribute on table3? I
 tried making a proxy of a proxy but that didn't work, not sure what
 else to try!
 Thanks
-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.




[sqlalchemy] Re: 0.5.7

2009-12-24 Thread ellonweb
On Dec 23, 9:02 pm, Michael Bayer mike...@zzzcomputing.com wrote:
 ellonweb wrote:
  Hi,

  I was just wondering if there's any eta on 0.5.7 yet? The website does
  say a typical release pace of one point release per month and it's
  been over 3 months since .5.6! My code relies on a couple of the
  bugfixes in it and it's always easier for users to install releases
  than getting the trunk... and it'd make a nice Christmas gift for us
  all! (-:

 I know.   The buildbot has been down for many weeks now, so I'd have to
 fire up a py2.4 etc. and ensure 0.5.7 runs on all of that.

 Are you on trunk now and its running fine for you ?

Running 0.5.6 with just a few of the changesets of 0.5.7 applied

--

You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.




[sqlalchemy] 0.5.7

2009-12-23 Thread ellonweb
Hi,

I was just wondering if there's any eta on 0.5.7 yet? The website does
say a typical release pace of one point release per month and it's
been over 3 months since .5.6! My code relies on a couple of the
bugfixes in it and it's always easier for users to install releases
than getting the trunk... and it'd make a nice Christmas gift for us
all! (-:

Thanks

--

You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.