Revision 3453
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
505 | 505 |
'''+self.select_query.to_str(db)+''' |
506 | 506 |
LOOP |
507 | 507 |
BEGIN |
508 |
RETURN QUERY |
|
509 | 508 |
'''+self.with_row.to_str(db)+''' |
510 |
; |
|
511 | 509 |
EXCEPTION |
512 | 510 |
WHEN '''+self.exc+''' THEN NULL; -- continue to next row |
513 | 511 |
END; |
lib/sql.py | ||
---|---|---|
791 | 791 |
else: row = [sql_gen.Col(c.name, 'row') for c in cols] |
792 | 792 |
|
793 | 793 |
query = sql_gen.RowExcIgnore(table.to_str(db)+'%ROWTYPE', select_query, |
794 |
mk_insert(sql_gen.Values(row).to_str(db)), cols) |
|
794 |
'''\ |
|
795 |
RETURN QUERY |
|
796 |
'''+mk_insert(sql_gen.Values(row).to_str(db))+''' |
|
797 |
;''' |
|
798 |
, cols) |
|
795 | 799 |
else: query = mk_insert(select_query) |
796 | 800 |
|
797 | 801 |
if embeddable: |
Also available in: Unified diff
sql_gen.py: RowExcIgnore: Don't automatically add 'RETURN QUERY' before the with_row code or ';' after it