On 5 Mar, 18:40, Michael Bayer mike...@zzzcomputing.com wrote:
im finding it easiest to just autoload the tables in my migrate script.
That way there's no cut and paste the table def going on, you just load
them as they are from the DB. and the schema definition stays in the
database for
your classes and mappers should be created at the module level, so
that once a module is imported, the mapper for that class is created
just once along with the class itself.
On Mar 6, 2009, at 7:42 AM, Marcin Krol wrote:
Hello everyone,
*From time to time* I get the following exception
On Thu, 2009-03-05 at 01:03 -0800, jarrod.ches...@gmail.com wrote:
Hi All
I'm writing a metadata based schema migration tool.
As SQLAlchemy doesn't support much schema modification. I will
implement a complete set of schema migration functions one way or
another for several of the
Is it possible to do something like this with SQLSoup, or plain
SQLAlchemy:
SELECT p.Shot, s.fr_range_in, s.fr_range_out, s.cut_duration FROM
Production.Production p JOIN Shots.Shots s on p.ShotID = s.shot_ID;
I can intuitively figure out how that would work with SQLSoup because
you pass in a
Sorry if this is a double post, I think my last message barfed:
I was wondering if this was theoretically possible with SqlSoup +
SqlAlchemy. Here is the SQL:
SELECT p.ShotID, s.shot_ID FROM Production.Production p JOIN
Shots.Shots s on p.ShotID = s.shot_ID;
I have two databases that live on
Hi,
I'm not sure is it a bug of SQLAlchemy or MySQL-Python, may some one
advice or if you know any related tickets?
When I'm using SQLAlchemy on MySQL-Python 1.2.3, it shows error on the
following SQL when I call create_all:
19:05:33,895 INFO [sqlalchemy.engine.base.Engine.0x...a0f0] SHOW
It is always good to see some activity on this front.
sqlalchemy-migrate seems to be a good idea that needs more activity.
Perhaps try contributing to that project before branching.
Any comment from the sqlalchemy-migrate developers?
Stephen
On Fri, Mar 6, 2009 at 3:13 PM, J. Cliff Dyer
looks like MySQL-Python changed their exception format again. here's
our current code:
try:
rs = connection.execute(st)
have = rs.rowcount 0
rs.close()
return have
except exc.SQLError, e:
Hi all:
I'm using only sqlalchemy sql expression language, and in documentation
appears that transactions objects are not thread safe.. Need I to
implement a decorator like this?
def transactional(fn):
def transact(self, *args):
c = self.engine.connect()
lock.acquire()
you dont need to define locking if you use each transaction in only a
single thread.Below, you are acquiring a connection and a new
transaction all locally defined within a function, so this code is
threadsafe without the need for locks, provided the callable on the
inside doesn't
or_( *list_of..)
On Friday 06 March 2009 20:30:08 Tomasz Nazar wrote:
Hi there,
I have small issue and don't know how to solve ..
I need to have this kind of query:
q = dbsession().query(User).
options(eagerload_all('lang_pairs.lang_a'),
eagerload_all('lang_pairs.lang_a')).
Hi there,
I have small issue and don't know how to solve ..
I need to have this kind of query:
q = dbsession().query(User).
options(eagerload_all('lang_pairs.lang_a'),
eagerload_all('lang_pairs.lang_a')).
join(['lang_pairs']).
filter(
or_(
That was quick genius :-)
Thanks!
On Fri, Mar 6, 2009 at 7:23 PM, a...@svilendobrev.com wrote:
or_( *list_of..)
On Friday 06 March 2009 20:30:08 Tomasz Nazar wrote:
Hi there,
I have small issue and don't know how to solve ..
I need to have this kind of query:
q =
I am using SqlSoup to read from an MS SQL database and I'm having some
issues building a many-to-many relation on the mapping. The database
doesn't have any foreign keys, so I'm manually specifying the join
conditions and keys.
Specifying the relation returns without exceptions, but as soon as I
I'm trying to convert some classes from Elixir to declarative and am
running into a problem defining a simple self-referencing definition.
I've searched the archives and have tried several things but seem to
be missing something:
import sqlalchemy
sqlalchemy.__version__
'0.5.2'
from
Sorry for the trouble, after much stepping through source I figured it
out.
`secondary` needs to be a Table object, not a SqlSoup Entity. This
fixes it:
db.Products.relate('categories', db.Categories,
secondary=db.ProductCategory._table, _table is your friend!
On Mar 6, 2009, at 6:14 PM, Shawn Church wrote:
But setting the User.modified_by relation does not work:
user.modified_by = user
the key here is that you're setting modified_by to the parent, which
means you are creating a row that's dependent on itself. This will
work on UPDATE but
On Fri, Mar 6, 2009 at 3:43 PM, Michael Bayer mike...@zzzcomputing.comwrote:
On Mar 6, 2009, at 6:14 PM, Shawn Church wrote:
But setting the User.modified_by relation does not work:
user.modified_by = user
the key here is that you're setting modified_by to the parent, which
means
On Mar 6, 2009, at 7:04 PM, Shawn Church wrote:
On Fri, Mar 6, 2009 at 3:43 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
On Mar 6, 2009, at 6:14 PM, Shawn Church wrote:
But setting the User.modified_by relation does not work:
user.modified_by = user
the key here is that
On Fri, Mar 6, 2009 at 4:36 PM, Michael Bayer mike...@zzzcomputing.comwrote:
uh yeah it is. the sync of the primary key to the foreign key happens
after the parent object is updated. but the child is also the parent, so
the flush completes without ever getting to the child. if you set
I have some metadata on table and some of the columns and would like
to surface these as docstrings on the mapped class and columns.
If table foo has columns i, j, k with comments 'apple', 'banana',
'pear', respectively, and the table is mapped via class Foo then I
would like the programmer to
21 matches
Mail list logo