[sqlalchemy] Re: Replicating a transaction

2007-03-20 Thread sdobrev
On Tuesday 20 March 2007 07:47:53 Benno Rice wrote: Hi, I'm wondering if it would be possible to have a situation where transactions coming in from the ORM system could be sent to multiple database servers at once. If I were to look into adding this, where would be the best place to

[sqlalchemy] Re: How to model an odd many-to-many relationship?

2007-03-20 Thread Gaetan de Menten
On 3/20/07, Mike Kent [EMAIL PROTECTED] wrote: I have a many-to-many relationship between two entities, call them A and B. This is easy enough to model in sqlalchemy using Elixir. However, to complicate things, I need an integer column somewhere called 'priority'. In the relationship

[sqlalchemy] Fix on ADODBAPI

2007-03-20 Thread El Gringo
I found that the conenctionString is not complete, the port is missing. Not like anywhere else, host and port must be separated by a comma ! def make_connect_string(keys): connectors = [Provider=SQLOLEDB] connectors.append (Data Source=%s,%s % (keys.get(host), keys.get(port, 1433)))

[sqlalchemy] Re: SELECT 'a fixed string', ...

2007-03-20 Thread jose
Bertrand Croq wrote: hi, I am currently using sqlalchemy to build SQL queries and it's a fantastic tool! By now, I am looking for a way to build: SELECT 'a_fixed_string', atable.col1, atable.col2 FROM atable using the syntax: select([XXX, atable.c.col1, atable.c.col2]) but I don't know

[sqlalchemy] Re: Fix on ADODBAPI

2007-03-20 Thread El Gringo
I also found that when trying to connect within a thread the connection hangs. I had to use pythoncom.CoInitialize(). Example: # import pythoncom import sys sys.coinit_flags = 0 pythoncom.CoInitialize() [ COM code here... ] pythoncom.CoUninitialize() More informations:

[sqlalchemy] Re: SELECT 'a fixed string', ...

2007-03-20 Thread Bertrand Croq
Le Mardi 20 Mars 2007 10:38, jose a écrit : try this: select([literal('a_fixed_string'), atable.c.col1, atable.c.col2]) Perfect ! Thanks a lot. -- Bertrand Croq, Ingénieur Développement ___ Net-ng Tel

[sqlalchemy] Re: migrate tool

2007-03-20 Thread che
Thanks Evan, Hope that soon I'll use your tool. Stefan --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Issue using rev 2425

2007-03-20 Thread Steve Zatz
Michael, thanks for working through this and for taking the time to explain what's going on and to provide alternative ways to getting this done. Your efforts to support the users of sqlalchemy are really extraordinary. --~--~-~--~~~---~--~~ You received this

[sqlalchemy] Re: How to model an odd many-to-many relationship?

2007-03-20 Thread Mike Kent
Gaetan, Thanks for your response. I'd like to follow up with two questions: 1. I understand what you mean about the current way I'd have to model this relationship in Elixir. This would allow me full control over the intermediate table, which means I could put my 'priority' field in it.

[sqlalchemy] Re: [ticket:336] Informix support and some enhancement for oracle and pgsql

2007-03-20 Thread junzhang . jn
label length of 18 is very small, we might have to resolve ticket #512 first (makes the truncation size non-global). please check my patch. we add a attribute in dialet for this case. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[sqlalchemy] Re: small bug/feature in PassiveDefault for timestamp in MySQL (or am I doing something wrong?)

2007-03-20 Thread Michael Bayer
mysql.py gets MSTimestamp added, which probably subclasses MSDateTime, which sends along TIMESTAMP, and gets a fix in ischema_names to support reflection. colspecs dict gets sqltypes.TIMESTAMP: MSTimestamp added. *perhaps*, types.py should have Timestamp added to it, TIMESTAMP will

[sqlalchemy] Re: Replicating a transaction

2007-03-20 Thread Michael Bayer
SessionTransaction will start transactions across any number of databases, as different engines come into its querying scope. when SessionTranasction commits, it commits all underlying transacitons. so if you want to start all transactions at once, you can create a new

[sqlalchemy] Re: Replicating a transaction

2007-03-20 Thread Michael Bayer
On Mar 20, 2007, at 11:52 AM, Michael Bayer wrote: however, this is not using two phase commit, which means that if one commit fails, all previous commit's stay committed. if you want true two phase commit I'd look into Zalchemy which has this feature. actually i should correct myself -

[sqlalchemy] Dealing with uncommited data

2007-03-20 Thread Andreas Jung
In a traditional application you can insert a new row and read the row within the same transaction. What is the typical usage pattern to deal with this in SA? In our particular setup (Zope) a new session is created for each new HTTP request and flushed automatically at the end of request when

[sqlalchemy] Re: Dealing with uncommited data

2007-03-20 Thread Marco Mariani
Andreas Jung wrote: In a traditional application you can insert a new row and read the row within the same transaction. What is the typical usage pattern to deal with this in SA? In our particular setup (Zope) a new session is created for each new HTTP request and flushed automatically at

[sqlalchemy] table name/Foreign key

2007-03-20 Thread vkuznet
Hi, I have a dump question about naming conventions for foreign keys. Using ORACLE as back-end all table names are in capital letters. So Table object looks like: Table('BRANCH',DynamicMetaData(),Column('id',OracleInteger(),primary_key=True,nullable=False),

[sqlalchemy] Re: table name/Foreign key

2007-03-20 Thread Michael Bayer
it would appear the query to read back constraint information is: SELECT ac.constraint_name, ac.constraint_type, LOWER(loc.column_name) AS local_column, LOWER(rem.table_name) AS remote_table, LOWER(rem.column_name) AS

[sqlalchemy] Re: Feature request: Session.get_local()

2007-03-20 Thread Daniel Miller
A patch containing tests and cleaned up identity key is attached. ~ Daniel Michael Bayer wrote: committed, r2409. the row needs to have a class and entity_name present to determine what mapper you want to use to extract from the row, so i put those as keyword arguments for now.

[sqlalchemy] Re: [ticket:336] Informix support and some enhancement for oracle and pgsql

2007-03-20 Thread 张骏
unit tests: - cant remove any unit tests - many of them are commented out here I will check the whole unit tests to fix the comment blocks. - changing identifier names in unit tests to handle informix ident - e maybe, would rather informix skip those the

[sqlalchemy] [patch] Data partitioning via bind functions

2007-03-20 Thread Benno Rice
So one thing we're attempting to do in a project I'm working on is partitioning our data set across several databases based on object keys. I've come up with a way to implement this in SQLAlchemy which I've provided here as a mostly-complete patch. Session objects now have a bind_func