[sqlalchemy] Re: How are Oracle IDs generated?

2008-02-13 Thread Waldemar Osuch
On Feb 13, 8:03 pm, Richard Jones <[EMAIL PROTECTED]> wrote: > I've tried poking through the documentation and source to determine > this, but it's still unclear to me how SQLAlchemy generates IDs for > new rows in Oracle. > > There's support for sequences in the oracle backend, but there don't

[sqlalchemy] How are Oracle IDs generated?

2008-02-13 Thread Richard Jones
I've tried poking through the documentation and source to determine this, but it's still unclear to me how SQLAlchemy generates IDs for new rows in Oracle. There's support for sequences in the oracle backend, but there don't appear to be sequences created for my tables. Richard --~--~

[sqlalchemy] DB2 driver coming

2008-02-13 Thread Rick Morrison
...surprised I didn't see it here first, but: http://antoniocangiano.com/2008/02/13/ibm-releases-db2-adapter-for-sqlalchemy/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group,

[sqlalchemy] Re: schema changes

2008-02-13 Thread Don Dwiggins
[EMAIL PROTECTED] wrote: >> This is getting into a big area: the problem of version >> control/configuration management for databases > its not any bigger than any other configuration management of > something structured that is deployed in the field... as long it > consists of pieces and these

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-13 Thread Paul Johnston
John, >I am using unixodbc-2.2.11 as packaged by Ubuntu 7.10 (gutsy) with > > That sounds very promising, I have been meaning to have a go at this for a while. Can you do me a favor and run the unit tests using your current setup? Run alltests.py and append &text_as_varchar=1 to the dburi (a

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-13 Thread John Keith Hohm
> > I'm using pyodbc on Unix. > > You are??? > > This statement jumped out of the message for me. Can you please describe > your setup to the list? There is a lot of interest in this configuration. I am using unixodbc-2.2.11 as packaged by Ubuntu 7.10 (gutsy) with locally-installed freetds-0.64

[sqlalchemy] Re: schema changes

2008-02-13 Thread sdobrev
On Wednesday 13 February 2008 22:06:54 Don Dwiggins wrote: > [EMAIL PROTECTED] wrote: > > we've put such a notion in our db, so the db knows what > > model-version it matches. Then, at start, depending on the > > versions one can decide which migration script to execute (if the > > db should be ma

[sqlalchemy] Re: schema changes

2008-02-13 Thread Don Dwiggins
[EMAIL PROTECTED] wrote: > we've put such a notion in our db, so the db knows what model-version > it matches. Then, at start, depending on the versions one can decide > which migration script to execute (if the db should be made to match > the py-model), or which feautures to drop (if py-model

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-13 Thread Rick Morrison
> I'm using pyodbc on Unix. You are??? This statement jumped out of the message for me. Can you please describe your setup to the list? There is a lot of interest in this configuration. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

[sqlalchemy] Re: pymssql delete problem

2008-02-13 Thread Rick Morrison
> Thanks for your continuing interest in my silly problem It's not a silly problem, it's a important fundamental operation that ought to work correctly! Try the attached patch against pymssql 0.8.0. --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: executing stored procedure which returns rows

2008-02-13 Thread Michael Bayer
On Feb 13, 2008, at 12:03 PM, John Keith Hohm wrote: > > I'm using and loving SQLAlchemy 0.4.3dev_r4136 but I am having a > problem with (drum roll) a legacy database schema. I'm using pyodbc > on Unix. > > The primary keys in a legacy table are alphanumeric and must be > generated by a MSSQL s

[sqlalchemy] executing stored procedure which returns rows

2008-02-13 Thread John Keith Hohm
I'm using and loving SQLAlchemy 0.4.3dev_r4136 but I am having a problem with (drum roll) a legacy database schema. I'm using pyodbc on Unix. The primary keys in a legacy table are alphanumeric and must be generated by a MSSQL stored procedure which returns a single result row with a single unna

[sqlalchemy] Re: select in

2008-02-13 Thread Rick Morrison
Heh, I have the opposite problem, I now find myself typing "in_" and "==" in interactive query editors On Feb 13, 2008 3:40 AM, Glauco <[EMAIL PROTECTED]> wrote: > Michael Bayer ha scritto: > > On Feb 11, 2008, at 6:36 AM, Glauco wrote: > > > > Hi all, > What's the simplest way for do a s

[sqlalchemy] Re: Selecting a column of a "Secondary" table

2008-02-13 Thread Michael Bayer
this is the association object pattern, as described at: http://www.sqlalchemy.org/docs/04/mappers.html#advdatamapping_relation_patterns_association with that pattern, you should specifically *not* use the "secondary" argument on your mapper as the group_user_tbl will be explicitly mapped. A

[sqlalchemy] Re: Executing sql text from session

2008-02-13 Thread Michael Bayer
On Feb 13, 2008, at 9:04 AM, maxi wrote: > > Hi, > I'm reading sqlalchemy 0.4 documentation about how execute a sql text > from session obejct. > In this example, > > Session = sessionmaker(bind=engine, transactional=True) > sess = Session() > result = sess.execute("select * from table where id=

[sqlalchemy] Re: invalid byte sequence for encoding:utf8 Postgresql

2008-02-13 Thread Michael Bayer
On Feb 13, 2008, at 2:28 AM, [EMAIL PROTECTED] wrote: > > Hello, I had a postgresql database: > CREATE DATABASE panizzolosas > WITH OWNER = postgres > ENCODING = 'UTF8'; > > and i'm using sqlalchemy 0.4.2p3. > this is my code > self.metadata=MetaData() > > engine = create_engine(stringaDA

[sqlalchemy] Selecting a column of a "Secondary" table

2008-02-13 Thread g
Say we have a many-to-many relation: mapper(Group, group_tbl, properties={'users' : relation(User, secondary=group_user_tbl) } ) group_user_tbl = Table('group_user', metadata, Column('group_id', Integer, ForeignKey('group.group_id')), Column('user_id', Integer, ForeignKey('user.user_

[sqlalchemy] Executing sql text from session

2008-02-13 Thread maxi
Hi, I'm reading sqlalchemy 0.4 documentation about how execute a sql text from session obejct. In this example, Session = sessionmaker(bind=engine, transactional=True) sess = Session() result = sess.execute("select * from table where id=:id", {'id':7}) It's only present in 0.4.x versions ? How

[sqlalchemy] Re: schema changes

2008-02-13 Thread Chris Withers
Michael Bayer wrote: > >> What if they exist but don't match the spec that SA has created? > > just try it out...create_all() by default checks the system tables for > the presence of a table first before attempting to create it Cool, > (same > with dropping). When would SA drop a table

[sqlalchemy] invalid byte sequence for encoding:utf8 Postgresql

2008-02-13 Thread [EMAIL PROTECTED]
Hello, I had a postgresql database: CREATE DATABASE panizzolosas WITH OWNER = postgres ENCODING = 'UTF8'; and i'm using sqlalchemy 0.4.2p3. this is my code self.metadata=MetaData() engine = create_engine(stringaDATABASE, encoding='utf-8', echo=False,convert_unicode=True) self.metadata.

[sqlalchemy] Re: select in

2008-02-13 Thread Glauco
Michael Bayer ha scritto: > On Feb 11, 2008, at 6:36 AM, Glauco wrote: > > >> Hi all, >> What's the simplest way for do a simple: >> >> select * from myTable where id in (1,2,3); >> >> >> >> I've solved this by using Subquery but final qry isn't pretty as >> this one. >> > > > mytable.s