Here it is: http://www.sqlalchemy.org/trac/ticket/1244
Maybe it is good idea to drop some new lines in faq? Something like
this:
Q: How should I extend sqlalchemy.schema.Column?
A: You surely dont need it. Recommended way to achive your possible
needs is to write instance-factory function which
Can the decl. layer be used to setup a self-referential mapper like
class Foo(Base):
__tablename__ = 'foo'
__table_args__ = {'autoload' : True}
children = relation(Foo, primaryjoin=Foo.parent_id==Foo.id)
parent = relation(Foo, primary_join=Foo.parent_id=Foo.id,
afaik, u can supply strings instead of real things everywhere in those
arguments.. they are eval()ed against some context at later time.
On Thursday 11 December 2008 10:40, Andreas Jung wrote:
Can the decl. layer be used to setup a self-referential mapper like
class Foo(Base):
On 11.12.2008 11:10 Uhr, [EMAIL PROTECTED] wrote:
afaik, u can supply strings instead of real things everywhere in those
arguments.. they are eval()ed against some context at later time.
This works to some degree:
class Hierarchies(Base):
__tablename__ = 'hierarchies'
__table_args__
On Dec 10, 7:33 pm, Michael Bayer [EMAIL PROTECTED] wrote:
this is the documented behavior and the comparator=operator.eq setting
is provided for exactly the purpose of efficiently comparing objects
which do implement an __eq__() that compares internal state, like that
of a dict (and
Hi
I've scoured the documentation and i can't find any info on how to
create a column using metadata.
from sqlalchemy import engine
from sqlalchemy import schema
from sqlalchemy import types
_config_dbengine = engine.create_engine('sqlite:tmp/db')
_config_metadata =
It seems compile()'ing a query results in the default bindparams not
being used, is this a bug?
Simple test case:
from sqlalchemy import *
engine = create_engine('postgres://uname:[EMAIL PROTECTED]/testdb')
query = text('select * from table limit :num', bindparams=[bindparam('num',
On Dec 11, 2008, at 5:50 AM, Andreas Jung wrote:
This works to some degree:
class Hierarchies(Base):
__tablename__ = 'hierarchies'
__table_args__ = (
{ 'autoload' : True, })
parent_id = Column('parent_id', Integer,
ForeignKey('hierarchies.id'))
_children =
On Dec 11, 2008, at 5:50 AM, Jonathan Marshall wrote:
The problem seems to be the assumption that copies of an object
produce identical pickles. Perhaps a better solution may be for
compare_values to use __eq__ by default if it exists otherwise compare
__dict__?
comparing __dict__ is
On Dec 11, 2008, at 9:43 AM, Max Ischenko wrote:
Hello,
I'm migrating my pylons app to SA 0.5 I ran into strange behaviour.
I found that hen creating new object it ends up in Session
automatically. Why is that?
After some debugging I found this:
def init_instance(self, mapper,
you're compiling the text() construct against the DefaultDialect, when
it needs to be compiled against the PG dialect in order for the :num
bind param to be converted to PG's desired format, %(num)s.Also im
not 100% sure if PG allows bind params for LIMIT, probably does though.
On Dec
the name of your Date column is premiera, I dont see a termin
column specified in the example ?
On Dec 11, 2008, at 7:35 AM, grat wrote:
Hi,
i have this table:
class ZmenaDH(Base):
__tablename__=zmenahost
id = Column(Integer,primary_key=True)
duvod=Column(String(120))
I'd try 1 = 0 I dont think oracle has boolean keywords at least
last I checked...
On Dec 11, 2008, at 4:09 AM, jo wrote:
Hi all,
I'm trying sqlalchemy with Oracle. Seems Oracle doesn't understand
the syntax True = False
...
File
You are right, Michael,
1=0 works.
thank you,
j
Michael Bayer ha scritto:
I'd try 1 = 0 I dont think oracle has boolean keywords at least
last I checked...
On Dec 11, 2008, at 4:09 AM, jo wrote:
Hi all,
I'm trying sqlalchemy with Oracle. Seems Oracle doesn't understand
the
On Dec 11, 2008, at 5:50 AM, Jonathan Marshall wrote:
Also I don't agree that the current desired behaviour is documented.
See http://www.sqlalchemy.org/docs/05/types.html#types_standard_pickletype
and
Hi all,
I'm using SA with cx_Oracle. In some queries it raises the following error:
File /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py, line 581,
in _execute_raw
self._execute(context)
File /usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py, line 599,
in _execute
the change is in r5461, objects like dicts and lists will compare
correctly with no changes. Objects that don't implement __eq__() and
are not None will raise a deprecation warning and use the old dumps()
method. Docs are updated on the site as well as 05Migration.
On Dec 11, 2008, at 2:04 PM, Ross Vandegrift wrote:
Hi guys,
I'm somewhat confused about the different lifecycle states of objects
that are backed by the SA ORM.
According to the SA docs (FWIW, I'm on 0.4), an object is in the
Persistent state when it is present in the session and has a
hello,
i need to generate a unique number from a table based on the primary
key. i used to lock
the table (with write) and got what i needed. working with the ORM,
though, it seems that
session.add(object) functions just as well. at the time of the
session.add(), the primary key assigned to the
Ah, makes sense.
Thanks.
On Dec 11, 5:50 pm, Michael Bayer mike...@zzzcomputing.com wrote:
you're compiling the text() construct against the DefaultDialect, when
it needs to be compiled against the PG dialect in order for the :num
bind param to be converted to PG's desired format,
Hi, has the behavior here
http://www.sqlalchemy.org/trac/wiki/FAQ#Whatsthebestwaytofigureoutwhichattributesarecolumnsgivenaclass
changed in 0.5?
I'm trying that and getting
AttributeError: iterate_properties
this is my code, so far:
klass = model.User
def add_user():
obj = klass()
On Dec 11, 2008, at 7:08 PM, Jorge Vargas wrote:
Hi, has the behavior here
http://www.sqlalchemy.org/trac/wiki/FAQ#Whatsthebestwaytofigureoutwhichattributesarecolumnsgivenaclass
changed in 0.5?
I'm trying that and getting
AttributeError: iterate_properties
this is my code, so far:
I have a weird problem: Two identical functions, created using a
lambda from the same issuing identical SQL, return two different
answers. I'm embarrassed to say this, but it looks stochastic. I'm
running 0.4.2p3 with Python 2.5.2 and Ipython 0.8.1.
First, the guided tour. I'm using a lambda
I have a weird problem: Two identical functions, created using a
lambda from the same issuing identical SQL, return two different
answers. I'm embarrassed to say this, but it looks stochastic. I'm
running 0.4.2p3 with Python 2.5.2 and Ipython 0.8.1.
First, the guided tour. I'm using a lambda
I have a weird problem: Two identical functions, created using a
lambda from the same issuing identical SQL, return two different
answers. I'm embarrassed to say this, but it looks stochastic. I'm
running 0.4.2p3 with Python 2.5.2 and Ipython 0.8.1.
First, the guided tour. I'm using a lambda
Doesn't get created in the database.
How do i add columns to tables already defined in the database after i
have reflected them into the metadata
On Dec 12, 12:59 am, Empty mtr...@gmail.com wrote:
Hi,
On Thu, Dec 11, 2008 at 8:12 AM, jarrod.ches...@gmail.com
jarrod.ches...@gmail.com
26 matches
Mail list logo