Re: [sqlalchemy] Ubuntu install

2011-05-08 Thread Michael Trier
easy_install.main(['-Zmad', sitePKG, sqlalchemy]) But this gets me 0.6.6. Gets 0.6.6 if I do the above on Ubuntu 10.10 Maverick, just did the same in a VirtualBox/Win 7 machine and I get 0.6.7. That's odd. Thank you for the feedback. -- Michael Trier http://michaeltrier.com/ -- You

Re: [sqlalchemy] Support for SPARSE columns of SQL SERVER

2011-04-18 Thread Michael Trier
the SPARSE keyword. -- Michael Trier http://michaeltrier.com/ -- 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 sqlalchemy+unsubscr

Re: [sqlalchemy] short question on Table

2011-04-16 Thread Michael Trier
Does anyone know how I can add a Column to an existing not yet mapped Table? To add a column use append_column: http://www.sqlalchemy.org/docs/core/schema.html#sqlalchemy.schema.Table.append_column Note that doesn't do anything database schema wise for you. -- Michael Trier http

Re: [sqlalchemy] How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread Michael Trier
/session.html#sqlalchemy.orm.attributes.get_history -- Michael Trier http://michaeltrier.com/ -- 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

Re: [sqlalchemy] Re: Context based execution

2011-04-13 Thread Michael Trier
and also how to modify a insert statement in before_insert? This is the area of the docs that describe before_insert and other MapperExtensions. It's laid out pretty clearly and quite easy to implement: http://www.sqlalchemy.org/docs/orm/interfaces.html#mapper-events -- Michael Trier http

Re: [sqlalchemy] SQLAlchemny SAWarning - which Session Query is giving this?

2011-04-12 Thread Michael Trier
: The IN-predicate on suspiciousevents.rule_id was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate. Consider alternative strategies for improved performance. return self._in_impl(operators.in_op, operators.notin_op, other) -- Michael

Re: [sqlalchemy] Execute a function on orphan

2011-04-09 Thread Michael Trier
/interfaces.html?highlight=attributeextension#sqlalchemy.orm.interfaces.AttributeExtension -- Michael Trier http://michaeltrier.com/ -- 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

Re: [sqlalchemy] mssql 2000 Date type on sa 0.6 maps to non-existant DATE type

2010-06-08 Thread Michael Trier
On Jun 8, 2010, at 5:38 PM, Clovis Fabricio wrote: I'm connecting to mssql server 2000 through pyodbc, via FreeTDS odbc driver, on linux ubuntu 10.04. Sqlalchemy 0.5 uses DATETIME for sqlalchemy.Date() fields. Now Sqlalchemy 0.6 uses DATE, but sql server 2000 doesn't have a DATE type.

Re: [sqlalchemy] SQLAlchemy 0.6beta2 released

2010-03-21 Thread Michael Trier
Hello, On Mar 21, 2010, at 10:43 AM, Manlio Perillo wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Bayer ha scritto: SQLAlchemy 0.6beta2 is now available.This beta may be the last before the 0.6.0 final release. We've hopefully gotten every largish change into the

Re: [sqlalchemy] Re: ms sql server schema.sequence

2010-03-16 Thread Michael Trier
Hello Tan, On Mar 16, 2010, at 7:57 PM, Tan Yi wrote: I mean, I tried to debug a program, using session add() to insert new records to database after I deleted all the old records from a table. I used the schema.sequence() to build up a mapper Can anyone help? On 3月16日, 下午2时05分, Tan

Re: [sqlalchemy] Can we use dates to define a relation with the mapper ?

