Revision 2064
Added by Aaron Marcuse-Kubitza almost 13 years ago
lib/sql.py | ||
---|---|---|
341 | 341 |
|
342 | 342 |
default = object() # tells insert() to use the default value for a column |
343 | 343 |
|
344 |
def insert_select(db, table, select_query=None, cols=None, params=None,
|
|
344 |
def insert_select(db, table, cols=None, select_query=None, params=None,
|
|
345 | 345 |
returning=None, recover=None, cacheable=True, table_is_esc=False): |
346 | 346 |
''' |
347 | 347 |
@param returning str|None An inserted column (such as pkey) to return |
... | ... | |
385 | 385 |
if values != []: query = ' VALUES ('+(', '.join(labels))+')' |
386 | 386 |
else: query = None |
387 | 387 |
|
388 |
return insert_select(db, table, query, cols, values, *args, **kw_args)
|
|
388 |
return insert_select(db, table, cols, query, values, *args, **kw_args)
|
|
389 | 389 |
|
390 | 390 |
def last_insert_id(db): |
391 | 391 |
module = util.root_module(db.db) |
Also available in: Unified diff
sql.py: insert_select(): Changed order of cols and params arguments so select_query and params would be together