() is not the same as engine.execute(), where the latter is
autocommitting (assuming you also called execution_options(autocommit=True)
for this particular text() construct).
On May 31, 2012, at 9:23 PM, Will Orr wrote:
Hello all!
I'm having this *exact* bug from a few years ago wrt. calling
Hello all!
I'm having this *exact* bug from a few years ago wrt. calling stored
procedures.
https://groups.google.com/forum/?fromgroups#!topic/sqlalchemy/qA_ypVgJ1B0
What makes it worse, however, is that adding the autocommit execution
option or explicitly starting and stopping a transaction
'max_overflow=15' and see if that fixes it.
--
Mike Orr sluggos...@gmail.com
--
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
On Fri, Oct 28, 2011 at 9:53 AM, Mike Orr sluggos...@gmail.com wrote:
I have a few Pylons applications that share a SQL access log routine.
Yesterday I migrated it from MySQL to PostgreSQL, and I'm getting a
bunch of errors like this:
connection = self.contextual_connect(close_with_result
(self):
return self.__class__(self.delimiter, self.impl.length)
--
Mike Orr sluggos...@gmail.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
read-write tests elsewhere, then it would be safer to run the
read-only tests against the live database.
--
Mike Orr sluggos...@gmail.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
, and sessionmaker. So why is it behaving differently
here?
--
Mike Orr sluggos...@gmail.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
def process_result_value(self, value, dialect):
value = zlib.decompress(value)
value = pickle.loads(value)
return value
def copy(self):
return CompressedPickle(self.impl.length)
--
Mike Orr [EMAIL PROTECTED
down and
then make that version 1.0?
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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 morning, and afterward easy_install -U
SQLAlchemy says I already have the latest version. I had to install
it specifically: easy_install SQLAlchemy==0.4.2b.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you
. It will matter under heavy load.
I will check out dateutil, thanks.
br
Adam
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
. Are
there that many of those, given that I don't think [N] is even
documented?
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
On Dec 14, 2007 1:31 PM, Felix Schwarz [EMAIL PROTECTED] wrote:
Mike Orr wrote:
Are
there that many of those, given that I don't think [N] is even
documented?
It is in the official documentation:
http://www.sqlalchemy.org/docs/04/ormtutorial.html#datamapping_querying
OK. But the doc
, 23, 24, 46))
The second element should be a datetime rather than a string.
Using SQLAlchemy 0.4.1, Pylons dev, Python 2.5.1, Kubuntu Linux 2007.10
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed
This is on MySQL 5.0.45, BTW.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
On Dec 3, 2007 1:33 PM, Michael Bayer [EMAIL PROTECTED] wrote:
On Dec 3, 2007, at 4:05 PM, Mike Orr wrote:
On Nov 30, 2007 9:28 PM, Michael Bayer [EMAIL PROTECTED] wrote:
yes...add type_=DateTime to your coalesce() call -
func.coalesce(date1, date2, type_=DateTime)
This doesn't
, properties={
activity: orm.column_property(c_activity)
})
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
more and verify whether there is a SQLAlchemy bug or stability
issue before I can report back.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send
upgrade to Kubuntu 7.10 this morning so I have a different version of
MySQL and mysql-python.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send
on wood.)
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
] == datetime.date(2007, 1, 20)
True
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
everybody wants autosave, but that's not true. Some want the
.query attribute, some want autosaving, and some want both. At least
the .query attribute you can ignore if you don't want it, but there's
no way to disable autosaving.
--
Mike Orr [EMAIL PROTECTED
but
it is possible.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
the limit.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
if PostgreSQL does the same.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
of connections per thread.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
, line 3, in module
File
/usr/local/lib/python2.5/site-packages/SQLAlchemy-0.4.0beta3-py2.5.egg/sqlalchemy/schema.py,
line 115, in __call__
autoload_with.reflecttable(table, include_columns=include_columns)
AttributeError: 'module' object has no attribute 'reflecttable'
--
Mike Orr
node_table.select(node_table.c.id==sub_query).execute().fetchall()
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
in the
session code. But SAContext will not be upgraded until SQLAlchemy 0.4
beta comes out, because the SQLAlchemy API is changing too quickly for
me to keep up with.
If session.close() exists in SQLAlchemy 0.3, I didn't know about it.
--
Mike Orr [EMAIL PROTECTED
() ?
Will list be deprecated in 0.4 ?
Exactly. list() is the old way, all() is the 0.4 way.
.list() is the old new way, or short-lived new way. .all() is the
real new way.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because
of mysqldump and its reloading. It packs a
bunch of rows into one INSERT statement. I don't see why that's so
much faster than than executemany but it provides another potential
avenue for speed. I'm not sure if MySQL is the only engine that does
this.
--
Mike Orr [EMAIL PROTECTED
doesn't work. :(
That's right. It appears to be a bug in Pylons or PasteDeploy that I
haven't figured out; it loses the configuration in some circumstances.
We can discuss it on the other thread in pylons-discuss.
--
Mike Orr [EMAIL PROTECTED
if anybody wants to do
a tech coffee.
Reminder: when upgrading from 0.2.x, remove the engine-adding
arguments from the constructor, and instead call .add_engine or
.add_engine_from_config after constructing.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You
On 7/18/07, Michael Bayer [EMAIL PROTECTED] wrote:
this is a test.
Success.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
On 7/11/07, Mike Orr [EMAIL PROTECTED] wrote:
On 7/11/07, Jose Galvez [EMAIL PROTECTED] wrote:
Dear Mike,
I've read the doc string in the new sacontext and was just wondering why for
add_engine_from_config do you have to explicitly pass None for the default
connection? it would make more
compatible with SQLAlchemy 0.3.x after that.
We are discussing ways to incorporate SAContext into Pylons, possibly
for 0.9.6, but nothing is finalized yet. It may be under
pylons.database or it may be in a separate distribution.
--
Mike Orr [EMAIL PROTECTED
, datetime(2007,1,1) , datetime(2007,31,
12)) or something like that...
Or func.year(table.c.date) == 2007
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
to lock tables
explicitly when using transactions, because that's part of what
transactions do. Transaction syntax is also more standardized across
database engines than table locking (which isn't standardized at all).
--
Mike Orr [EMAIL PROTECTED
level depending on what kind of method you call. Various
points in the chain may contain an Engine, and if so it uses that one.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy
of destructing anything.
Yes, SAContext is pretty much once-per-application. Another kind of
context would be needed for repeatable black-box testing.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed
anyway or the overhead
is too small to be noticeable, you can do it this way. Rick's way
sends one small query to the database, which does it all internally.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed
On 6/15/07, Michael Bayer [EMAIL PROTECTED] wrote:
create_session().query(Whatever).filter(...).all()
You added .all() when I wasn't looking? :)
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed
, and the caller can call
.list(), .count(), selectone(), or another aggregate method as they
wish, and it does the right thing.
I'm concerned that we're building an elaborate API that is kinda like
Query but not identical.
--
Mike Orr [EMAIL PROTECTED
that, and if you really need a copy:
q = q.clone().order_by(...)
Keep in mind that modifying the query is much more frequent than copying it.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
object you get back is a *copy* of the object which you
called.
advantages include:
* is more Pythonic (not sure why this is, Mike Orr said so,
would like more exposition)
it's just bad style for a method to return self. Perl classes do it
as a pattern, while Python libraries have always
)
Yes, you need the '%': column.like('%Smith%') The reason is that you
may prefer the wildcard in a different position: '%son', 'ra%s'.
It should work. I'm using an ORM query like that now, and I think I
had a select query with .like before that.
--
Mike Orr [EMAIL PROTECTED
an exception? I
find the former useful enough, but I imagine some people prefer the
latter.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
it up,
plus cleaning out the bin/ directory by hand.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
,
and it's frustrating that .select() exists but .filter() doesn't, so
either add the missing methods or delete the redundant ones. On the
other hand, this can be handled in the documentation by emphasizing
.query() and deprecating the query methods.
--
Mike Orr [EMAIL PROTECTED
and reading the CHANGELOG but I
didn't notice that feature.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
something to do with it.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
On 6/2/07, Michael Bayer [EMAIL PROTECTED] wrote:
On Jun 1, 11:57 pm, Mike Orr [EMAIL PROTECTED] wrote:
My point is, if the second number is lower than the first, shouldn't
SQLAlchemy transform it into a query that returns no records? I.e.,
LIMIT 0, which MySQL at least allows
. hence
i like entity.query() better. im not sure which one youre saying you
prefer ?
On May 31, 5:46 pm, Mike Orr [EMAIL PROTECTED] wrote:
What are future plans for the assign_mapper query methods?
MyClass.select(...)
-- works great. A clear advantage for assign_mapper over
incompatible with transactions but I don't see how.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
or just .where come to mind.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
you singled out query())
.query() is a class method that's actually a lambda. Very strange.
The other methods looked like they were assigned more
straightforwardly but maybe that's just a superficial appearance.
They don't use lambdas though.
--
Mike Orr [EMAIL PROTECTED
we're not borrowing Javaisms in the API without a
compelling reason.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
be an alias for session.bind_to? Pretty
please? The only reason I leave a top-level 'engine' around is in
case I need it for something, because .bind_to is so non-obvious.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you
On 6/1/07, Michael Bayer [EMAIL PROTECTED] wrote:
Mike Orr wrote:
Could we have session.engine be an alias for session.bind_to? Pretty
please? The only reason I leave a top-level 'engine' around is in
case I need it for something, because .bind_to is so non-obvious.
pylons
by adding some engine key arguments?
Also, the create_engine method could hand back a cached engine if a
compatible one has already been created.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
would do:
range()[1420:20]
[]
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
monkeypatch
in the source. Not so clear an advantage over the regular mapper
because it's so verbose.
The third is the one I've found most useful. That way I can have
functions that return a Query, and the caller can call .select(),
.select(offset=,limit=), or .count() as they wish.
--
Mike Orr
BY inews_date DESC \n LIMIT 99 OFFSET 0' []
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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 5/31/07, Mike Orr [EMAIL PROTECTED] wrote:
I've been getting this on my Pylons site.
sqlalchemy.exceptions.SQLError: (ReferenceError) weakly-referenced
object no longer exists
In case it helps, the exception occurs at sqlalchemy/engine/base.py
line 583 (SQLAlchemy 0.3.7
? you just start the app, and it happens every time ?
On May 31, 6:01 pm, Mike Orr [EMAIL PROTECTED] wrote:
I've been getting this on my Pylons site.
sqlalchemy.exceptions.SQLError: (ReferenceError) weakly-referenced
object no longer exists
It's trying to execute an ORM .select
)),
autoload=True)
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
On 5/11/07, Mike Orr [EMAIL PROTECTED] wrote:
I've got a MySQL warning that's sabotaging my table-update program.
The table.insert() way gave the same warning, but I finally got it to
work via plain MySQLdb:
conn = engine.connect().connection
cursor = conn.cursor()
sql = UPDATE Incident SET
On 5/8/07, Michael Bayer [EMAIL PROTECTED] wrote:
On May 8, 2007, at 8:47 PM, Mike Orr wrote:
I noticed the ORM was taking a few seconds longer in my batch job.
Today I converted my web application from Select to ORM so I could add
some methods to the mapped classes, and even tried
dataset.
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
On 5/9/07, Michael Bayer [EMAIL PROTECTED] wrote:
On May 9, 2007, at 2:46 PM, Mike Orr wrote:
The actual SQL time is 1.04 second for this ORM-inspired query:
SELECT entries.category AS entries_category, entries.title AS
entries_title, entries.thumb200 AS entries_thumb200
On 4/27/07, Michael Bayer [EMAIL PROTECTED] wrote:
On Apr 27, 2007, at 2:19 PM, Mike Orr wrote:
Is it possible to make a mapper class that loads modifies only some
fields in a table rather than all the fields, yet still autoloads the
fields rather than having hardcoded column types
(cols.inews_date)], limit=recent_limit)
--
Mike Orr [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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
72 matches
Mail list logo