[sqlalchemy] Re: MS SQL wrapper for pymssql DBAPI broken in 0.5.0

2009-01-09 Thread TJ Ninneman
Thanks Michael, I appreciate it. > As mentioned previously, pymssql support is no where near the level > of support as pyodbc. In addition the maintainer has not updated > this library for several years. Finally, Microsoft warns against > it's use going forward, "When writing new application

[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0

2009-01-09 Thread Michael Trier
Hi, On Sat, Jan 10, 2009 at 12:10 AM, Lukasz Szybalski wrote: > > On Fri, Jan 9, 2009 at 4:46 PM, Rick Morrison > wrote: > > The MSSQL connection string changed for the 0.5 final release. In > > particular, the "dsn" keyword is removed, and the pyodbc connection > string > > now expects the DSN t

[sqlalchemy] Re: MS SQL wrapper for pymssql DBAPI broken in 0.5.0

2009-01-09 Thread Michael Trier
Hi, On Fri, Jan 9, 2009 at 12:45 PM, t...@twopeasinabucket.com < t...@twopeasinabucket.com> wrote: > > On Jan 7, 10:41 pm, "Michael Trier" wrote: > > Hi, > > > > On Wed, Jan 7, 2009 at 10:43 PM, Jaimy Azle > wrote: > > > > > Hi, > > > > > it seems mssql wrapper for pymmsql DBAPI driver in sqlal

[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0

2009-01-09 Thread Lukasz Szybalski
On Fri, Jan 9, 2009 at 4:46 PM, Rick Morrison wrote: > The MSSQL connection string changed for the 0.5 final release. In > particular, the "dsn" keyword is removed, and the pyodbc connection string > now expects the DSN to be named where the "host" was previously placed, so > the new connection U

[sqlalchemy] Re: Self-Referential Mapping with Base?

2009-01-09 Thread MikeCo
I spent some time understanding this a little while ago. Here is the construct you need (thanks to Michael Bayer for making it clear for me) # D self referential class D(Base): __tablename__ = 'D' id = Column(Integer, primary_key=True) id_d = Column(Integer, ForeignKey('D.id')) n

[sqlalchemy] Re: postgres autocommit

2009-01-09 Thread Randall Smith
Michael Bayer wrote: > I think with your project specifically, that of reading lots of > information during a reflection process given a single Connection, we > probably want to look into establishing transactional boundaries for > the reflection process, because in that case you do have the

[sqlalchemy] Re: Self-Referential Mapping with Base?

2009-01-09 Thread Darren Govoni
Hi, Thanks for the response. I'm still fairly new to SA but am very impressed with this package! I tried a variety of combinations of mappings. If I use just the parent_id,parent it would seem to make sense logically if my children only have one parent. The tables generate fine. But when I try

[sqlalchemy] Re: Self-Referential Mapping with Base?

2009-01-09 Thread Michael Bayer
On Jan 9, 2009, at 7:42 PM, project2501 wrote: > > Hi, > I'm trying to create a mapped class that allows parent/child > relation of itself. I've spent the last 3 hours searching and reading > the other posts on this, but can't get anything to work. > > I'm on 0.5rc4 and just want to declare thi

[sqlalchemy] Re: MySQL longtext column type

2009-01-09 Thread Michael Bayer
Ive created ticket #1275 in trac: http://www.sqlalchemy.org/trac/ticket/1275 for this issue, but our MySQL maintainer Jason Kirtland explains there that the TEXT type in MySQL does in fact handle values up to 4294967295 for length, which on the MySQL side will automatically perform the tra

[sqlalchemy] Self-Referential Mapping with Base?

2009-01-09 Thread project2501
Hi, I'm trying to create a mapped class that allows parent/child relation of itself. I've spent the last 3 hours searching and reading the other posts on this, but can't get anything to work. I'm on 0.5rc4 and just want to declare this in a mapped class as such: class Conversion(Base): __t

[sqlalchemy] Re: postgres autocommit

2009-01-09 Thread Michael Bayer
On Jan 9, 2009, at 6:05 PM, Randall Smith wrote: > > There are two problems I see with this. > > 1. The session's view of the database is inconsistent, depending on if > and when queries that modify records are used. Every time a commit is > issued the view of the database (in terms of MVCC) ha

[sqlalchemy] Re: postgres autocommit

2009-01-09 Thread Randall Smith
Jon Nelson wrote: > An alternate solution is to use begin rollback for statements that > (aren't supposed to) update data, like (most) select statements. > That's even cheaper than calling commit usually. There is no begin method in the DBAPI. You could call rollback instead of commit, but

[sqlalchemy] Re: postgres autocommit

2009-01-09 Thread Jon Nelson
An alternate solution is to use begin rollback for statements that (aren't supposed to) update data, like (most) select statements. That's even cheaper than calling commit usually. On Fri, Jan 9, 2009 at 5:05 PM, Randall Smith wrote: > > SA, without a transaction in progress will call commi

[sqlalchemy] postgres autocommit

2009-01-09 Thread Randall Smith
SA, without a transaction in progress will call commit on the database connection when it detects an INSERT, UPDATE, DELETE, CREATE, etc. This is it's "autocommit" mode. The relevant code is: if context.should_autocommit and not self.in_transaction(): self._commit_impl()

[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0

2009-01-09 Thread Rick Morrison
The MSSQL connection string changed for the 0.5 final release. In particular, the "dsn" keyword is removed, and the pyodbc connection string now expects the DSN to be named where the "host" was previously placed, so the new connection URL would be: mssql://username:passw...@mydbodbc For fine-g

[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0

2009-01-09 Thread Lukasz Szybalski
On Fri, Jan 9, 2009 at 4:18 PM, TJ Ninneman wrote: > > > On Jan 9, 2009, at 3:58 PM, TJ Ninneman wrote: > >> >> Since I've been having troubles with pymssql and 0.5.0 I thought I >> would try pyodbc on my Mac. >> >> I'm able to connect and execute sql using isql without issue: >> >> isql -v MyDbO

[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0

2009-01-09 Thread TJ Ninneman
On Jan 9, 2009, at 3:58 PM, TJ Ninneman wrote: > > Since I've been having troubles with pymssql and 0.5.0 I thought I > would try pyodbc on my Mac. > > I'm able to connect and execute sql using isql without issue: > > isql -v MyDbODBC username password > > But when I connect through SqlAlchemy u

[sqlalchemy] Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0

2009-01-09 Thread TJ Ninneman
Since I've been having troubles with pymssql and 0.5.0 I thought I would try pyodbc on my Mac. I'm able to connect and execute sql using isql without issue: isql -v MyDbODBC username password But when I connect through SqlAlchemy using: sqlalchemy.url = mssql://username:password@/?dsn=MyDbOD

[sqlalchemy] Re: MS SQL wrapper for pymssql DBAPI broken in 0.5.0

2009-01-09 Thread t...@twopeasinabucket.com
On Jan 7, 10:41 pm, "Michael Trier" wrote: > Hi, > > On Wed, Jan 7, 2009 at 10:43 PM, Jaimy Azle wrote: > > > Hi, > > > it seems mssql wrapper for pymmsql DBAPI driver in sqlalchemy 0.5.0 > > (release) is broken. I haven't check it out with adodbapi, but > > pyodbc confirmed works. > > Thanks fo

[sqlalchemy] Re: sqlite fts3

2009-01-09 Thread Michael Bayer
yeah we'd go the easy route and all that is just inside the string, i.e. sqlite_using='fts3(content)'. On Jan 9, 2009, at 7:13 AM, sol wrote: > > Found a usage example for the sqlite ftp3, it is seems like the > specification can be a little more complicated then just the USING > FTS. Here ar

[sqlalchemy] Re: SQLAlchemy 0.5 Released

2009-01-09 Thread Michael Bayer
On Jan 9, 2009, at 5:14 AM, a...@svilendobrev.com wrote: > > yeah, either something like that, or let RowProxy.__hash__ be > hash(tuple(theRowProxy)) as IMO RowProxy has same meaning as tuple: > readonly-row-ordered-in-constant-way oh, well see thats what I asked you the other day.i still l

[sqlalchemy] Re: SQLAlchemy 0.5 Released

2009-01-09 Thread Michael Bayer
On Jan 9, 2009, at 5:03 AM, King Simon-NFHD78 wrote: > # > import sys > > if sys.version_info < (2, 6): >def unhashable(self): >raise TypeError('%s objects are not hashable' % > type(self).__name__) > else: >unhas

[sqlalchemy] Re: sqlite fts3

2009-01-09 Thread sol
Found a usage example for the sqlite ftp3, it is seems like the specification can be a little more complicated then just the USING FTS. Here are examples from the webpage: CREATE VIRTUAL TABLE t USING fts3; CREATE VIRTUAL TABLE t USING fts3(); CREATE VIRTUAL TABLE t USING fts3(content); C

[sqlalchemy] Re: programming style | using sessions

2009-01-09 Thread Nebur
Right. There's not only the question about the session lifetime. "Where do happen the session modifications" seems a non-trivial question with large applications. I've tried a layer architecture. There's exactly one layer knowing of [and modifying] the session. But that architecture is broken in a

[sqlalchemy] Re: SQLAlchemy 0.5 Released

2009-01-09 Thread az
yeah, either something like that, or let RowProxy.__hash__ be hash(tuple(theRowProxy)) as IMO RowProxy has same meaning as tuple: readonly-row-ordered-in-constant-way On Friday 09 January 2009 12:03:52 King Simon-NFHD78 wrote: > > -Original Message- > > From: sqlalchemy@googlegroups.com

[sqlalchemy] Re: SQLAlchemy 0.5 Released

2009-01-09 Thread King Simon-NFHD78
> -Original Message- > From: sqlalchemy@googlegroups.com > [mailto:sqlalch...@googlegroups.com] On Behalf Of a...@svilendobrev.com > Sent: 08 January 2009 19:11 > To: sqlalchemy@googlegroups.com > Subject: [sqlalchemy] Re: SQLAlchemy 0.5 Released > > > On Thursday 08 January 2009 21:03: