Hi,
I have a problem using SQLAlchemy 0.4 when deleting referenced
objects in a PostgreSQL database and adding new ones within the same
transaction.
Originally, I found the problem with Elixir 0.4.0-pre (svn r216) and
SQLAlchemy 0.3.11 -
Hi Mike, Hi all,
Our conversation yesterday night on IRC gave me ideas :)
I just added ticket #839 to the trac and attached a patch that enables
unicode conversion for MSSQL dialects.
I tested it with pyodbc but it should work the same with the other dialects.
Best regards,
Florent Aide.
Is this a turbogears app? or just your stand alone app?
On 10/28/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I just started experimenting with .4 last night, and I'm really
jazzed. The tutorials have been helpful, but I'm struggling to figure
out how to bridge the gap between the
Thanks Arnar, that was interesting to read. I learned a lot with these
codes. Here i share current point of my progress. I managed to do
mapper extension and document - documentversion objects seems to work
ok, but im not so sure, if my solution was very elegant. So if anyone
sees this and wants
On Oct 30, 2007, at 2:26 AM, Sanjay wrote:
mapper(User, users_table)
Is not using assign_mapper preferable?
assign_mapper is an optional extension. its replaced in version 0.4
by the ScopedSession.mapper function, which is described in the
docs. only use these extensions if you're
Hei Wes and Paul...
On 10/29/07, Wes Duff [EMAIL PROTECTED] wrote:
Hey whats going on.
I am a new sqlalchemist as well but lets see if this helps any.
This is how I am getting a list of all names that corrispond with my
document names class.
names = [ c.name for c in
Hello,
I am trying to make a select statement which involves date sorting.
x1=model.User.select(model.User.c.ZIPCODE==zipcode )
now I get a list of 3 records x1[0],x1[1],x1[2]
How can I sort x1 by x[0].c.DATE ?? ASC ?
What would python code for that look like?
or how could I change this to
On Oct 30, 2007, at 10:16 AM, Roger Demetrescu wrote:
If we need to introspect both Address-user and User-addresses, one
solution is to not use the backref ... :
use mapper.get_property(name) and mapper.iterate_properties(). I've
considered removing properties as a public accessor
Dammit...
Sent it to the wrong ML.. :-/
Sorry about the noise...
Roger
On 10/30/07, Roger Demetrescu [EMAIL PROTECTED] wrote:
Hei guys...
I have just tried to reopen a ticket, but I am getting this error:
Submission rejected as potential spam (Akismet says content is spam)
I
Mike,
use mapper.get_property(name) and mapper.iterate_properties(). I've
considered removing properties as a public accessor since it serves
no useful purpose.
This doesn't work for me - the following code outputs:
[Column('id', Integer(), primary_key=True, nullable=False)]
[Column('val',
Hi,
use mapper.get_property(name) and mapper.iterate_properties (). I've
considered removing properties as a public accessor since it serves
no useful purpose.
Ok, I found a hacky way that does what I need:
[(n, getattr(obj, n)) for n in dir(obj)
if isinstance(getattr(obj, n),
On Oct 30, 2007, at 5:41 AM, Felix Schwarz wrote:
foo = session.query(User).filter_by(name='Foo Bar').one()
session.save(foo)
for address in foo.addresses:
foo.addresses.remove(address)
session.delete(address)
session.delete(foo)
foo = User()
session.save(foo)
foo.id = 1
Is this a turbogears app? or just your stand alone app?
It's a standalone (and non-web) app.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to
Hi,
Ok, I found a hacky way that does what I need:
[(n, getattr(obj, n)) for n in dir(obj)
if isinstance(getattr(obj, n),
sqlalchemy.orm.attributes.InstrumentedAttribute)]
Ooops, not quite what I need. How do I go from a CollectionAttributeImpl to
a mapper?
Paul
Rick Morrison wrote:
On 10/26/07, *Paul Johnston* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
Ticket #573 mentions adding a field for arbitrary
application-specific information to tables. I now have a need for
this, so I'm prepared to do the work to make it happen.
On Oct 30, 2007, at 11:25 AM, Paul Johnston wrote:
Mike,
use mapper.get_property(name) and mapper.iterate_properties (). I've
considered removing properties as a public accessor since it serves
no useful purpose.
This doesn't work for me - the following code outputs:
[Column('id',
On 10/30/07, Paul Johnston [EMAIL PROTECTED] wrote:
Mike,
use mapper.get_property(name) and mapper.iterate_properties (). I've
considered removing properties as a public accessor since it serves
no useful purpose.
This doesn't work for me - the following code outputs:
personal opinion: I'm not wild about either 'attributes' or 'properties',
(a) they seem too long, and
(b) yes, they are too similar to generic ORM terms
many many moons ago (pre Windows-1.0) I used an Ascii-GUI thing called
C-scape (I think it's called vermont views now).
anyway, most of its
Rick Morrison wrote:
personal opinion: I'm not wild about either 'attributes' or 'properties',
(a) they seem too long, and
(b) yes, they are too similar to generic ORM terms
many many moons ago (pre Windows-1.0 ) I used an Ascii-GUI thing called
C-scape (I think it's called vermont
The core can (and does) use these buckets too, so I'm not sure about the
user-y moniker.
Hold it. I thought the whole point of this was to separate core usage from
user usage? To create a safe-zone for library user's private data.
But if that were it, I'd only be +1 on a spelled out
you could just be using one mapper for all the classes here. its
almost like you should monkeypatch class_mapper() and object_mapper()
and just be done with it.
of course the reason mappers are usually specific to a class is
because, every class would have completely different attributes
Rick Morrison wrote:
The core can (and does) use these buckets too, so I'm not sure
about the
user-y moniker.
Hold it. I thought the whole point of this was to separate core usage
from user usage? To create a safe-zone for library user's private data.
Yes to the second
On Oct 30, 2007, at 5:41 AM, Felix Schwarz wrote:
for address in foo.addresses:
foo.addresses.remove(address)
session.delete(address)
session.delete(foo)
foo = User()
session.save(foo)
foo.id = 1
foo_addr = Address()
session.save(foo_addr)
foo_addr.street = Picadelly
Ah sure, so it's to be a namespace for namespaces, a shared dict() parking
lot. Got it.
So then, how about
aux
etc
other
or maybe
miscdata
extra
more
additional
supplemental
auxiliary
adjunct
appendix
surplus
spare
augment
--~--~-~--~~~---~--~~
You received
On Oct 30, 2007, at 1:35 PM, Ron wrote:
I guess I should explain further what I'm trying to build. My app is
a tool to help with managing clusters. This includes everything from
Datacenters, Racks, Servers, Switches, etc. I don't know ahead of
time the sorts of specific Things and
Hi all,
thank you for your comments.
I really expected to get comments from more people.
But probably I'm concerned about something you don't have to. ;-)
So, I'll wait.
Best regards
Andreas
--~--~-~--~~~---~--~~
You received this message because you are
On 10/30/07, McA [EMAIL PROTECTED] wrote:
Hi all,
thank you for your comments.
I really expected to get comments from more people.
But probably I'm concerned about something you don't have to. ;-)
So, I'll wait.
it seems better to use:
import sqlalchemy
and in code do:
If you don't want to pollute the current namespace, then make an indirect
reference.
1) Make a module of your own, say db.py
2) In db.py:
...
from sqlalchemy import *
from sqlalchemy.orm import *
...
table1 = Table('footable', ...)
...
# other
28 matches
Mail list logo