I want to map a table with a postgresql array as a primary key.
PostgreSQL supports it, and everything works until the session wants
to use the list returned from the query as an instance key. How can
I intercept the row returned to wrap it in a tuple? I can't figure
out translate_row!
from
detial please see
http://my.unix-center.net/~WeiZhicheng/2010/01/13/sqlalchemy-0-6-unicodedecodeerror-bug-patch/
--
my.unix-center.net/~WeiZhicheng
--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To post to this group, send email to
Michael Bayer wrote:
Chris Withers wrote:
Easiest way to trap it is to monkeypatch Session.rollback(), or whatever
rollback you think you might be calling, with a def that calls
pdb.set_trace() or dumps a stack trace using inspect().
Any chance of SA growing the ability to do the latter
On Wed, Jan 13, 2010 at 10:16, 诚子 zhicheng1...@gmail.com wrote:
detial please see
http://my.unix-center.net/~WeiZhicheng/2010/01/13/sqlalchemy-0-6-unicodedecodeerror-bug-patch/
Well, if I understand correctly, you would like a workaround for a bad
truncate algorithm in mysql (which apparently
yeah,maybe you are right,
but I'm not professional in mysql
I just use the SQLAlchemy default
create the table and field
the field is utf8_general_ci
my problem like that
import sqlalchemy
sqlalchemy.__version__
'0.6beta1'
from sqlalchemy import create_engine
engine =
avdd wrote:
I want to map a table with a postgresql array as a primary key.
PostgreSQL supports it, and everything works until the session wants
to use the list returned from the query as an instance key. How can
I intercept the row returned to wrap it in a tuple? I can't figure
out
Chris Withers wrote:
Michael Bayer wrote:
Chris Withers wrote:
Easiest way to trap it is to monkeypatch Session.rollback(), or
whatever
rollback you think you might be calling, with a def that calls
pdb.set_trace() or dumps a stack trace using inspect().
Any chance of SA growing the ability
Hello,
I am relatively new to SQLAlchemy, and I am only really interested in
the SQL Expression Language for now. I am having trouble creating
case statements.
SQLAlchemy version: 0.5.7
Python version: 2.6.2
Here is the error I am getting:
type(mco)
class 'sqlalchemy.schema.Table'
Oops!
type(case)
class 'sqlalchemy.schema.Table'
I was looking at the case statement parameters, and ignoring what
Python was *really* complaining about! I gave the case table a
different name and now I am back on track. By the way, it's been a
real pleasure learning SQLAlchemy given the
If you use utf8 encoding in database you must set your character set in
connection url e.g.:
engine = create_engine('mysql://root:@localhost/dev?charset=utf8')
...
name1 = '中文中文'
name1
'\xe4\xb8\xad\xe6\x96\x87\xe4\xb8\xad\xe6\x96\x87'
print name1
中文中文
ed_user = User(name1)
thanks, You are right!
2010/1/14 Ilia Kharin aksc...@gmail.com
If you use utf8 encoding in database you must set your character set in
connection url e.g.:
engine = create_engine('mysql://root:@localhost/dev?charset=utf8')
...
name1 = '中文中文'
name1
Thanks! Works great.
On Jan 14, 2:27 am, Michael Bayer mike...@zzzcomputing.com wrote:
avdd wrote:
I want to map a table with a postgresql array as a primary key.
PostgreSQL supports it, and everything works until the session wants
to use the list returned from the query as an instance
Hi there,
I am trying to package a small Python lib I have created that has an
install dependency on SQLAlchemy.
I have created my setup.py file with the install_requires
install_requires=[
'SQLAlchemy',
],
But whenever I try install my Python lib on a machine without
SQLAlchemy
13 matches
Mail list logo