Hi again!
This questions can probably only be answered by one of the developers of
SQLAlchemy.
I need to store information that is valid for the whole session in a
sane place, together with accessor methods. I ended up extending the
orm.Session class and passing my class via class_=MySession to
I'd like to find some way to implement access controls on mapped
objects, with the following features:
* Example: given a BlogPost object, only the owner, or a superuser,
would be allowed to set fields such as title and body.
* Example: reading the body field would check the privacy field as
well
When I went looking for docs to remind myself how to build a many-to-many
relationship, the first doc I found at
http://www.sqlalchemy.org/docs/orm/extensions/declarative.html
keywords = Table(
'keywords', Base.metadata,
Column('author_id', Integer, ForeignKey('authors.id')),
So what do you suggest to get the instance by title?
I can query the database by title to get the id and then query again
to get the instance by id. What do you think?
On Nov 17, 1:10 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Nov 16, 2010, at 3:56 PM, Alvaro Reinoso wrote:
Hi
Hi!
at the company I work for I'd like to propose introducing Python to
replace the hopelessly outdated SAS scripts. SQLAlchemy seems like a
good option for SQL handling and I can imagine modules specifically
tailored to our needs.
However, the other guys are slightly conservative and might
On Nov 22, 2010, at 9:57 AM, Catherine Devlin wrote:
When I went looking for docs to remind myself how to build a many-to-many
relationship, the first doc I found at
http://www.sqlalchemy.org/docs/orm/extensions/declarative.html
keywords = Table(
'keywords', Base.metadata,
On Nov 22, 2010, at 9:30 AM, Dan Ellis wrote:
I'd like to find some way to implement access controls on mapped
objects, with the following features:
* Example: given a BlogPost object, only the owner, or a superuser,
would be allowed to set fields such as title and body.
* Example:
On Nov 22, 2010, at 4:33 AM, Torsten Landschoff wrote:
Hi again!
This questions can probably only be answered by one of the developers of
SQLAlchemy.
I need to store information that is valid for the whole session in a
sane place, together with accessor methods. I ended up extending the
On Nov 22, 2010, at 5:38 AM, A. S. wrote:
Hi!
at the company I work for I'd like to propose introducing Python to
replace the hopelessly outdated SAS scripts. SQLAlchemy seems like a
good option for SQL handling and I can imagine modules specifically
tailored to our needs.
However, the
On Nov 22, 11:15 am, Michael Bayer mike...@zzzcomputing.com wrote:
I'm assuming the reason for proxy objects is so that usage would continue
to look like:
blogpost.body = new body
Right, exactly.
So for that kind of thing, if you want certain operations to proceed under
the
I have an app where I think I'm going to want to use a TEMPORARY TABLE
like this:
CREATE TEMPORARY TABLE results AS SELECT .;
and then do two things:
1. I need a select count(1) from that table
2. I need to be able to iterate over the rows in that table
The reason I am using a TEMPORARY
On Nov 22, 2010, at 12:21 PM, Dan Ellis wrote:
If I use properties with the same names as the columns, how can I
avoid them clobbering the actual columns? I did try subclassing
DeclarativeMeta to enforce column_prefix='_', but it I think I
misunderstood what that does, because it made
On Nov 22, 2010, at 9:30 AM, Dan Ellis wrote:
I'd like to find some way to implement access controls on mapped
objects, with the following features:
* Example: given a BlogPost object, only the owner, or a superuser,
would be allowed to set fields such as title and body.
* Example:
On Nov 22, 2010, at 12:42 PM, Jon Nelson wrote:
I have an app where I think I'm going to want to use a TEMPORARY TABLE
like this:
CREATE TEMPORARY TABLE results AS SELECT .;
and then do two things:
1. I need a select count(1) from that table
2. I need to be able to iterate over
Hi Michael,
Am Montag, den 22.11.2010, 11:18 -0500 schrieb Michael Bayer:
Originally I added only 2 fields and 4 methods to the Session but it
seems like this will grow a bit. Is it okay to add a whole bunch of
methods to my Session class? Any hints how to avoid name clashes for
future
On Nov 22, 2010, at 1:11 PM, Torsten Landschoff wrote:
Hi Michael,
Am Montag, den 22.11.2010, 11:18 -0500 schrieb Michael Bayer:
Originally I added only 2 fields and 4 methods to the Session but it
seems like this will grow a bit. Is it okay to add a whole bunch of
methods to my Session
Thanks for those tips. InstrumentationManager sounded like the best
thing, so I've gone with that idea. Here's the basic structure of it
for anyone who's interested: http://pastie.textmate.org/1318179
Thanks again, Michael.
--
You received this message because you are subscribed to the Google
Fixed it!
On Nov 22, 10:14 am, Alvaro Reinoso alvrein...@gmail.com wrote:
So what do you suggest to get the instance by title?
I can query the database by title to get the id and then query again
to get the instance by id. What do you think?
On Nov 17, 1:10 pm, Michael Bayer
Hello all,
I have these classes:
class Screen(rdb.Model):
Represents the screen
rdb.metadata(metadata)
rdb.tablename(screens)
id = Column(id, Integer, primary_key=True)
title = Column(title, String(100))
..
crm = relationship(CRM,
When reading objects like so (notice no `.all()`):
for obj in Session().query(User):
...
what's the batch size with which sqlalchemy fetches rows from the DB?
(If the engine matters: for Postgresql, MySQL, and sqlite?)
Thanks.
--
Yang Zhang
http://yz.mit.edu/
--
You received this
On Nov 22, 2010, at 4:32 PM, Alvaro Reinoso wrote:
Hello all,
I have these classes:
class Screen(rdb.Model):
Represents the screen
rdb.metadata(metadata)
rdb.tablename(screens)
id = Column(id, Integer, primary_key=True)
title = Column(title,
On Nov 22, 2010, at 5:17 PM, Yang Zhang wrote:
When reading objects like so (notice no `.all()`):
for obj in Session().query(User):
...
what's the batch size with which sqlalchemy fetches rows from the DB?
(If the engine matters: for Postgresql, MySQL, and sqlite?)
postgresql:
Hi again!
Sorry for all the questions, here is another one.
What I really would like to do is to read a chunk of data for a mapped
instance and disseminate that into a number of attributes (not the usual
one column - one attribute mapping). This could easily be done using
an orm.reconstructor.
On Nov 22, 2010, at 6:17 PM, Torsten Landschoff wrote:
Hi again!
Sorry for all the questions, here is another one.
What I really would like to do is to read a chunk of data for a mapped
instance and disseminate that into a number of attributes (not the usual
one column - one attribute
24 matches
Mail list logo