Thank you Michael. I was hoping to do it the native sqlalchemy way, because
my function takes an sqlalchemy-based predicate that needs to be used in
this and another query, so I was hoping to be able to do things natively
using pure sqlalchemy constructs in order to share this predicate.
Hi, I am using sqlalchemy core with the mysql dialect. Mysql supports
DELETE with ORDER BY and LIMIT:
DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name
[PARTITION (partition_name,...)]
[WHERE where_condition]
[ORDER BY ...]
[LIMIT row_count]
However, I can't seem to figure
I also tried to do this via subquery, but MySQL apparently doesn't support
subqueries with LIMIT:
NotSupportedError: (NotSupportedError) (1235, "This version of MySQL
doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'") 'DELETE FROM
twitter_tweets WHERE twitter_tweets.uid IN (SELECT
Has support for MySQL INSERT... ON DUPLICATE KEY UPDATE been integrated
into sqlalchemy more recently?
Thanks,
Vitaly
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email
I understand that -00-00 00:00:00 would be an invalid datetime, but
there is presently no way in sqlalchemy to distinguish between actual Null
and the -00-00 00:00:00 value that mysql substitutes when it gets an
invalid datetime
--
You received this message because you are subscribed
platform = mac os x yosemtite
sqlalchemy version = '0.9.4'
mysql version = 5.6.23
table definition:
CREATE TABLE `twitter_tweets` (
`uid` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
`created_at` datetime NOT NULL,
`retweet` tinyint(1) NOT NULL,
`lang` varchar(10) COLLATE utf8_unicode_ci
Thank you, your recommendation worked out great.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy-alembic group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
For more