rsday, September 28, 2017 at 10:54:13 AM UTC-4, Mike Bayer wrote:
>
> On Thu, Sep 28, 2017 at 9:29 AM, Doug Farrell > wrote:
> > Hi all,
> >
> > I'm having trouble understanding how to use
> > session.begin(subtransactions=True) as a context manager. I'm workin
Hi all,
I'm having trouble understanding how to use
session.begin(subtransactions=True) as a context manager. I'm working in
Python 2.7.5 with SQLAlchemy 1.1.14 in a Flask 0.12.2 application on CentOS
7 servers. I like session.begin() as a context manager, but things aren't
working as I though
unsubscribe
--~--~-~--~~~---~--~~
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 group, send email to
sqlalchemy+unsubscr...@g
Michael,
Congratulations on the release! I look forward to giving it a spin!
Doug
--~--~-~--~~~---~--~~
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
ot; still holds. Your
> relation
> > from Stat->ExtraStat currently needs to be one-to-one since you
> cannot have
> > more than one ExtraStat referencing a single Stat, due to the PK
> constraint
> > on ExtraStat.name. The error is raising at the point of query()
> s
t currently needs to be one-to-one since you
cannot have more than one ExtraStat referencing a single Stat, due to
the PK constraint on ExtraStat.name. The error is raising at the point
of query() since autoflush is kicking in - use session.flush() to
isolate the error.
On Nov 29, 2008, at 12:18
Hi all,
I'm having a problem with a new instance of a relation conflicting with
an existing instance. I'm using SA 0.5rc with Sqlite3. Here are my
simplified classes:
class Stat(sqladb.Base):
__tablename__ = "stats"
name = Column(String(32), primary_key=True)
to
think thats good etiquette.
>
>
> On Nov 29, 5:22 am, "Doug Farrell" <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I'm having a problem with a new instance of a relation conflicting
> with
> > an existing instance. I'm using SA
Hi all,
I'm having a problem with a new instance of a relation conflicting with
an existing instance. I'm using SA 0.5rc with Sqlite3. Here are my
simplified classes:
class Stat(sqladb.Base):
__tablename__ = "stats"
name = Column(String(32), primary_key=True)
total= C
royed/shared among threads) as well as what other
> concurrency exists within this section of the application.
>
> On Oct 27, 2008, at 9:15 PM, Doug Farrell wrote:
>
> >
> > Hi all,
> >
> > I'm using Python 2.5.1 with SqlAlchemy 0.5rc2 with Sqlite on Windo
Michael,
Thanks for your response. I'll take another look at the ORM tutorial and
the Session chapter now that I've got a little experience and see if
some lights go on.
Your text about deleting instances matches my understanding of how
things work, but it's good to get confirmation and that I'm
Hi all,
I'm using Python 2.5.1 with SqlAlchemy 0.5rc2 with Sqlite on Windows
Server 2003 and I'm having a problem with my application throwing
InvalidRequestError and ConcurrentModification exceptions. Here is my
simplified declarative class:
class Job(srsmanagerdb.Base):
STATUS_INIT = 0
Hi all,
I'm using SqlAlchemy 0.5rc2 on a Windows Server 2003 system and I've got
a question about re-creating objects from a database. I'm building a
Windows Service using Python and the win32all modules and using SA to
save the state machine data for each of the Job objects I'm tracking in
a col
Hi all,
I'm using SqlAlchemy 0.5rc1 to track jobs with a sqlite datatabe in a state
machine used by a server. Each job represents a currently active job in the
server and will "be alive" for awhile as it takes time for the server to
process each job. When a job is done it is removed from the sy
sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: How to perform inner joins
On Sep 26, 2008, at 5:42 PM, Doug Farrell wrote:
I'm have the 'type' column in the press_routing_press linking table;
something like this:
Sess.query(Press,
PressRoutingPress.type).
Bayer
Sent: Friday, September 26, 2008 4:10 PM
To: sqlalchemy@googlegroups.com
Subject: [sqlalchemy] Re: How to perform inner joins
sess.query(Press,
PressRouting.code).join(Press.routes).filter(PressRouting.code=='A').all
()
will return tuples in the form:
(some Press
Michael,
You're right of course, your version works fine. I cut and pasted what
you have into my code framework, cleaned up some stuff and it works
there as well. One thing I cleaned up was this:
# initialize the mysql engine and SqlAlchemy base objects
engine = create_engine(__config__.da
om
Subject: [sqlalchemy] Re: How to perform inner joins
On Sep 26, 2008, at 9:23 AM, Doug Farrell wrote:
I'm trying to represent a many-to-many relationship between the
press_table and the press_routing table using the linking table,
press_routing_press. I think I've got the table
Hi all,
Well, I'm still stumped by SqlAlchemy syntax, but it's getting better.
I've got some tables built this way using SqlAlchemy 0.5:
press_table = Table('press', metadata, autoload=True)
press_routing_table = Table('press_routing', metadata, autoload=True)
press_routing_press_table
Hi all,
Well, I'm still stumped by SqlAlchemy syntax, but it's getting better.
I've got some tables built this way using SqlAlchemy 0.5:
press_table = Table('press', metadata, autoload=True)
press_routing_table = Table('press_routing', metadata, autoload=True)
press_routing_press_table = Table('
Michael,
>
> > class PressRoutingPress(Base):
> >'''This class defines the many-to-many join table between press
> >and press_routing.
> >'''
> >__tablename__ = "press_routing_press"
> >__table_args__ = {'autoload' : True}
> >
> >press_id = Column(Integer, ForeignKey('pre
Hi all,
I'm trying to set up a many-to-many system using the Declarative syntax
against an existing MySQL set of tables. We're using a 'link' table
between two other tables we want to relate many-to-many. Here's the
simplified layout of those tables:
mysql> desc press_routing_press;
+---
ber 21, 2008 10:41 PM
> To: sqlalchemy@googlegroups.com
> Subject: [sqlalchemy] Re: ORM mapping existing data tables
>
>
>
> On Sep 21, 2008, at 9:09 PM, Doug Farrell wrote:
>
> >
> > Hi everyone,
> >
> > I'm new to SqlAlchemy, but I've g
Hi everyone,
I'm new to SqlAlchemy, but I've got some things working and really am
enjoying it. Right now I'm trying to ORM map some existing MySQL
database tables to a class. I've read the documentation, I guess I'm
just not getting it. Can someone help me out. I've done this:
# initialize the
Hi all,
I'm using SqlAlchemy with Sqlite to maintain a dynamic state table for a
constantly running process. The table for this is kept in memory using
the create_engine('sqlite:///:memory:') function call. My process is an
endlessly running loop (with a sleep state), and I'd like to read the
dat
Michael,
Thanks for getting back to me so quickly. I've figured out how to get a
one-to-many, single table relationship working with one way relations,
here is that configuration:
class JobData(Base):
__tablename__ = "jobs"
id = Column(Integer, primary_key=True, autoincrement=True)
26 matches
Mail list logo