I am trying to subclass a mapped class from another package for no
other reason than to add a utility method. The polymorphic_on
condition, if it were defined, would have to be 'True'. Example:
class Mapped(declarative_base()):
# columns
class Utility(Mapped):
def is_something(self):
Thank you! I never would have thought of appending a superclass as an
alternative to subclassing or monkeypatching. No wonder Python is so
hard to optimize. I wound up doing the monkey patch and it seems to
work just fine.
--
You received this message because you are subscribed to the Google Grou
You might be interested to know that the situation is more like "If you are
not using MySQL, you probably have transactional DDL". Even SQLite has it.
According to
http://wiki.postgresql.org/wiki/Transactional_DDL_in_PostgreSQL:_A_Competitive_Analysis
- PostgreSQL - yes
- MySQL - n
session.query(sqlalchemy.func.max(MappedClass.column)).scalar()
--
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...
Can someone help me understand why DDL seems to not be transactional here:
import sqlalchemy
e = sqlalchemy.create_engine('sqlite://')
c = e.connect()
t = c.begin()
c.execute("CREATE TABLE foo (bar INTEGER)")
t.rollback()
assert u'foo' in e.table_names() # True
But, if I start up `sqlite3 db.db`
Thanks Mike. I will have to edit the pysqlite C source code if I want to
prevent it from committing when the query does not contain any of the
strings "select", "insert", "update", "delete", or "replace".
if (!strcmp(buf, "select")) {
return STATEMENT_SELECT;
} else if (!strcmp(b
It looks like SQLAlchemy 0.7's events make it a lot easer to prepend /*
select */ to every statement.
Daniel
--
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 th
I thought I could prepend /* update * / to every statement but that didn't
work. Instead, https://bitbucket.org/dholth/pysqlite/changeset/cdc3a85dcb49
Obviously it should be a flag. Something like
pysqlite2.surprise_transactions(False)
--
You received this message because you are subscribed to
ber) tuple for each
managed package.
stucco_evolution is 200 lines of code with automated tests that provide 100%
statement coverage. It works well for me, but the functions in the API do
not have very good names. Suggestions welcome.
Daniel Holth
--
You received this message because you are
You should expect better ORM performance in newer versions. You should go
straight to 0.6 and see what happens, with an eye on the 0.5 and 0.6 release
notes for the things that most people have to change (it shouldn't be a big
deal).
RunSnakeRun is supposed to be a nifty profiler. Can you profi
I suppose you explicitly don't want to call User.morestuff.otherproperty? I
like doing it that way, but it could be that I am underusing SQLAlchemy's
inheritance features. The following works fine:
package 1:
Base1 = declarative_base()
class User(Base1): pass
package 2:
Base2 = declarative_ba
Is this pysqlite issue about SELECT not starting a transaction related?
http://code.google.com/p/pysqlite/issues/detail?id=21
--
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 un
The query is simply returning rows with one column. For example
session.query(X.a, X.b).all() would return a potentially less surprising
list rows with two columns. The rows can be indexed by name or number. The
'L' is just Python telling you it is a long integer.
--
You received this message
stucco_evolution 0.4 has been released. It is a migration tool for
SQLAlchemy that attempts to deal with packaged dependencies having their
own migration scripts. Reading -> as "depends on",
web application -> openid package -> users/groups package
web application -> users/groups package
When a
On Thursday, April 19, 2012 1:43:59 PM UTC-4, Michael Bayer wrote:
>
> If you've seen my recent talks you saw that I'm a little skeptical of what
> you're terming "non-monolithic" databases.Let's say this means, a
> database with a set of tables maintained by entirely different packages,
> b
> > So there you have it. It very well may be that there is exactly one use
> case for this package, but who doesn't need to keep track of users and
> groups? Other than that it does a passable job of applying hand-written
> linear database upgrades, and it is short.
>
> that it is, and the su
A SQLAlchemy dialect that can be used to read OpenEdge 10 (aka
Progress) databases over ODBC.
I only use it to read from the database so although it is useful it is
certainly incomplete. There is enough there to make queries against
reflected tables.
It was remarkably easy to implement against S
On Dec 21, 6:27 pm, gizli wrote:
> Hi all,
>
> This is only for people who use the zope extension for SA (http://
> pypi.python.org/pypi/zope.sqlalchemy). Consider the following:
>
> for task in conn.query(Task):
> conn.begin_nested()
> try:
> conn.delete(task)
>
I need schema support and "it works at all" support in MySQL, so I had
to change these things. It was'n't "character_Set_results" it was
"character_set_results". The older MySQL 4? doesn't have this value at
all. Hopefully I will be fully upgraded in a few weeks.
MySQL 4.0.24:
show variables lik
P.S. My application uses reflection. For MySQL it would make so much
sense to combine "table exists" with "show me the table", since they
are the same request. We should cache the result.
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
20 matches
Mail list logo