Revision 3297
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
700 | 700 |
else: whitespace = '\n' |
701 | 701 |
query += '\n'+sql_gen.combine_conds([sql_gen.ColValueCond(l, r) |
702 | 702 |
.to_str(db) for l, r in conds], 'WHERE') |
703 |
missing = False |
|
704 | 703 |
if order_by != None: |
705 | 704 |
query += '\nORDER BY '+sql_gen.as_Col(order_by, table0).to_str(db) |
706 |
if limit != None: query += '\nLIMIT '+str(limit); missing = False
|
|
705 |
if limit != None: query += '\nLIMIT '+str(limit) |
|
707 | 706 |
if start != None: |
708 | 707 |
if start != 0: query += '\nOFFSET '+str(start) |
709 |
missing = False |
|
710 |
if missing: warnings.warn(DbWarning( |
|
711 |
'SELECT statement missing a WHERE, LIMIT, or OFFSET clause: '+query)) |
|
712 | 708 |
|
713 | 709 |
query = with_explain_comment(db, query) |
714 | 710 |
|
Also available in: Unified diff
sql.py: mk_select(): Don't output warning if there is no WHERE, LIMIT, or OFFSET clause, because column-based import has many queries where this is the case and it's annoying to need to specify start=0 to turn off this warning