2010-03-04 Thread Michael Trier
Hello, On Mar 4, 2010, at 10:50 PM, Richard Lopes wrote: Hi, I have this mapper defined: mapper(Resource, resource_table, properties = {'type' : relation(ResourceType,lazy = False), 'groups' : relation(Group, secondary = model.tables['resource_group'], backref = 'resources'),

Re: [sqlalchemy] compressed version of a field

2010-03-01 Thread Michael Trier
Hello Jinal, On Mar 1, 2010, at 7:39 PM, Jinal Jhaveri wrote: I would like to store a zlib compressed version of a table field. Whats the best way to handle this where all gets to that field decompress the content and all sets to that field compresses the content You probably want to look

Re: [sqlalchemy] SQLAlchemy 0.6beta1: AttributeError: 'Text' object has no attribute 'get_col_spec'

2010-03-01 Thread Michael Trier
Hi, On Mar 1, 2010, at 8:31 PM, Gerry Reno wrote: Ok, I fixed all the boolean clause tests but now I'm getting this exception on a Text object: AttributeError: 'Text' object has no attribute 'get_col_spec' I see where the type system has been revamped but isn't get_col_spec still there?

Re: [sqlalchemy] ticket #877

2010-02-28 Thread Michael Trier
On Feb 28, 2010, at 11:21 AM, Manlio Perillo wrote: By the way, it seems there is a bug in the documentation: http://www.sqlalchemy.org/docs/reference/sqlalchemy/connections.html?highlight=create_engine#sqlalchemy.create_engine echo=False – if True, the Engine will log all statements as well

Re: [sqlalchemy] sqlalchemy 6beta1 error

2010-02-26 Thread Michael Trier
Hello, On Feb 26, 2010, at 2:32 AM, karikris...@gmail.com wrote: I could not get from sqlalchemy.databases.mysql import MSBinary working on my windows XP as well as my Ubuntu 32 and 64 bit machines. Are they dropped? Here are summary ActivePython 2.6.0.0 (ActiveState Software Inc.)

Re: [sqlalchemy] server_version_info

2010-02-24 Thread Michael Trier
Hello, On Feb 24, 2010, at 11:59 AM, Gregg Lind wrote: Is there a nice way to get server_version_info from an existing connection or engine? Right now it looks quite buried in (for pg): sqlalchemy.database.postgres.PGDialiect().server_version_info(myconnection). The dialect contains the

Re: [sqlalchemy] backref questions

2010-02-10 Thread Michael Trier
Hi, On Feb 10, 2010, at 6:54 PM, David Ressman wrote: Hello, First of all, I'll apologize if this is a really basic question. I've not been using SQLAlchemy for long, and I've only very recently picked up Python. Even though I've looked everywhere I can think of for an answer to this

Re: [sqlalchemy] newbie to sqlalchemy :not null constraint

2010-02-09 Thread Michael Trier
hello all, I am newbie in sqlalchemy.I am thrilled by the sqlachemy features. But i got struck in the how to write the not null for the following: create table organisation(orgcode varchar(30) not null,orgname text not null,primary key(orgcode)); I have written the using

Re: [sqlalchemy] Re: pyodbc - sqlserver in mac os x

2010-02-08 Thread Michael Trier
On Feb 8, 2010, at 3:14 PM, Michael Bayer wrote: Domingo Aguilera wrote: Did you use iodbc or unixodbc ? OSX has some kind of odbc built in, I used that. I think there was a document somewhere regarding how it all works (maybe try googling mssql + osx). Yeah it's an implementation of

Re: [sqlalchemy] Re: 0.6b1 and pymssql

2010-02-07 Thread Michael Trier
Hi, On Feb 7, 2010, at 9:59 AM, Domingo Aguilera wrote: I tried 0.8 with 0.6b1 but didn't work. Both 0.8 and 1.0.2 work with sqla 0.5.8 without problems. I began trying using pyodbc in ubuntu yesterday but can't even make it run unixodbc with freetds to reach a sqlserver . If someone

Re: [sqlalchemy] Re: 0.6b1 and pymssql

2010-02-07 Thread Michael Trier
On Feb 7, 2010, at 12:52 PM, Domingo Aguilera wrote: Michael, I installed the tdsodbc package and now it's working in the ubuntu server. Tks a lot !! On Feb 7, 11:33 am, Domingo Aguilera domingo.aguil...@gmail.com wrote: Tks Michael, I never saw the setup directive. Did you compile

Re: [sqlalchemy] Behaviour of related queries

2009-12-09 Thread Michael Trier
I have an object from the ORM called obj which has an attribute obj.related_objects. If I do for ro in obj.related_objects: does that do a query for each iteration? I have thousands of related_objects per obj and it is not as fast as i would like. It will if you don't eager load the

[sqlalchemy] Re: django like inspectdb

2009-08-07 Thread Michael Trier
the actual classes just use autoload. -- Michael Trier http://michaeltrier.com/ --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: More SA, pyodbc, *nux and MSSQL problems

2009-07-29 Thread Michael Trier
to be: Mac: SA - pyodbc - unixODBC - FreeTDS - MSSQL Ubuntu: SA - pyodbc - unixODBC - FreeTDS - MSSQL With pyodbc being a layer between SA and freetds, and as you said, xODBC being optional if you don't mind not using DSNs. Sorry my mistake. You are correct. -- Michael Trier http

[sqlalchemy] Re: More SA, pyodbc, *nux and MSSQL problems

2009-07-29 Thread Michael Trier
) Absolutely any ideas will be appreciated. I'm not sure what to try next. For now I'm going to document how I set up Linux. Excellent. I'll dig into this tomorrow if I get a chance to see if I can help propel this along. -- Michael Trier http://michaeltrier.com/ http://thisweekindjango.com

[sqlalchemy] Re: More SA, pyodbc, *nux and MSSQL problems

2009-07-28 Thread Michael Trier
is: Mac: SA - iODBC - FreeTDS - pyodbc - MSSQL Ubuntu: SA - unixODBC - FreeTDS - pyodbc - MSSQL Of course you can remove the xODBC part of the equation if you want, but the results are the same. -- Michael Trier http://michaeltrier.com/ http://thisweekindjango.com

[sqlalchemy] Re: 0.5.3 ORM, MSSQL and FreeTDS: Invalid Cursor State exception?

2009-06-08 Thread Michael Trier
. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Create a stored procedure using SQLAlchemy

2009-05-20 Thread Michael Trier
DESC GO -- Michael Trier http://michaeltrier.com/ --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Basic Search Engine

2009-05-10 Thread Michael Trier
It may not be what you want but have you explored our full text search support through the use of the match operator? On May 10, 2009, at 6:13 AM, Nicholas Dudfield ndudfi...@gmail.com wrote: Greetings, I have been using SQLA for a few months. For admin CRUD index pages I have been

[sqlalchemy] Re: 0.5.3 ORM, MSSQL and FreeTDS: Invalid Cursor State exception?

2009-04-29 Thread Michael Trier
On Apr 29, 2009, at 10:08 AM, Tom Wood thomas.a.w...@gmail.com wrote: Some additional info, and a possible fix: I can reproduce this problem running the SQLAlchemy dialect unit tests. Using a trunk (r5930) checkout, FreeTDS 0.82 with tds protocol version 8.0, pyodbc 2.1.4, Python 2.5 and

[sqlalchemy] Re: pyodbc issues

2009-04-25 Thread Michael Trier
-24 16:10:30,740 INFO sqlalchemy.engine.base.Engine.0x...6110 ['500'] Michael Trier http://michaeltrier.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

[sqlalchemy] Re: pyodbc issues

2009-04-24 Thread Michael Trier
sqlalchemy.engine.base.Engine.0x...6110 ['500'] Michael Trier http://michaeltrier.com --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: use of a column label in HAVING clause

2009-04-23 Thread Michael Trier
ticket_count 1. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: django middleware or signals for sqlalchemy Session

2009-04-23 Thread Michael Trier
://gitorious.org/projects/django-sqlalchemy) that has the aim of automatically making SQLAlchemy accessible through Django applications. Good luck. -- Michael Trier http://michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: pyodbc issues

2009-04-21 Thread Michael Trier
['agent1', '192.168.0.100', 2000, 0, None, 1, 1, 1, 1, 0] 2009-04-17 19:05:07,217 INFO sqlalchemy.engine.base.Engine.0x...0270 COMMIT On Fri, Apr 17, 2009 at 5:58 PM, Michael Trier mtr...@gmail.com wrote: The SERVERS table doesn't exist according to the trace. Did you create

[sqlalchemy] Re: pyodbc issues

2009-04-17 Thread Michael Trier
] ([SERVER], [IP], [PORT] , [OS], [JSERVER], [STARTED], [STDIN], [LOGIN], [CWD], [ASSIGNEDONLY]) VALUES (? , ?, ?, ?, ?, ?, ?, ?, ?, ?)' ['agent1', '192.168.0.100', 2000, 0, None, 1, 1, 1 , 1, 0] C:\Dev\pysched On Fri, Apr 17, 2009 at 5:05 PM, Michael Trier mtr...@gmail.com wrote

