-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of farcat
Sent: 16 March 2011 21:01
To: sqlalchemy
Subject: [sqlalchemy] trouble with metaclass
I have an error i cant figure out (likely a beginners error):
Hi, Simon
Thanks for the quick response.
Elixir doesn't use __init__ - there's something automatic going on there. My
create(), in essence, does the job of __init__, which means you might still
be hitting the nail on the head. I haven't had the time to test it out yet,
but I will. (Why, though,
Thanks !
To respond to my needs, it becomes :
class NodeAttribute(Base):
__tablename__ = 'node_attribute'
node_id = Column('n_id', Integer, ForeignKey('node.n_id'),
primary_key=True)
attribute = Column('na_id', String, primary_key=True)
def __init__(self,
Awesome, thank you much. It is correlated to the parent. The query-
enabled properties section looks interesting to me. Will there be a
significant performance difference between the two approaches? I want
this to be lazily evaluated, so that this information is never fetched
unless we actually
-Original Message-
From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com]
On Behalf Of Jacques Naude
Sent: 17 March 2011 12:32
To: sqlalchemy@googlegroups.com
Subject: Re: [sqlalchemy] In-memory object duplication
Hi, Simon
Thanks for the quick response.
On 16/03/2011 21:01, farcat wrote:
I have an error i cant figure out (likely a beginners error):
Beginners should not be using metaclasses.
What's your use case here?
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
--
You need to create a single file Python script, which creates a
CoverBatchStackItem class with just two columns - id and qty.Then, it
inserts one row into a local sqlite database, then loads, updates qty in the
manner in which you describe, and commits. Use the examples in the object
On Mar 17, 2011, at 11:05 AM, hoesley wrote:
Awesome, thank you much. It is correlated to the parent. The query-
enabled properties section looks interesting to me. Will there be a
significant performance difference between the two approaches? I want
this to be lazily evaluated, so that this
Got it:
query = session.query(Store.Store)
query = query.join('userGroups', 'users')
query = query.filter(User.User.id == int(userId))
print str(query.all())
From the examples inside the sqlalchemy egg
(http://prdownloads.sourceforge.net/sqlalchemy/SQLAlchemy-0.6.6.tar.gz?download)
In the
I have a table with a Text column, which i manually set up as a
MEDIUMTEXT type in MySQL (5.0), since MySQL's 2**16 character limit is
not enough for my application. Now when I store large chunks of text
in that column, and try to get it back, SQLAlchemy raises an
ResourceClosedError, saying that
On Mar 17, 2011, at 9:11 PM, Martin wrote:
I have a table with a Text column, which i manually set up as a
MEDIUMTEXT type in MySQL (5.0), since MySQL's 2**16 character limit is
not enough for my application. Now when I store large chunks of text
in that column, and try to get it back,
Dear All,
Having a logging functionality to trace creation, checkout, and
checkin connection from pool is very helpfull. however is there a way
to identify connection which has not been returned back to the pool
for a period of time?
I suspect I had a stale connection object which does not
12 matches
Mail list logo