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 wrote:
> Hi,
>
> On Thu, Dec 11, 2008 at 8:12 AM, jarrod.ches...@gmail.com <
>
>
>
> jarrod.ches...@gmail.com> wrote:
>
>
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 func
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 func
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 func
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
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()
map
Ah, makes sense.
Thanks.
On Dec 11, 5:50 pm, Michael Bayer 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, %(num)s. Also im
> not
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 o
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 an
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 record in
the database.
So if I do something like this:
p
On Dec 11, 2008, at 12:57 PM, Max Ischenko wrote:
>
> Are you using Session.mapper ? That's the same behavior the
> extension had in 0.4, save-on-init. I don't favor the usage of
> Session.mapper.
>
> I do use Session.mapper. I recall I switched to it since I was
> getting "Parent instance
>
>
> Are you using Session.mapper ? That's the same behavior the
> extension had in 0.4, save-on-init. I don't favor the usage of
> Session.mapper.
>
I do use Session.mapper. I recall I switched to it since I was getting
"Parent instance ... is not bound" error with sa.orm.mapper.
I hastily
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.
--~--~-~--
Look into using the Unicode type for python unicode values.
http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html?highlight=unicode#sqlalchemy.Unicode
On Dec 11, 2008, at 12:01 PM, jo wrote:
>
> Hi all,
>
> I'm using SA with cx_Oracle. In some queries it raises the following
> e
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 _execu
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
> http://www.sqlalchemy.org/docs/05/sqlalchemy_types.html#docstrings_sqlalchemy.types_P
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 under
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 "/usr/lib/python2.4/site-packages/s
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(Strin
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 1
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, m
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 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'))
>
> _
On Dec 11, 2008, at 3:37 AM, Angri wrote:
>
> 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 p
Hi,
i have this table:
class ZmenaDH(Base):
__tablename__="zmenahost"
id = Column(Integer,primary_key=True)
duvod=Column(String(120))
premiera=Column(Date)
id_solo = Column(Integer, ForeignKey('sola.id'))
solo = relation("Solo", backref=backref('zmenahost', order_by=id,
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',
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, class_, oldinit, instance, args,
kwargs):
if self.sav
Hi,
On Thu, Dec 11, 2008 at 8:12 AM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> 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
>
> _co
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 = schema.MetaData(_config_d
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 (a
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
I'm Sorry, unwittingly, I changed the original subject.
--~--~-~--~~~---~--~~
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 gr
Hi all,
I'm trying sqlalchemy with Oracle. Seems Oracle doesn't understand the syntax
True = False
...
File "/usr/lib/python2.4/site-packages/sqlalchemy/engine/base.py", line 599,
in _execute
raise exceptions.SQLError(context.statement, context.parameters, e)
SQLError: (DatabaseErr
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):
>
> __
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,
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
36 matches
Mail list logo