[sqlalchemy] Re: SA and python 26

2009-04-05 Thread Michael Trier
() I'm using the latest pyodbc with 2.6.1 version of python and all tests run fine. If you provide a test script I can dig into it. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: 0.5.2 seems to always roll back with mssql

2009-03-24 Thread Michael Trier
the tests, so it's odd that you're having a problem. My only guess is that it's a TDS thing (I believe you said you were using that). The odd thing is that the list of items you're seeing across the wire is exactly what I'm getting as well and what should be expected. -- Michael Trier http

[sqlalchemy] Re: Auto-loading With Relationships

2009-02-17 Thread Michael Trier
or a script that gets run once that generates code for use. - There's this: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ You received this message

[sqlalchemy] Re: Specifying descending order_by on a backref

2009-02-17 Thread Michael Trier
see an option for that in the Relation()/backref() arguments. What am I missing? backref supports the same arguments as relation(), which include an order_by argument. http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html?highlight=backref#sqlalchemy.orm.relation -- Michael Trier http

[sqlalchemy] Re: Specifying descending order_by on a backref

2009-02-17 Thread Michael Trier
Hi, On Tue, Feb 17, 2009 at 5:22 PM, Ken kkin...@gmail.com wrote: On Feb 17, 3:13 pm, Michael Trier mtr...@gmail.com wrote: backref supports the same arguments as relation(), which include an order_by argument. http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html?highligh

