Michael Bayer skrev:
> Johan Hahn wrote:
> > Say I was about to make a telephone book database. I
> > would need four columns: id, first name, last name, and
> > phone number.
> >
> > Table('telephone_book', metadata,
> > Column('id', Integer, primary_key=True),
> > Column('first', Unicode(1
On 11/29/06, Nebur <[EMAIL PROTECTED]> wrote:
>
> (SOLVED!) This message is just for the case that someone gets the above
> error message and searches this group.
> I had it today, and the reason was a missing "Integer" in table Column
> creation, like that:Column("aggrby", ForeignKey(
psycopg2 needs to be installed.
--~--~-~--~~~---~--~~
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 [EM
Hi,
I've installed SQLalchemy and I've tried to connect to mysql db, and
all run correctly.
But, If I try to connect to a postgres db I receive thi message:
>>> from sqlalchemy import *
>>> db = create_engine('postgres://mando:[EMAIL PROTECTED]:5432/mydb')
Traceback (most recent call last):
Fi
(SOLVED!) This message is just for the case that someone gets the above
error message and searches this group.
I had it today, and the reason was a missing "Integer" in table Column
creation, like that:Column("aggrby", ForeignKey("sim_biobj.id"),
nullable=False)
instead of:
Column("agg
Johan Hahn wrote:
> I've been using sqlachemy for a month and I like it so far.
> Documentation could have been more precise IMO, it is
> confusing that the indroduction discusses so many ways
> to do the same things. Im partly confused since my prior
> experience with orm tools is limited.
the
no convenient way to do that right now, youd have to use a bind
parameter:
select("name=:somebind", somebind=':foo')
to enable what you want to do directly would require the parsing that
locates ':bind' tokens to be more intelligent about quotes, we can add
a ticket for that if you like.
--~--
Hello,
for a somewhat more complex query I need to specify the where clause
explicitly when selecting objects of a mapped class. Now how would one
include constants with a colon in such a query?
like:
session().query(myclass).select("name = ':foo'")
Any ideas?
--
Cheers, Sol.
--~--~-~
Hi
I've been using sqlachemy for a month and I like it so far.
Documentation could have been more precise IMO, it is
confusing that the indroduction discusses so many ways
to do the same things. Im partly confused since my prior
experience with orm tools is limited.
Say I was about to make a
Michael Bayer ha scritto:
>
> Manlio Perillo wrote:
>> For now I'm using this:
>>
>> class TimeDelta(types.TypeEngine):
>> def __init__(self, precision=6):
>> self.precision = precision
>>
>> def get_col_spec(self):
>> return "INTERVAL(%(precision)s)" % {'precision': s
Manlio Perillo wrote:
> For now I'm using this:
>
> class TimeDelta(types.TypeEngine):
> def __init__(self, precision=6):
> self.precision = precision
>
> def get_col_spec(self):
> return "INTERVAL(%(precision)s)" % {'precision': self.precision}
>
does psycopg2 take/
oops, useless line, took it out.
--~--~-~--~~~---~--~~
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 [E
Michael Bayer ha scritto:
> ive never seen this type used before but it appears to be part of the
> SQL standard, so if someone submits a patch it will go in.
>
psycopg2 support interval out of the box, so adding support for it
should be very easy (I'm not able to submit a patch since I'm not a
ram ha scritto:
> As far as I know, sqlite will "support" just about any datetime type
> you want, including fractional seconds.
>
> I put the word "support" in quotes because sqlite doesn't really HAVE a
> date, time, or datetime type -- it stores all of those items as
> strings, and will then a
14 matches
Mail list logo