- attached drizzle_dialect.patch
Merge Drizzle dialect
Hi!
We're using this in several internal drizzle projects and would love to get it merged. Here's an hg repo with the patch all merged up with latest trunk:
hg clone http://bitbucket.org/mordred/sqlalchemy
Also going to attach it in patch version.
Comments (15)
-
Account Deleted -
repo owner - changed component to mysql
pretty good. I think we can replace self.get_keyword_prefix() with
self.name
/self.dialect.name
, can you give that a test and attach ?. Also add a line to doc/build/core/engines.rst, doc/build/dialects/index.rst, add doc/build/dialects/drizzle.rst. -
Account Deleted Ok. Uploaded a new updated patch.
-
repo owner - changed milestone to 0.6.6
- marked as enhancement
OK, couple more questions - do you mean to say
extract_map = mysql_dialect.MySQLCompiler.extract_map.copy
at the top ofDrizzleCompiler
? also, why reimplementing all of the types +DrizzleTypeCompiler
, the types/MySQLTypeCompiler
object in MySQL is not usable as a base here? Just a little concerned that all that duplication means any fixes on the MySQL side have to be copied over. Also are you working on 0.6 or can this just be for 0.7 ? betas of 0.7 should be released in january. -
Account Deleted MySQLTypeCompiler isn't usable as a base (or not useful as a base) because it injects UNSIGNED and/or ZEROFILL on all the numerics - so we'd have to override way more code than just starting direct from the base. (We support a much more limited set of types than MySQL)
This can TOTALLY be just for 0.7. The places that we're currently using sqlalchemy/drizzle support we're running from tip of hg tree. :)
As for DrizzleCompiler - probably. Actually, it looks like we maybe don't even need it there? Do you want me to make that change and re-submit a new patch?
-
repo owner - changed milestone to 0.7.xx
-
repo owner - changed milestone to 0.7.0
- changed watchers to mordred@inaugust.com
Hi Monty -
can you try the attached patch against the current tip, 86e6c2bafb03e9620f6289c709d0076e6291f624 ?
This patch moves everything "mysqldb" related into a new connector module where its functionality can be shared by MySQL and Drizzle. It also removes just about everything that was redundant in Drizzle vs. MySQL. This is very important as I need to be able to improve and migrate the architecture of MySQL and MySQLdb without redudant work.
If the patch works we can target this for 0.7.0 since it reorganizes the MySQL dialect itself.
-
Account Deleted Working on it/checking it out right now.
-
Account Deleted Ok. It's doing really well with the unittests... AND I found a few new things to fix. Attaching a new patch...
-
Account Deleted While I'm at it, while running unittests, I'm getting a bunch of this:
Error emptying table a_table: IntegrityError("(IntegrityError) (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (
test
.a_table
, CONSTRAINTa_table_ibfk_1
FOREIGN KEY (parent_id
) REFERENCESa_table
(id
))')",)Which I believe might actually be an underlying drizzle bug. Any idea where I could look to be able to replicate the queries that led to this so I can go attack our test suite?
-
Account Deleted Oh. Whoops - I didn't see the attached patch - my brain read "patch" as "tip of hg trunk"
Attaching a patch which is based on your patch, but also has the changes I made after running unittests. Otherwise it's working great!
-
Account Deleted - attached new_add_drizzle.patch
Updated patch with the new stuff and the unittest fixes
-
repo owner - changed status to resolved
OK I committed this in 9122268ed03d9fb59fafb62ee5a435775f1020d5 which should bring this ticket to a close.
-
repo owner the warnings with the foreign key constraints occur with MySQL as well so that's probably something the test suite has to take into account.
-
repo owner - removed milestone
Removing milestone: 0.7.0 (automated comment)
- Log in to comment
Drizzle dialect in patch form