Hi Michael,
I'm guilty of two over-simplifications in the code used in my example...
Firstly, the substring property/column (with which I had a problem) applies
to a subclass (using joined table inheritance) and the variable to which
it applies is specified in its parent class. Hence, I started
I'm trying to use the object association pattern from the doco. Is it
the case that this requires departure from Declarative mode and is it
wrong to mix with non-declarative? I looked at the example code
optimized_al.py but it didn't seem to be exactly what I want. I want a
symmetric relation for
On Aug 3, 2010, at 7:47 AM, Robert Sudwarts wrote:
Hi Michael,
I'm guilty of two over-simplifications in the code used in my example...
Firstly, the substring property/column (with which I had a problem) applies
to a subclass (using joined table inheritance) and the variable to which it
On Aug 3, 2010, at 3:37 AM, Enrico wrote:
I'm trying to use the object association pattern from the doco. Is it
the case that this requires departure from Declarative mode and is it
wrong to mix with non-declarative?
it is perfectly fine to mix non-declarative with declarative. However, it
Please see my comments below.
Regards,
Rob
On 3 August 2010 14:05, Michael Bayer mike...@zzzcomputing.com wrote:
On Aug 3, 2010, at 7:47 AM, Robert Sudwarts wrote:
Hi Michael,
I'm guilty of two over-simplifications in the code used in my example...
Firstly, the substring
Is there a way to force the ORM to insert a new row instead of updating?
Something like the must_insert argument to model's save method in Django's ORM.
The use case is I must create a unique session key (for a cookie) and want an
error when the key isn't unique, so perhaps there's a better way?
On 8/3/10 16:50 , Benjamin Peterson wrote:
Is there a way to force the ORM to insert a new row instead of updating?
Something like the must_insert argument to model's save method in Django's ORM.
The use case is I must create a unique session key (for a cookie) and want an
error when the key
On Aug 3, 2010, at 10:50 AM, Benjamin Peterson wrote:
Is there a way to force the ORM to insert a new row instead of updating?
Something like the must_insert argument to model's save method in Django's
ORM.
The use case is I must create a unique session key (for a cookie) and want an
error
Say you have a denormalized table with columns phone1, phone2, phone3
and you would like to map the class so that the .phones property is an
iterable.
e.g. if I have data like
user_id, phone1, phone2, phone3
1, 1234, 5678, 9012
2, 3456,7890,1234
I would like to say something like
for p in
http://www.sqlalchemy.org/docs/mappers.html#association-object
refers to an Assocation class here:
---
mapper(Parent, left_table, properties={
'children':relationship(Association)
})
mapper(Association, association_table, properties={
'child':relationship(Child)
})
---
but it doesn't
well neither is Parent and Child for that and the previous example if you want
to get technical (or not even).will find some time to add them all in as
that is a current project
On Aug 3, 2010, at 1:36 PM, botz wrote:
http://www.sqlalchemy.org/docs/mappers.html#association-object
On Aug 3, 2010, at 1:05 PM, phrrn...@googlemail.com wrote:
Say you have a denormalized table with columns phone1, phone2, phone3
and you would like to map the class so that the .phones property is an
iterable.
e.g. if I have data like
user_id, phone1, phone2, phone3
1, 1234, 5678, 9012
2,
It works out, thank you! How could I just retrieve some columns from
both tables? For example, if I try to select some columns from Item
and Channel, I get class 'sqlalchemy.util.NamedTuple' when I'd
like to get a channel type with its items:
result = session.query(Channel.title,
This returns a Decimal type for c2, which is what I want:
c1 = literal(5, type_=Numeric)
c2 = func.sum(c1, type_=Numeric)
This returns a Float type for c2, but I'm telling c1 that it is a
Numeric. How can I get a decimal returned when using an if function?
c1 = func.if_(Table.foo != None,
On Aug 3, 2010, at 2:56 PM, Bryan wrote:
This returns a Decimal type for c2, which is what I want:
c1 = literal(5, type_=Numeric)
c2 = func.sum(c1, type_=Numeric)
This returns a Float type for c2, but I'm telling c1 that it is a
Numeric. How can I get a decimal returned when using an if
Python 2.5.4
MySQL python 1.2.3c1
sqlalchemy 0.5.2
Here is the actual code. It references my object model etc so it
won't run for you, but just in case I made a mistake converting it to
a simplified version of the problem here it is:
dollars = func.if_(EmpTime.actTotal != None,
so our db setup is that we have both vertical and horizontal
partitioning going on.
first, is it possible to defined a session as a scoped, sharded
session to achieve both? namely, define the shardedsession wrapped by
a scoped session and simply have the various shard lookup functions
(*chooser)
On Aug 3, 2010, at 5:00 PM, Bryan wrote:
Python 2.5.4
MySQL python 1.2.3c1
sqlalchemy 0.5.2
just curious can you try with SQLA 0.6.3 ?
Here is the actual code. It references my object model etc so it
won't run for you, but just in case I made a mistake converting it to
a simplified
Hi
I'm relatively new to SQLAlchemy, so thanks in advance for any help
with this issue.
I'm trying to construct a class to model a legacy table which has a
composite primary key which is also
a composite foreign key referencing the composite primary key of a
second table. I'm trying to define
On Aug 3, 2010, at 10:24 PM, jgs9000 wrote:
Hi
I'm relatively new to SQLAlchemy, so thanks in advance for any help
with this issue.
I'm trying to construct a class to model a legacy table which has a
composite primary key which is also
a composite foreign key referencing the composite
On Aug 3, 2010, at 6:45 PM, razamatan wrote:
so our db setup is that we have both vertical and horizontal
partitioning going on.
first, is it possible to defined a session as a scoped, sharded
session to achieve both? namely, define the shardedsession wrapped by
a scoped session and
21 matches
Mail list logo