= Column(SmallInteger)
x = Column(SmallInteger)
Thanks for any hints.
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group
I defined a TypeDecorator with impl=postgres.PGUuid so that I can work
with raw UUID bytes (instead of hex strings), but I'd like to make
this portable to other DBMSs, where i want the impl to be a BLOB. How
can I do this? The reference docs are pretty sparse here. Thanks in
advance.
--
Yang
On Thu, May 20, 2010 at 8:06 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On May 20, 2010, at 4:49 PM, Yang Zhang wrote:
I defined a TypeDecorator with impl=postgres.PGUuid so that I can work
with raw UUID bytes (instead of hex strings), but I'd like to make
this portable to other DBMSs
On Thu, May 20, 2010 at 8:09 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On May 20, 2010, at 5:51 PM, Yang Zhang wrote:
How do I create an ORM type with no primary key columns? For some
reason I'm getting:
sqlalchemy.exc.ArgumentError: Mapper
Mapper|ActorActivity|actor_activities
wrote:
On May 20, 2010, at 4:49 PM, Yang Zhang wrote:
I defined a TypeDecorator with impl=postgres.PGUuid so that I can work
with raw UUID bytes (instead of hex strings), but I'd like to make
this portable to other DBMSs, where i want the impl to be a BLOB. How
can I do this? The reference
awareness? Is there any way to avoid having to do this for
every such query?
Thanks in advance.
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com
On Fri, May 21, 2010 at 6:47 PM, Yang Zhang yanghates...@gmail.com wrote:
I'm trying to run the following:
session.query(Activity).filter(Activity.blob == blob).one()
where Activity.blob is a BLOB and blob is a Python bytes object
(equiv. to str in Python 2.x). But although I can insert
On Sat, May 22, 2010 at 4:12 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On May 22, 2010, at 1:14 AM, Michael Bayer wrote:
On May 21, 2010, at 10:04 PM, Yang Zhang wrote:
Also, how do I do the wrapping portably? For sqlite3 I have to wrap
with sqlite3.Binary, for postgresql I have
this group at
http://groups.google.com/group/sqlalchemy?hl=en.
I would also love to know the answer to this question! Also
interested in other libraries like those for mysql (gevent-mysql).
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you are subscribed to the Google
How do I get the ORM to use locking selects when I do a
Session.query()? E.g., select for update, or select for share
(PG)/select lock in share mode (MySQL). I know this is possible using
the lower-level SQL expression library. Thanks in advance.
--
Yang Zhang
http://yz.mit.edu/
--
You
/dvarrazzo/psycogreen/src/tip/gevent/psyco_gevent.py
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy
On Fri, Jun 25, 2010 at 6:42 AM, Michael Bayer mike...@zzzcomputing.com wrote:
On Jun 25, 2010, at 3:27 AM, Yang Zhang wrote:
How do I get the ORM to use locking selects when I do a
Session.query()? E.g., select for update, or select for share
(PG)/select lock in share mode (MySQL). I know
, blah.actor_id AS blah_actor_id, blah.domain AS blah_domain,
...
FROM blah
WHERE blah.id = ?
sqlalchemy.engine.base.Engine.0x...1f90: INFO: (426,)
sqlalchemy.engine.base.Engine.0x...1f90: INFO: ROLLBACK
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you are subscribed
? Some Googling
turned up monkey-patching the .flush() method to be a no-op that also
logs a message, but we're interested in raising an exception if the
flush actually has dirty data to write.
Thanks!
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you are subscribed
read-write - but we'd like to avoid having to
keep around for each web app thread multiple Sessions (and thus 2x the
open connections on the DB).
Yang
On Fri, Nov 5, 2010 at 6:42 PM, Michael Bayer mike...@zzzcomputing.com wrote:
On Nov 5, 2010, at 8:48 PM, Yang Zhang wrote:
Hi, we're building
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
Is there something similar to the .get() method in SqlSoup and Session
but which allows me to fetch more than one object by ID, so as to save
on round trips to the DB? (This could be done by composing using the
IN operator in SQL.) Thanks in advance.
--
Yang Zhang
http://yz.mit.edu/
--
You
Yeah, that's what we do right now.
On Wed, Jan 26, 2011 at 8:03 PM, Mike Conley mconl...@gmail.com wrote:
On Wed, Jan 26, 2011 at 8:17 PM, Yang Zhang yanghates...@gmail.com wrote:
Is there something similar to the .get() method in SqlSoup and Session
but which allows me to fetch more than
I have a model with a field:
class Obj(Base):
...
meta = Column(PickleType)
For some reason, when I do
obj = session.query(Obj).get(id)
obj2 = session.query(Obj2)
I get a dirty UPDATE being attempted on the first object (noticed this
due to read-only access to a Postgresql DB):
On Wed, Mar 9, 2011 at 7:46 AM, Michael Bayer mike...@zzzcomputing.com wrote:
On Mar 9, 2011, at 4:57 AM, Yang Zhang wrote:
I have a model with a field:
class Obj(Base):
...
meta = Column(PickleType)
For some reason, when I do
obj = session.query(Obj).get(id)
obj2 = session.query
On Wed, Mar 9, 2011 at 12:07 PM, Yang Zhang yanghates...@gmail.com wrote:
On Wed, Mar 9, 2011 at 7:46 AM, Michael Bayer mike...@zzzcomputing.com
wrote:
On Mar 9, 2011, at 4:57 AM, Yang Zhang wrote:
I have a model with a field:
class Obj(Base):
...
meta = Column(PickleType)
For some
, and we can't help but feel that we
might be doing something wrong or missing something obvious. We're
wondering if there are any tips or anything built in to SA that could
help improve the performance situation.
Thanks!
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because
, but that didn't work. Thanks in advance.
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to
sqlalchemy+unsubscr
this
is such a frequently used construct. But we wanted to see if we're
missing anything first.
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe
On Tue, Apr 26, 2011 at 12:32 PM, Yang Zhang yanghates...@gmail.com wrote:
On Wed, Apr 13, 2011 at 6:07 PM, Michael Bayer mike...@zzzcomputing.com
wrote:
To work around the instance arguments being baked in, create the query
like this:
query.filter(SomeClass.somerecord ==bindparam
, nullable=False)
time = Column(DateTime, nullable=False)
Short of dumping my entire DB, any hints as to what might cause `None`
to be returned? I searched the documentation but couldn't find any
leads. Thanks.
--
Yang Zhang
http://yz.mit.edu/
--
You received this message because you
mention of this peculiar
distinguishing behavior. Anyway, that's that.
On Fri, Nov 18, 2011 at 4:45 PM, Yang Zhang yanghates...@gmail.com wrote:
I'm using sqlalchemy 0.6.6 and sqlite 3.6.22 on Python 2.6. When I do:
In [1]: for i in ses.query(UserSnapshot):
...: print i
Specifically, the code path where this is appearing ends up looking like:
session = sqlalchemy.orm.Session(sqlalchemy.create_engine('sqlite:///'))
session.execute('run_some_transaction()')
session.commit()
This raises:
AttributeError: 'Session' object has no attribute '_model_changes'
I get
Sorry, disregard—wrong mailing list! This is Flask-SQLAlchemy-specific.
On Mon, Oct 21, 2013 at 11:51 PM, Yang Zhang yanghates...@gmail.com wrote:
Specifically, the code path where this is appearing ends up looking like:
session = sqlalchemy.orm.Session(sqlalchemy.create_engine('sqlite
I'm trying to connect to Vertica as a regular ODBC DSN, which I can do
fine outside of sqlalchemy:
$ isql -v pod
+---+
| Connected!|
| |
| sql-statement |
| help
Right after sending this, I hit upon the magic incantation, which I
had not thought of trying:
vertica+pyodbc://pod
Sigh.
On Fri, Nov 8, 2013 at 4:48 PM, Yang Zhang yanghates...@gmail.com wrote:
I'm trying to connect to Vertica as a regular ODBC DSN, which I can do
fine outside of sqlalchemy
31 matches
Mail list logo