...python setup.py test probabyl would, but only for the test run.
Might be worth mentioning in README.unittests that you need to manually
install nose...
cheers,
Chris
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group,
Michael Bayer wrote:
Chris Withers wrote:
...python setup.py test probabyl would, but only for the test run.
Might be worth mentioning in README.unittests that you need to manually
install nose...
this is not clear enough ?
As of 0.5.5, unit tests are run using nose. Documentation
Okay, so, this is convoluted and painful.
We have a project where we use a single table inheritence setup to model
reports. Each report has email addresses to send it to, when to run it,
etc, but is mapped to an individual class for the implementation of what
goes into the report.
Now, to
Michael Bayer wrote:
I reworked your mixin system in rae3ec57eea8c to fully traverse all of
cls.__mro__ every time and to be very explicit about rules for the current
class vs. classes that we definitely know are mixins. So the above works
as well as if you just put the ComputedMapperArgs on
Michael Bayer wrote:
Chris Withers wrote:
I see how you've fixed this for 0.6, but it makes me wonder why the
__table_args__ check is there at all? They're essentially benign, right?
(since in the test case above, it really doesn't make sense for Specific
to have __table_args__ inside
Hi Again,
So here's a test case ready to drop onto the end of test_declarative.py:
def test_mapper_args_single_table(self):
class TableNameMixin:
@classproperty
def __tablename__(cls):
return cls.__name__.lower()
class CommonColumns:
Michael Bayer wrote:
are you wondering*why* this happens ? its because your mixin is
giving all classes a __tablename__.
Well, that's only a symptom of the problem, here's another example:
def test_mapper_args_single_table(self):
class CommonColumns:
id =
Hi All,
I have a big set of queries provided as raw sql like:
SELECT somestuff FROM somewhere
WHERE some_date = :from_date AND some_date = :to_date
That's fine, I just blat it at session.execute and provide from_date and
to_date in the params dict.
However, they now wany to supply
Michael Bayer wrote:
you have to rewrite your SQL to support the number of values in the IN clause
for each parameter set.
Hmm :'(
While my code knows the number of values, they don't, and it may vary
from when they write the SQL to when that SQL gets executed by my code...
Chris
--
You
Tony wrote:
I was trying to copy a MS Sql server database to a Sqlite database
(with SA 5.8),
How? What code were you using?
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are
Michael Bayer wrote:
On Mar 12, 2010, at 6:54 AM, Chris Withers wrote:
Got this error this morning:
File
/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.8-py2.5.egg/sqlalchemy/orm/session.py,
line 247, in _assert_is_active
The transaction is inactive due to a rollback
Michael Bayer wrote:
On Mar 12, 2010, at 6:54 AM, Chris Withers wrote:
Got this error this morning:
File
/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.8-py2.5.egg/sqlalchemy/orm/session.py,
line 247, in _assert_is_active
The transaction is inactive due to a rollback
Michael Bayer wrote:
The first official 0.6 release of SQLAlchemy is now available.
Yay! Congrats :-)
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the
Michael Bayer wrote:
the MySQL string types support MySQL's collation flags so you can get
close to it for at least that platform. But then you aren't platform
independent.
Not sure why you're so averse to creating types. The interface could not
be simpler. When i used Hibernate, there was
Michael Bayer wrote:
Please let me know if there's a better way!
you should use TypeDecorator.load_dialect_impl(dialect), check the name of
the dialect,
Why the name rather than doing:
if isinstance(dialect,MySQLDialect):
?
then return either MSString(arguments) or
Hi All,
Are there any other docs for using and creating TypeDecorators than these:
http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#custom-types
The following sections:
http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#sqlalchemy.types.TypeDecorator.__init__
Michael Bayer wrote:
http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#sqlalchemy.types.TypeDecorator.__init__
...are a little less detailed than they could be ;-)
Let me talk to one of our committers to see if they can help us.
Hey Chris - want to beef up the docs for
Michael Bayer wrote:
the whole ugly discussion is at http://www.sqlalchemy.org/trac/ticket/1759
Speshul...
*sigh*
I'm glad I don't have your responsibilities ;-)
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
--
You
to mongodb :)
On Apr 15, 2010, at 10:46 AM, Chris Withers wrote:
Michael Bayer wrote:
you have to rewrite your SQL to support the number of values in the IN clause
for each parameter set.
Hmm :'(
While my code knows the number of values, they don't, and it may vary from when
they write
Michael Bayer wrote:
Any serious ideas or should I just go sulk in the corner?
you have to use IN, and you have to generate the SQL every time based on the
number of values you'd like to put into the IN.
Does SA have any helper code anywhere for this?
Chris
--
You received this message
Chris Withers wrote:
raise exc.InvalidRequestError(Can't reconnect until invalid
transaction is rolled back)
sqlalchemy.exc.InvalidRequestError: Can't reconnect until invalid
transaction is rolled back
Asking here as it sounds like it might be related.
It occurred transiently, though
Michael Bayer wrote:
we have the in_() construct. It should be in the ORM and SQL expression
tutorials:
t1 = Table('mytable', metadata, Column('foo', String))
select([t1]).where(t1.c.foo.in_(['a', 'b', 'c']))
However, that requires table/column objects which I don't have.
Are the innards
Diana Clarke wrote:
I'm a bit hesitant to share what I've done, b/c it's still a work in
progress etc, but here goes:
MySQL MyISAM, wait_timeout=28800
You have no transactions, so I'm not sure why you're worrying about
them... Switch to InnoDB if you want transactions...
Finally,
Laurence Rowe wrote:
Chris,
This is what the combination of repoze.tm2/transaction and
zope.sqlalchemy does for you. You don't have to do anything special
other than that.
It doesn't do the .remove().
BFG currently has a bit of horribleness to make that work.
I'd like to get rid of it or make
jason kirtland wrote:
On Wed, Apr 28, 2010 at 7:52 AM, Chris Withers ch...@simplistix.co.uk wrote:
Diana Clarke wrote:
Finally, we're using pylons and are removing the contextual session in the
finally clause of the base controller's __call__ method.
class BaseController(WSGIController
Daniel Robbins wrote:
Let's say that when a database record is added or updated, I need to
perform some arbitrary action (in my case, ensuring that data in other
tables is consistent with what is being committed.)
What mechanisms are suggested for this?
Mapper extesions:
Michael Bayer wrote:
If finishing with a .remove() is a big deal in your environment, which
it seems like it is, you could do a .remove() at the start of the
request instead.
You really don't need the remove() if you have definitely called
commit() or rollback() last, and you have
Michael Bayer wrote:
if your application keeps a handle on objects after the request is
complete, and then passed them somewhere else, like a background thread or
something, then the subsequent request is going to be potentially touching
those objects at the same time. This would all be pretty
Laurence Rowe wrote:
On Apr 28, 4:38 pm, Chris Withers ch...@simplistix.co.uk wrote:
Laurence Rowe wrote:
Chris,
This is what the combination of repoze.tm2/transaction and
zope.sqlalchemy does for you. You don't have to do anything special
other than that.
It doesn't do the .remove().
BFG
Michael Bayer wrote:
Are the innards of in_ exposed anywhere for public consumption or should
I avoid?
from sqlalchemy.sql import column
column(anything_you_want).in_(['a', 'b', 'c'])
Thanks, that's exactly what I was looking for...
Chris
--
You received this message because you are
Michael Bayer wrote:
(I'm guessing session.merge will whine if handed an object that is
already in another session?)
mm no merge() leaves the original unaffected. it copies state to an
instance internal to the session. this is very clear here:
Hi All,
I want our production systems to start caring about the versions of
their schemas. sqlalchemy-migrate was the first project I came across
which addresses this. What other projects should I look at in this area,
or is sqlalchemy-migrate the obvious choice?
If it is, how can I, in my
Michael Bayer wrote:
sqlalchemy-migrate is the obvious choice.I am also developing a micro-migrations system called Alembic (http://bitbucket.org/zzzeek/alembic)
If we start with sqlalchemy-migrate, do you reckon switching to Alembic
when it's mature would be feasible?
Chris
--
emanuele.fan...@gmail.com wrote:
This way the program works, but it's very slow.
There are any way to speed up the process, the text file contains
400.000 record and it's 72 MB.
Use your databases method for loading from a file (eg: MySQL's load
data infile)
Write a python script to get your
Michael Bayer wrote:
It's not clear that Alembic has real advantages over Migrate. Its
simpler for sure since it only is for SQLA 0.6 and up and doesn't
attempt to do the crazy things Migrate does like versioning SQLite
databases. I'm going to attempt to handle branching (but already
that
Michael Bayer wrote:
yes, but I'd rather you keep working on declarative Mixin issues :) (there's
more in trac).
I haven't had any notifications :-/
Feel free to assign the ones you're thinking of to me and I'll try and
take a look...
Chris
--
Simplistix - Content Management, Batch
Hi all,
Is there any harm in using scoped_session in a single threaded environment?
cheers,
Chris
--
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,
Hi All,
We currently run unit tests against sqlite in memory but deploy against
MySQL.
http://stackoverflow.com/questions/2716847/sqlalchemy-sqlite-for-testing-and-postgresql-for-development-how-to-port
...suggests this is a bad idea. I'm inclined to agree, but...
...running our unit tests
Michael Bayer wrote:
How do people get around this? What's best practice in this area?
your test suite ideally wouldn't be tearing down and building up tables many times.
Correct ;-)
For an application where the testing is against a fixed set of tables (i.e.
not at all like SQLA's own
if 'sqlite' not in str(engine.url)
...seems a little clunky to me ;-)
Chris
--
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
Michael Bayer wrote:
engine.dialect.name in ('postgresql', 'mysql')
Heh, so no API to future proof my code for when the Oracle connector
becomes 2 phase? ;-)
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
--
You
Hi All,
We have engines set up like:
engine1 = create_engine('mysql://username:passw...@server/db1')
engine2 = create_engine('mysql://username:passw...@server/db2')
..and then have them bound to separate sessions, with separate model
classes mapped to them.
Now, mysql supports cross
Hi All,
I'm looking for examples of MapperExtensions.
Specifically, I'm looking to implement one that creates new rows when
certain attributes of an object changes.
I'm not sure if this is the right approach, so here's some pseudocode of
how I'd like to use the end result:
class
Just bumped into these questions which I still don't understand :-S
Chris Withers wrote:
I use setup/teardowns like this for this purpose (assume
scoped_session, which yes you should probably use all the time so that
the session is accessed by a single reference):
Where do you actually drop
Michael Bayer wrote:
We have engines set up like:
engine1 = create_engine('mysql://username:passw...@server/db1')
engine2 = create_engine('mysql://username:passw...@server/db2')
..and then have them bound to separate sessions, with separate model classes
mapped to them.
Now, mysql supports
Hi All,
Is it legit/okay/bad to do things in a MapperExtension's before_insert
and/or before_update methods?
Specifically, the following:
- change the primary key of the instance by deleting it so that the
dataabse assigns a new primary key?
- do a query to update an existing row? (where
Dan @ Austria wrote:
Is sqlalchemy the most prominent orm for python?
yes.
Is it suitable to
write larger enterprise applications?
yes.
Are there any drawbacks to
sqlalchemy?
sure, as with any piece of software...
Are there any other big orm projects for python, which one
should
Michael Bayer wrote:
Specifically, the following:
- change the primary key of the instance by deleting it so that the dataabse
assigns a new primary key?
that wont work. you need to take the object and call make_transient() on it, re-add it to the session.
Where is make_transient
Michael Bayer wrote:
for thing in session.query(MyThing).all():
... print x.id, x.name, x.value, x.valid_from, x.valid_to
1, 'foo', 100, 2010-06-29 09:00, 2010-06-29 09:05
2, 'foo', 200, 2010-06-29 09:05, None
`x` used to correspond to the row with id of 1, but now corresponds to the row
Michael Bayer wrote:
- I take it there are no problems with specifying multiple extensions to
sessionmaker? (we need zope.sqlalchemy's extension too) What effect does order
of extensions have?
calls them in order
heh, so what order to put 'em in? I'm guessing zope.sqlalchemy's one
should
...I think I may want to use session.query(...).options(...) to work
with the versioning stuff I'm working on to express queries along the
lines of:
- tell me what the state of play was at 2pm yesterday
- give me back new revisions of all objects between 2pm and 4pm yesterday
- give me one
Michael Bayer wrote:
The recursion overflow is fixed and make_transient now removes expiration
flags. In the latest tip you can now say:
session.expire(object, ['id'])
make_transient(object)
or alternatively:
make_transient(object)
object.id = None
and the
Hi All,
Suppose I have packageA that defines:
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class User(Base)
__tablename__ = 'user'
...
Now, I have a packageB that defines:
from sqlalchemy.ext.declarative import declarative_base
Base =
Mike Lewis wrote:
I'm trying to do some DDL creation with declarative base. THe problem
I am running into is that I'm using a mixin, and it seems that the
order the columns are being created in is different than the order
they're declared with. Is there any way to control this?
Please
Michael Bayer wrote:
I'd welcome any patches in this regard since I don't usually deal with the
mixin feature.
fine, how about Chris works up the unit test for it:
Done and pushed back to tip with the fix.
cheers,
Chris
--
You received this message because you are subscribed to the
Carl Brewer wrote:
In sqlite I hand-hacked a change to the table that needed changing,
adding a field (which is not a linked field in any way), using
alter table riders add gender string(1)
That's fair enough, although you might look at the sqlalchemy-migrate or
alembic packages for more
Hi All,
I'm looking to use:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/DropEverything
Sadly, the recipe uses hard-coded sql which doesn't work with MySQL.
I'd like to change it so that it's database-agnostic like the rest of
SQLAlchemy.
My hunting has lead me to:
Chris Withers wrote:
Hi All,
I'm looking to use:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/DropEverything
Sadly, the recipe uses hard-coded sql which doesn't work with MySQL.
I'd like to change it so that it's database-agnostic like the rest of
SQLAlchemy.
My hunting has lead me
Chris Withers wrote:
Well, my current attempt is:
from sqlalchemy.engine import reflection
from sqlalchemy.schema import (
MetaData,
Table,
DropTable,
ForeignKeyConstraint,
DropConstraint,
)
conn = engine.connect
Michael Bayer wrote:
why don't you create a ForeignKeyConstraint that only has the name field ?
DropConstraint doesn't need anything more than just the name.
'cos I don't know what I'm doing ;-)
also here, again we only need a name. Make yourself a fake table:
t = Table(table_name,
Hi All,
This recipe:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/GlobalFilter
...blows up as follows in SA 0.6.1 on Python 2.6 around here:
parents = session.query(Parent).\
options(
TemporalOption(
datetime.datetime(2009, 10, 16, 12, 00, 00),
Michael Bayer wrote:
frozendict has a union() method. query._params = query._params.union(...)
Okay, I've updated the GlobalFilter and DropEverything recipes :-)
Chris
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group,
Michael Bayer wrote:
The recursion overflow is fixed and make_transient now removes expiration
flags. In the latest tip you can now say:
session.expire(object, ['id'])
make_transient(object)
or alternatively:
make_transient(object)
object.id = None
and the
Michael Bayer wrote:
- Declarative mixins can do everything now. You need to use sqlalchemy.util.classproperty in most cases to do it.
Cool, but the spelling is a little cumbersome:
class MyMixin:
@classproperty
def type_(cls):
return Column(String(50))
It'd feel more
Michael Bayer wrote:
mixin(foo) is the most practical of the ideas above, but someone can easily
create that themselves.
Indeed,, I was just wondering if this should be in the core and the
recommended way of doing this?
Chris
--
You received this message because you are subscribed to the
Michael Bayer wrote:
Did this make it into 0.6.2?
If so, I'll update the recipe...
yeah and the recipe should be up to date.
Cool :-)
Chris
--
Simplistix - Content Management, Batch Processing Python Consulting
- http://www.simplistix.co.uk
--
You received this message
Michael Bayer wrote:
can you try out the latest hg tip for me please, I still feel like releasing
this today:
http://hg.sqlalchemy.org/sqlalchemy/archive/default.tar.gz
I've got a brown bag you can borrow if it's that serious ;-)
Chris
--
Simplistix - Content Management, Batch Processing
Hi All,
I'm working on a variation of this recipe:
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/VersionedRows
...and I've got a couple of questions about changed objects:
- do objects end up in session.dirty as a result of attributes being set
or changed?
For example:
class
zende wrote:
Base.metadata.drop_all() completely blocks in the tearDown method of
some of my tests.
What database backend are you using *in the tests*?
Where is the code blocking? (ie: when you hit ctrl-c, you should get a
traceback, it would be handy to see that...)
cheers,
Chris
--
Oliver Beattie wrote:
@property
def is_visible(self):
return (self.enabled and not self.is_deleted)
This can clearly be mapped quite easily to SQL expression
`Klass.enabled == True Klass.is_deleted == False`
You could always add a class-level attribute that stored this...
thatsanicehatyouh...@mac.com wrote:
This is a bit tricky to explain. Imagine I have one database, and I create a
project (1) to work with that database (connections, table class definitions,
etc.). That is standalone (to me). I have another completely separate database
(2) on another host
King Simon-NFHD78 wrote:
@hybrid
def is_visible(self):
return (self.enabled == True) (self.is_deleted == False)
Yeah, having to write something that works as both plain python and a
sql layer construct seems a little brittle.
I wonder if a decorator could be knocked up which would
Hi All,
I'm a bit surprised to find that you have to ask for the new C
extensions in 0.6 to be explicitly compiled.
It also appears that the way of requesting this isn't compatible with
build tools like a pip requirements file or buildout.
What was the reason for that? If it was purely in
Hi All,
Where can I find documentation of the History objects used by the orm layer?
In particular, how come each of .added, .unchanged and .deleted is a
sequence?
Are history objects always around or is there a performance hit for
using them?
cheers,
Chris
--
You received this message
Hi All,
My flow of questions continues ;-)
What's the difference beween make_transient(instance), where I guess
make_transient comes from sqlalchemy.org, and session.expunge(instance)?
cheers,
Chris
--
You received this message because you are subscribed to the Google Groups
sqlalchemy
Chris Withers wrote:
Hi All,
My flow of questions continues ;-)
What's the difference beween make_transient(instance), where I guess
make_transient comes from sqlalchemy.org,
...er, that's sqlachemy.orm...
Chris
--
You received this message because you are subscribed to the Google Groups
Lance Edgar wrote:
- do objects end up in session.dirty as a result of attributes being
set or changed?
Setting an attribute is enough for the instance to wind up in
Session.dirty, according to
http://www.sqlalchemy.org/docs/reference/orm/sessions.html#sqlalchemy.orm.session.Session.dirty
Michael Bayer wrote:
http://svn.zope.org/zope.interface/trunk/setup.py?view=auto
we wanted to annoy buildout/setuptools/Glyph as much as possible, and I am
happy to say we succeeded.
I hope you're joking :-S
The issue of them not building by default wasn't that they might not build, just
Michael Bayer wrote:
Not sure if we'd want to change this default midway through 0.6 or wait til 0.7.
Fair enough, but this is sadly one of those things where you're only likely to find the
edge cases when you do make it on by default...
The C exts also don't improve performance that much
Hi All,
Say we have the following model:
class Price(Base):
__tablename__ = 'price'
id = Column(Integer, primary_key=True)
value = Column(Numeric(precision=36, scale=12))
class Instrument(Base):
__tablename__ = 'instrument'
id = Column(Integer, primary_key=True)
ticker
Michael Bayer wrote:
class Allocation(Base):
__tablename__ = 'data'
id = Column(Integer, primary_key=True)
trade_id = Column(Integer, index=True)
instrument_id = Column(ForeignKey(Instrument.id))
instrument = relationship(Instrument)
quantity = Column(Integer)
price_id =
Hi All,
Does anyone have any good examples of migration scripts?
The documentation is surprisingly sparse..
Of course, an alernative which doesn't do any abusive monkey patching or
have any annoying * imports would be handy. Michael, how's Alembic coming?
Chris
--
You received this message
Michael Hipp wrote:
SQLAlchemy seems pretty smart about updating only the changed columns in
an orm object...
If I have an orm object. Something changes one of the columns. Just
before I commit() the session, is there a way to tell which columns will
be updated vs those that are unchanged?
avdd wrote:
I'm glad you brought this up. It seems to me that the the declarative
instrumentation keys classes by their unqualified class name,
precluding using the same class name for different declarative
subclasses (ie, in different modules).
Indeed, but I suspect there's more to it than
Michael Bayer wrote:
There's a long term plan to allow plugins that would provide attribute
instrumentation and Session persistence services to objects that are persisted
by a non-SQL database.
I guess at this point you'd need to drop 'SQL' from 'SQLAlchemy' ;-)
Chris
--
Simplistix -
Hi All,
For the following model:
class Header(Base):
__tablename__ = 'header'
id = Column(Integer, primary_key=True)
message_id = Column(Integer,ForeignKey('message.id'))
name = Column(String(50))
value = Column(Text(255))
sqlalchemy-migrate's SchemaDiff tool against the
Michael Bayer wrote:
How can it be changed so that the column reflected from the DB and the column
calculated from the model end up being the same?
if schemas are being diffed, types can be compared generically using type
affinity. This is described at:
Hi All,
I'm trying to solve a hierarchical access control problem, both on the
storage and querying side.
So, say I have a tree of content:
/
/a/
/a/1
/a/2
/b/
/b/1
/b/2
I want to be able to express and search on the following types of
requirements:
User X should be able to access all
On 08/09/2010 19:23, Gunnlaugur Briem wrote:
http://communities.bmc.com/communities/docs/DOC-9902
Thanks for all of the references, but this one in particular.
Materialized paths looks like its the closest to what I'm after.
However, with materialized paths, I'm wondering with a structure
Conor wrote:
SELECT EXISTS (SELECT 1 FROM access_control WHERE (path = '/a' OR path LIKE
'/a/%') AND user = :user AND permission = :permission)
Most materialized path queries use LIKE a lot. As long as you keep the %
character at the end, a good DB will be able to use an index to speed up
Hi All,
Give the following model:
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.types import Integer
Base = declarative_base()
class Model(Base):
__tablename__='test'
id = Column(Integer, primary_key=True)
col = Column(Integer)
...the following code will
On 13/09/2010 22:37, NiL wrote:
Has anyone tried ti implement this ? a working solution ? willing to
participate in a effort to provide a solution ?
Isn't this something better suited to the application framework rather
than the database framework (ie: not SQLAlchemy)?
cheers,
Chris
--
On 13/09/2010 18:02, Chris Withers wrote:
What ensures obj.id will be unique and will it always be unique, even in
the case of high volumes of parallel writes to the database? Does it
depend on the back end? Are any backends known not to work this way?
In short, the unique constrant
On 15/09/2010 15:04, Nikolaj wrote:
Base = declarative_base()
class Person(Base):
__tablename__ = 'people'
name = Column(String, primary_key=True)
@classproperty
def bar(cls):
return cls.foo
Can you explain why you'd want to do something like this?
Chris
--
On 16/09/2010 11:49, phasma wrote:
session imported from Meta ? If use Meta.Session.execute it's returns
RowProxy, which has no lastrowid parameter.
Try this:
with meta.Session:
result = meta.Session.execute(INSERT statement)
print result.lastrowid
cheers,
Chris
--
Simplistix -
Hi All,
As part of looking into #1919, I see that if a table of the same name as
the one passed to tometadata already exists in the destination metadata,
then the table object passed in is ignored and the one already there is
returned.
That feels wrong to me. In the event there's already a
On 16/09/2010 20:26, Michael Bayer wrote:
As such, I'd expect an exception to be raised rather than the other table
object being returned. What do people feel about this?
Im fine with tometadata raising for 0.7. a warning for 0.6 perhaps.
Cool, done for 0.6. Where should I make the
Hi All,
I'm wondering if there's a reason why Index doesn't play the sames that
ColumnCollectionConstraint does to allow columns names instead of column
objects to be parsed?
Why? Well, 'cos I'd like to do:
from sqlalchemy import *
metadata = MetaData()
mytable = Table('user', metadata,
On 04/10/2010 13:16, Mark Erbaugh wrote:
If I were doing this in SQL, I would to the first command as
SELECT count(*)
FROM period
WHERE period.cycle = ?
Why would you do this first?
Chris
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post
On 04/10/2010 22:53, Bryan wrote:
I'm having trouble converting this SQL into an ORM statement.
DATE_ADD(datecol, INTERVAL(1 - DAYOFWEEK(datecol)) DAY)
This is as far as I can get, which is basically nowhere. The second
argument to date_add requires literal strings INTERVAL and DAY,
but I
1 - 100 of 418 matches
Mail list logo