diff options
author | Idan Kamara <idankk86@gmail.com> | 2012-12-06 00:11:52 +0200 |
---|---|---|
committer | Idan Kamara <idankk86@gmail.com> | 2012-12-06 00:11:52 +0200 |
commit | d57c1c2ddd654a1077ab04ba7277828d9030c23d (patch) | |
tree | 6e4b93f19c175336329d64b78ab1acf806895a9b /lib/sqlalchemy/sql/expression.py | |
parent | 51839352a4a9d4b87bdca6c148ec0fd847b8630b (diff) | |
download | sqlalchemy-d57c1c2ddd654a1077ab04ba7277828d9030c23d.tar.gz |
compiler: add support for multirow inserts
Some databases support this syntax for inserts:
INSERT INTO table (id, name) VALUES
('v1', 'v2'),
('v3', 'v4');
which greatly increases INSERT speed.
It is now possible to pass a list of lists/tuples/dictionaries as
the values param to the Insert construct. We convert it to a flat
dictionary so we can continue using bind params. The above query
will be converted to:
INSERT INTO table (id, name) VALUES
(:id, :name),
(:id0, :name0);
Currently only supported on postgresql, mysql and sqlite.
Diffstat (limited to 'lib/sqlalchemy/sql/expression.py')
0 files changed, 0 insertions, 0 deletions