[sqlalchemy] Re: Reg: Question on SqlAlchemy Speed

2009-02-13 Thread Michael Trier
':'updated'}, synchronize_session=False) 3 I'd be interested to see what your analysis uncovers. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: resultset print keys values

2009-02-10 Thread Michael Trier
objects. __dict__ is good enough for visual inspection for now. Wouldn't this do what you need: http://www.sqlalchemy.org/trac/wiki/FAQ#Whatsthebestwaytofigureoutwhichattributesarecolumnsgivenaclass -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com

[sqlalchemy] Re: BUG: autoload for DateTime in SQL Server 2000 fails

2009-02-09 Thread Michael Trier
know this since you're referencing a line of code only present in prior versions of 0.5). this has been fixed. Yeah, I just double checked with your test case and it works in the recent version. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com

[sqlalchemy] Re: print query with params

2009-02-03 Thread Michael Trier
Is there anyway to print the query with the params in place? There's this Recipe (http://www.sqlalchemy.org/trac/wiki/DebugInlineParams ). -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ You received

[sqlalchemy] Re: [ANN] Rum 0.2 has been released

2009-01-26 Thread Michael Trier
generator using tw.forms (tw.rum). Very nice work! I'm very excited about what you're doing. Thank you. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed

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

2009-01-11 Thread Michael Trier
On Sat, Jan 10, 2009 at 9:54 PM, Michael Trier mtr...@gmail.com wrote: 1. Override do_begin so that it creates a cursor and then executes on the cursor: def do_begin(self, connection): cursor = connection.cursor() cursor.execute(SET IMPLICIT_TRANSACTIONS OFF

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

2009-01-10 Thread Michael Trier
are there. Overall it tests pretty well but there are certainly errors. My understanding is that it's a lot slower than pyodbc. Other than that I just don't know. I'd like to get it to full test passing as well. I think it's certainly possible. -- Michael Trier http://blog.michaeltrier.com/ http

[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
. ps. I miss the one page documentation(easier to search) , is that available or can be done with sphinx? Have you tried the sphinx search? I think it's the best thing ever. Very handy and fast. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com

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

2009-01-07 Thread Michael Trier
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 driver in sqlalchemy 0.5.0 (release) is broken. I haven't check it out with adodbapi, but pyodbc confirmed works. Thanks for the test. I will look at this tomorrow.

[sqlalchemy] Re: question re query vs select

2009-01-04 Thread Michael Trier
the mapping through the Mapper and handles that. I guess a larger question is what are you not able to achieve with the ORM that you can achieve with the SQL Expression Language? -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com

[sqlalchemy] Re: mssql wrapper for numeric Datatype.

2009-01-03 Thread Michael Trier
Hi, On Fri, Jan 2, 2009 at 11:56 PM, Jaimy Azle jaimy.a...@gmail.com wrote: On Saturday, January 3, 2009, 7:07:00 AM, Michael Trier wrote: Would it be possible for you to do up a test case demonstrating the problem? If so, we could get to it very quickly. sure, here it is: Corrected

[sqlalchemy] Re: Empty ResultProxy, but SQL statement yields results

2008-12-24 Thread Michael Trier
Record_count is never set. Michael On Dec 23, 2008, at 3:27 PM, Philip philwr...@gmail.com wrote: I am having a problem that I am not able to figure out. Maybe someone else can see what I am doing wrong. I am building a query using the SQL expression language. Then printing the SQL