use autoload_with= when you create the Table. Dont
use BoundMetaData.
On Aug 22, 2007, at 5:53 PM, mc wrote:
>
> Hi,
> the following code creates 2 connections.
> Is there way to make it 1, either by making the Table share
> connection1 or
> by releasing the connection Table used after it loa
Anil wrote:
> Actually, there was some information in the logs that I just noticed
> that might help detect the problem (some kind of unicode issue?):
>
> 12:58:21,710 INFO [sqlalchemy.engine.base.Engine.0x..50] SHOW CREATE
> TABLE `User`
> 12:58:21,711 INFO [sqlalchemy.engine.base.Engine.0x..5
Hi,
the following code creates 2 connections.
Is there way to make it 1, either by making the Table share
connection1 or
by releasing the connection Table used after it loaded the metadada?
TIA
connect_s = 'mysql://%s:[EMAIL PROTECTED]/%s' % (user, pw, server, db)
engine = sqlalch
I've just put beta4 out, which fixes some important issues and also
has lots more performance enhancements. In particular, the
connection pool works a little differently now, so please let us know
if any stability issues arise.
One caveat with this release is that I just noticed that the S
Hi Jian -
yes, its the PropertyAliasedClauses. I put in a fix + a test based
on your example in r3410. i didnt yet add a test for more levels
deep yet, though, so see how that goes.
- mike
On Aug 22, 2007, at 3:07 PM, Jian Luo wrote:
> class Widget(object):
> pass
>
> mapper(Widget,
On Aug 22, 2007, at 2:31 PM, Christoph Haas wrote:
> The error disappeared. But getting the joined PTR records for a
> certain
> inet took very long. So I analyzed the query that SQLAlchemy did:
>
> SELECT records.id AS records_id, records.domain_id AS
> records_domain_id, records.dhcp
| User | CREATE TABLE `User` (
`id` int(10) unsigned NOT NULL auto_increment,
`location_id` int(10) unsigned NOT NULL,
`mail` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
`salt` varchar(8) NOT NULL,
`phone` varchar(24) default NULL,
`organization` varchar(45) default NULL,
Hi Anil,
The recent 0.4 betas have an all-new MySQL table reflection routine
that's being tried out. It's possible that it's not picking up
your primary key when it should- could you send in the output of
SHOW CREATE TABLE for this table, either on or off list? Also
there should be a warnin
> will restore engine.echo today.
what about Metadata's? why not leave some enginetype-indepedent kwargs
there (or at least echo, its the most used in lets-try-this-now
cases), which go together with the bind to the create()? i know i
know explicit is better than implicit... noone would be forc
Hallo Mike,
first of all, thank you for your great great sqlalchemy!
On Aug 22, 6:49 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> im not sure about how elixir does bi-directional relationships but it
> seems strange that you have set up the "children" and "parents"
> relationships twice in b
On Wed, Aug 22, 2007 at 12:37:32PM -0400, Michael Bayer wrote:
>
>
> On Aug 22, 2007, at 8:27 AM, Christoph Haas wrote:
>
> >
> > But that example deals with User and Address tables and not with
> > self-references. I suspect I have to alias the table. Roughly I'm
> > thinking of something like
will restore engine.echo today.
leaving it out on session and pool, however (bet you didnt know they
had "echo" too...)
On Aug 22, 2007, at 5:11 AM, svilen wrote:
>
> in 0.3, one could do
> meta = MetaData( whatever, echo=True)
> later, early 0.4, the echo kwarg was gone, so it got less con
On Aug 22, 2007, at 11:37 AM, Jian Luo wrote:
>
> Hi List,
>
> I have a table defined in elixir, simplified as following:
> class Widget(Entity):
> """Form, Fieldset or Field
> """
> has_field('name', Unicode(40), nullable=False, unique=True)
> has_and_belongs_to_many('children',
On Aug 22, 2007, at 8:27 AM, Christoph Haas wrote:
>
> But that example deals with User and Address tables and not with
> self-references. I suspect I have to alias the table. Roughly I'm
> thinking of something like:
>
> properties={
> 'ptr_records': relation(Record, primaryjoin=and
Michael Bayer ha scritto:
> well at the very least you want to ensure that executemany() is being
> used for the inserts (i.e. with sqlalchemy, dont use ORM, use
> connection.execute(statement, [param, param, param...]).
>
> If you use SQLAlchemy's "executemany()" facilities, we've just
> increase
Hi List,
I have a table defined in elixir, simplified as following:
class Widget(Entity):
"""Form, Fieldset or Field
"""
has_field('name', Unicode(40), nullable=False, unique=True)
has_and_belongs_to_many('children', of_kind='Widget',
inverse='parents')
has_and_belongs_to_many
> Another thing, the dots that are produced by unittests magically
> disappear if meta.bind.echo = True, very interesting..
shoot me, thats my problem
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" grou
Dear list,
I'm still working on a DNS administration web interface and have to deal
with DNS records. This is what I have so far:
---
import sqlalchemy as sql
import sqlalchemy.orm as orm
from sqlalchemy.databases.postgr
in 0.3, one could do
meta = MetaData( whatever, echo=True)
later, early 0.4, the echo kwarg was gone, so it got less convenient,
adding another line:
meta.bind.echo = True
As of latest trunk, neither works, one has to explicitly do
meta = MetaData( create_engine(whatever, echo=True))
which is
> my_eager_alias = mynodes.alias('mynodes')
> query = query.filter(...wahtever criterion you're using...)
> query = query.from_statement(select([mynodes, my_eager_alias],
> query._criterion)).\
>.options(contains_eager('children', alias=my_eager_alias))
>.options(eagerload('childre
20 matches
Mail list logo