On Dec 17, 2008, at 11:32 AM, Ross Vandegrift wrote:
On Thu, Dec 11, 2008 at 02:59:39PM -0500, Michael Bayer wrote:
On Dec 11, 2008, at 2:04 PM, Ross Vandegrift wrote:
So if I do something like this:
p = meta.session.query(model.Pool)
pool = p.get(7)
meta.session.refresh(pool)
On Dec 17, 2008, at 8:18 AM, Max Ischenko wrote:
Hello,
I'm having trouble doing insertmany correctly. I read the docs and
came up with this code:
s = Session()
ins = data_tbl.insert()
records = []
for rec in s.execute(sql).fetchall():
On Thu, Dec 11, 2008 at 02:59:39PM -0500, Michael Bayer wrote:
On Dec 11, 2008, at 2:04 PM, Ross Vandegrift wrote:
So if I do something like this:
p = meta.session.query(model.Pool)
pool = p.get(7)
meta.session.refresh(pool)
InvalidRequestError: Instance 'p...@0xa6aca8c' is not
Hi,
A very simple question...
Context:
* I only need to retrieve values from a table
* I've a mapper object for the table
Question:
In a performance point a view which is the more suitable method:
- mappers = session.query(User).filter_by(name='ed').all()
or
- results =
On Dec 17, 2008, at 2:28 AM, Joril wrote:
Michael Bayer ha scritto:
concrete inheritance, as referenced in that post, was not designed
to be used as a configurational spacesaver and always requires a
mapped selectable for the base, which you don't have here, so it's
not appropriate for
Hi,
we've got some function-based indices we currently create using plain
text()-calls, like this:
CREATE UNIQUE INDEX
users_lower_email_index
ON
user_db.users (lower(email));
This works, but it would be nice to stay in the SA-world even with these
On Dec 17, 2008, at 10:10 AM, Ken wrote:
Actually, I found that the error goes away if I don't set
pool_recycle=True. However, I'm told pool_recycle is necessary to
prevent MySQL has gone away errors.
yes but pool_recycle is documented as a number of seconds, and a
typical value is 3600
Hi everyone ,
I have the following setup (snipped):
in_table = Table('in', metadata,
Column('id', Integer, primary_key=True),
Column('pA', String(6), ForeignKey('p.id'),
nullable=False),
Column('pB', String(6), ForeignKey('p.id'),
i found some discrepancies which may or may not be a bug.
When a many2many implicit assoc via secondary_table is setup with
view_only=True:
a) proploader.remote_side contains only the primaryjoin item (which
is probably ok, i dont know what it's used for), so i have to dig
On Dec 17, 2008, at 6:36 AM, Diez B. Roggisch wrote:
Hi,
we've got some function-based indices we currently create using plain
text()-calls, like this:
CREATE UNIQUE INDEX
users_lower_email_index
ON
user_db.users (lower(email));
This works,
Hello,
I'm having trouble doing insertmany correctly. I read the docs and
came up with this code:
s = Session()
ins = data_tbl.insert()
records = []
for rec in s.execute(sql).fetchall():
records.append(rec)
ins.execute(records)
It gives an
Actually, I found that the error goes away if I don't set
pool_recycle=True. However, I'm told pool_recycle is necessary to
prevent MySQL has gone away errors. My guess then is that SQLAclehmy
preparing a statement, it works right the first time, and thereafter
there is an issue with it.
So
for the record, if anyone wants doing such stuff:
there is a many to one reference A.b to B. one day it becomes
bitemporal, i.e. an association A.b to B via A2B table, which
contains other columns that cannot be invented by default values
(timestamps, disabled, etc). Hence, the association
below is ext.declarative.py's doc:
class Person(Base):
__tablename__ = 'people'
id = Column(Integer, primary_key=True)
discriminator = Column(String(50))
__mapper_args__ = {'polymorphic_on': discriminator}
class Engineer(Person):
__tablename__ =
all Column objects have to be on the base class if you're using single
table inheritance. declarative joins the Table and class definitions
together, and the base class has to represent the Table completely.
On Dec 17, 2008, at 10:36 PM, Jeffrey wrote:
below is ext.declarative.py's doc:
15 matches
Mail list logo