Hi
I am using sqlalchemy with postgresql and psycopg2. I want to write
unicode compatible web application.
I noticed that when I pass string data to sqlalchemy string column, its get
converted to unicode after commit.
So does setting convert_unicode option True has any meaning in this
The _get_from_identity method of sqlalchemy.orm.query.Query starts
like this:
@classmethod
def _get_from_identity(cls, session, key, passive):
instance = session.identity_map.get(key)
if instance:
# ...
This is problematic for me since my model class is a
convert_unicode these days is by default conditional - if the DBAPI accepts
Python unicode objects directly, and/or can be coerced to return unicode
objects directly, SQLAlchemy doesn't do any encoding. This is the case with
psycopg2 which both accepts Python unicode objects as bound
On Oct 28, 2011, at 9:26 AM, Daniel Nouri wrote:
The _get_from_identity method of sqlalchemy.orm.query.Query starts
like this:
@classmethod
def _get_from_identity(cls, session, key, passive):
instance = session.identity_map.get(key)
if instance:
# ...
UGH
Hello guys.
As a proof of concept, I implemented a hacky python to pl/python
converter using python3 function annotations.
You can see it there if it's of interest to any of you:
https://github.com/rdunklau/pytoplpython
This led me to some questions.
SQLAlchemy automatically manages tables and
I need print this sql code if these ENUM types and tables and indexes
exist.
On 28 окт, 18:28, lestat lestatc...@googlemail.com wrote:
How I can get raw sql for this table?
class Test(db.Model):
__tablename__ = 'test'
id = db.Column(db.Integer, primary_key=True)
birthday =
If I do this:
from sqlalchemy import *
from StringIO import StringIO
buf = StringIO()
pg_engine = create_engine('sqlite://', strategy='mock',
executor=lambda s,p=';': buf.write(s.__str__() + p))
buf.truncate(0)
tables = [x[1] for x in sorted(db.metadata.tables.items(), key=lambda
x: x[0])]
for
Hello,
I started playing with Concrete Table Inheritance this morning and tried to
implement a portion of my schema:
class Mixin(object):
__table_args__ = {'schema':'test'}
id = Column(Integer, primary_key=True)
class Node(ConcreteBase, Base, Mixin):
__tablename__ = 'node'
hi,
any ideas on what could be the cause of the following backtrace here?
https://gist.github.com/1322636#comments. this is probably something
i'll need to fix in rpclib code, but I don't see what causes this.
sqlalchemy version is latest trunk from today. the backtrace is one line
off because
I have a few Pylons applications that share a SQL access log routine.
Yesterday I migrated it from MySQL to PostgreSQL, and I'm getting a
bunch of errors like this:
connection = self.contextual_connect(close_with_result=True)
Module sqlalchemy.engine.base:1229 in contextual_connect
return
On Fri, Oct 28, 2011 at 9:53 AM, Mike Orr sluggos...@gmail.com wrote:
I have a few Pylons applications that share a SQL access log routine.
Yesterday I migrated it from MySQL to PostgreSQL, and I'm getting a
bunch of errors like this:
connection =
I can make a ticket for this since the Enum type is using the deprecated event
system and PG's event here doesn't have access to the checkfirst flag.
Ticket #2311. For now you'd have to not use the native enum type with PG,
or patch out that checkfirst=True inside of postgresql/base.py,
this is why I hate adding new features, b.c. now i have to support them, though
concrete with declarative really needed a push.The abstract concrete bases
have probably not yet been tested with multiple-level inheritance. Hard to say
where things are going wrong without running a test and
On Oct 28, 2011, at 12:53 PM, Mike Orr wrote:
I have a few Pylons applications that share a SQL access log routine.
Yesterday I migrated it from MySQL to PostgreSQL, and I'm getting a
bunch of errors like this:
connection = self.contextual_connect(close_with_result=True)
Module
Looks like something related to deserializing without mappers set up, or
deserializing into an environment where the class structure and/or mappers are
not configured the same way. This is usually not the way that manifests
itself, though. The key would be the change that started causing the
Hello Michael,
Sorry to be the thorn in your side..
I attached a test case as requested.. Ticket 2312.
Also, it seems this is incompatible with history_meta based versioning.
(Which probably has to do with the use of the
__declare_last__()
function.
Thank you
--
You received this message
On 28.10.2011 21:07, Michael Bayer wrote:
Looks like something related to deserializing without mappers set up, or
deserializing into an environment where the class structure and/or mappers are
not configured the same way. This is usually not the way that manifests
itself, though. The key
On Oct 28, 2011, at 3:16 PM, Burak Arslan wrote:
the link I provided has both the client and server implementations to
reproduce the issue, maybe you didn't scroll up?
Did not scroll up, no.So looking at the sample code here, it's entirely a
mystery to me how this is even supposed to
Could someone point me to a doc page that explains how to enforce a
range limit on a Numeric type. I have some monetary values that I want
to force to always be = Decimal('0.00').
Thanks,
Michael
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To
On Oct 28, 2011, at 2:28 PM, JPLaverdure wrote:
Hello Michael,
Sorry to be the thorn in your side..
I attached a test case as requested.. Ticket 2312.
thanks for the ticket and this is fixed in radadaccc1bb5 .
Also, it seems this is incompatible with history_meta based versioning.
use a TypeDecorator like
http://www.sqlalchemy.org/docs/core/types.html#rounding-numerics and change the
rounding part to raise an error.
On Oct 28, 2011, at 6:27 PM, Michael Hipp wrote:
Could someone point me to a doc page that explains how to enforce a
range limit on a Numeric type. I
On 29.10.2011 00:10, Michael Bayer wrote:
On Oct 28, 2011, at 3:16 PM, Burak Arslan wrote:
the link I provided has both the client and server implementations to
reproduce the issue, maybe you didn't scroll up?
Did not scroll up, no.So looking at the sample code here, it's
entirely a
On Oct 28, 2011, at 7:09 PM, Burak Arslan wrote:
Here's how to reproduce:
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
Base= declarative_base()
class A(Base):
__tablename__ = a
id = Column(Integer, primary_key=True)
class B(A):
23 matches
Mail list logo