[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 are

[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 =

[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 using:

[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 t...@twopeasinabucket.com 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

[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

[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: 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 rand...@tnr.cc wrote: SA, without a transaction in progress

[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 I

[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) has

[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):

[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

[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 this in a

[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

[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 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'))

[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 rickmorri...@gmail.com 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

[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 mtr...@gmail.com wrote: Hi, On Wed, Jan 7, 2009 at 10:43 PM, Jaimy Azle jaimy.a...@gmail.com wrote: Hi, it seems mssql wrapper for pymmsql DBAPI

[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 szybal...@gmail.comwrote: On Fri, Jan 9, 2009 at 4:46 PM, Rick Morrison rickmorri...@gmail.com wrote: The MSSQL connection string changed for the 0.5 final release. In particular, the dsn keyword is removed, and the pyodbc connection

[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 applications,