hi
i have
class X(object):
X.__init__ = setattr_kargs
where
def setattr_kargs( *args, **kargs):
assert len(args)==1
x = args[0]
for k,v in kargs.iteritems(): setattr( x, k, v)
when SA comes to play, it fails to find a 'self' in __init__
arguments.
in format_argspec_plus(),
thanks
sandro
*:-)
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
Hi,
is there a way to say to a session to forget all the changes to an
object without hitting the database. Expire or refresh do that but at
the prize of a new select.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
hi friends,
i wish to insert some initial data in a few management tables (like applications
groups, roles etc).
is there a way to register dml to be done after create_all ends?
i'd specifically like it to happen after the entire ddl dust reaches
to my knowledge MySQL doesn't support DEFAULT on date/time columns.
You can work with the MySQL database directly a little bit to confirm
this.
On Jun 28, 2008, at 3:18 PM, Gloria W wrote:
Hi All,
Looking back in these posts, I tried several older variants of MySQL
datetime column
On Jun 29, 2008, at 11:23 AM, sandro dentella wrote:
Hi,
is there a way to say to a session to forget all the changes to an
object without hitting the database. Expire or refresh do that but at
the prize of a new select.
there is not because for it to be generally useful, it needs to
alex bodnaru wrote:
hi friends,
i wish to insert some initial data in a few management tables (like
applications
groups, roles etc).
is there a way to register dml to be done after create_all ends?
i'd specifically like it to happen after the entire ddl dust reaches the
ground.
I am coming from the Zope world and implemented a SA integration layer
z3c.sqlalchemy. It basically provides a 'wrapper' exposing a thread-local
session as property and as a registry for mappers that can be accessed
through a getMapper(mapper_name) method. Now with the declarative layer I
am
Gloria W wrote:
Hi All,
Looking back in these posts, I tried several older variants of MySQL
datetime column initialization discussed here, and they're not
working.
This works in Postgresql:
sqlalchemy.Column('date_created', sqlalchemy.DateTime,
jason kirtland wrote:
Gloria W wrote:
Hi All,
Looking back in these posts, I tried several older variants of MySQL
datetime column initialization discussed here, and they're not
working.
This works in Postgresql:
sqlalchemy.Column('date_created', sqlalchemy.DateTime,
[EMAIL PROTECTED] wrote:
hi
i have
class X(object):
X.__init__ = setattr_kargs
where
def setattr_kargs( *args, **kargs):
assert len(args)==1
x = args[0]
for k,v in kargs.iteritems(): setattr( x, k, v)
when SA comes to play, it fails to find a 'self' in
On Jun 29, 2008, at 12:46 PM, Andreas Jung wrote:
This approach is ugly (because of putting the mapper within the local
scope into the global scope (in order to make them importable) and
because
of this code within main.py:
import model
model.setup(dsn)
from model import MyMapper,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
thanks a lot jason, now i see the metadata version of the same.
alex
jason kirtland wrote:
| alex bodnaru wrote:
| hi friends,
|
| i wish to insert some initial data in a few management tables (like
applications
| groups, roles etc).
|
| is there
This gives me an error:
sqlalchemy.Column('date_created', mysql.MSTimeStamp,
sqlalchemy.PassiveDefault(text(CURRENT_TIMESTAMP)),
nullable=False))
NameError: global name 'text' is not defined
--~--~-~--~~~---~--~~
You received this message because you are
Gloria W wrote:
This gives me an error:
sqlalchemy.Column('date_created', mysql.MSTimeStamp,
sqlalchemy.PassiveDefault(text(CURRENT_TIMESTAMP)),
nullable=False))
NameError: global name 'text' is not defined
from sqlalchemy import text
--On 29. Juni 2008 16:57:16 -0400 Michael Bayer [EMAIL PROTECTED]
wrote:
On Jun 29, 2008, at 12:46 PM, Andreas Jung wrote:
This approach is ugly (because of putting the mapper within the local
scope into the global scope (in order to make them importable) and
because
of this code within
Hi,
With direct sql statement, dividing 2 columns with CAST provide a good
result (-- 1/2 = 0.5 and not 0).
SELECT * , CAST(Mytable.colB AS FLOAT) / CAST(Mytable.colC AS
FLOAT) AS CALCUL FROM Mytable
When using a SA query with add_column, the result is not correct
whether we use cast() or not
17 matches
Mail list logo