After upgrading from 0.4.5 to 0.4.6 Session.execute(query,
shard_id=shard_id),
where Session is ShardedSession, throws exception:
File '/var/lib/python-support/python2.5/sqlalchemy/orm/scoping.py',
line 98 in do
return getattr(self.registry(), name)(*args, **kwargs)
TypeError: execute() got an
for query() and rollback() execution are comparable.
Query is SELECT person_id, type, sum(count) FROM CommentCounter WHERE
person = %d AND type = '%s' and answered in (0, 1) group by person_id
On May 4, 7:52 pm, Michael Bayer [EMAIL PROTECTED] wrote:
On May 4, 2008, at 9:41 AM, Andrew Stromnov wrote
Recently I'd switched to SA MySQL connection pool implementation.
Every time, when app returns connection to pool (through .close()
method), SA triggers .rollback() on this connection (http://
www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/lib/sqlalchemy/pool.py#L291).
In my case ROLLBACK is
Is it possible to use SA with SQLRelay?
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to
I think it shoud be done throught mapping against arbitrary select
(
http://www.sqlalchemy.org/docs/04/documentation.html#advdatamapping_mapper_selects
).
Thanks.
On 7 дек, 13:23, Andrew Stromnov [EMAIL PROTECTED] wrote:
How to implement this stat behaviour (RPG-like stats):
players_table
persons_table = Table(u'persons', dbconfig.metadata,
Column(u'person_id', Integer(20), primary_key=True,
autoincrement=True, nullable=False, default=0),
Column(u'level', Integer(11), nullable=False, default=1),
autoload = False)
class Person(object):
pass
mapper(Person,
How to implement this stat behaviour (RPG-like stats):
players_table = Table('player',
Column('id', Integer, primary_key=True),
Column('name', String),
Column('level', Integer),
)
# SELECT 'level', count('level') as 'count' FROM player ORDER BY
'level' GROUP BY 'level'
#
class
I have this SQL expression (from
http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html)
SELECT b.*
FROM tagmap bt, bookmark b, tag t
WHERE bt.tag_id = t.tag_id
AND (t.name IN ('bookmark', 'webservice', 'semweb'))
AND b.id = bt.bookmark_id
GROUP BY b.id
HAVING COUNT( b.id )=3
How
At
http://www.sqlalchemy.org/docs/04/sqlalchemy_orm.html#docstrings_sqlalchemy.orm_MapperExtension
:
def create_instance(self, mapper, selectcontext, row, class_)
Receive a row when a new object instance is about to be created from
that row.
The method can choose to create the instance
Done.
http://www.sqlalchemy.org/trac/ticket/859
On Nov 8, 8:55 pm, Michael Bayer [EMAIL PROTECTED] wrote:
its a typo. if you could place a ticket in trac (with milestone
0.4xx) that would be helpful.
On Nov 8, 2007, at 12:31 PM, Andrew Stromnov wrote:
Athttp://www.sqlalchemy.org/docs
Hi,
I have two questions:
1) what exact versions of MySQL (i.e. 4.1.22) and py-mysqldb?
2) how many databases and/or tables (an encodings) used in your
application?
On Aug 15, 9:57 pm, Arun Kumar PG [EMAIL PROTECTED] wrote:
Any other clue that may be helpful in troubleshooting the cause
Configuration: CentOS 5 (64bit), SA (trunk), Python 2.4.4, py-
MySQLdb-1.2.1, MySQL 5.1-current
Traceback (most recent call last):
File ./indexer.py, line 79, in ?
table[database][conf] = Table(conf, metadata, autoload=True)
File /usr/lib/python2.4/site-packages/sqlalchemy/schema.py,
Dirty fix (works for me):
Index: mysql.py
===
--- mysql.py(revision 2873)
+++ mysql.py(working copy)
@@ -1090,7 +1090,7 @@
table.name = table.name.lower()
table.metadata.tables[table.name]= table
look at http://code.google.com/p/spiff/ - SpiffGuard
On Apr 10, 11:36 am, Kaali [EMAIL PROTECTED] wrote:
Hi,
I'm designing a permission system to our messaging platform. The
platform has different channels which contains messages. Every
different user can have different permissions on a
ascii-encoded string:
url = 'mysql://login:[EMAIL PROTECTED]/adverts?charset=cp1251'
engine = sqlalchemy.create_engine(url, convert_unicode=True, pool_recycle=4)
metadata = sqlalchemy.BoundMetaData(engine)
ad_table = sqlalchemy.Table('adverts', metadata, autoload=True)
unicode string:
babelfish.altavista.com (JP to EN):
_SQLAlchemy - The Database Toolkit for Python
The library which synthesizes SQL from usual system. As for such
technology you think that well enough it is convenient.
--~--~-~--~~~---~--~~
You received this message because
On 2/2/07, Michael Bayer [EMAIL PROTECTED] wrote:
are you saying that executing a particular statement is changing some
state on the local connection ?
Not exactly what I had in mind. Execution of first appeared statement
assigns (underlying ?) charset for all following queries for all
on
the Unicode type.
also note theres a bug in MySQLDB related to this:
http://sourceforge.net/tracker/index.php?func=detailaid=1592353grou...http://www.sqlalchemy.org/trac/ticket/340
On Feb 1, 7:28 am, Andrew Stromnov [EMAIL PROTECTED] wrote:
Python 2.4.4 (win32) + SQLAlchemy (r2285
18 matches
Mail list logo