Revision 9334
Added by Aaron Marcuse-Kubitza over 11 years ago
db.sh | ||
---|---|---|
19 | 19 |
alias mk_table_esc='declare table_esc; mk_esc_name table' |
20 | 20 |
|
21 | 21 |
alias mk_select='mk_table_esc |
22 |
declare query="$(rtrim "${query:-SELECT * FROM $table_esc${filter:+ |
|
22 |
declare query="$(rtrim "${query:-SELECT ${cols:-*} ${cols:+ |
|
23 |
}FROM $table_esc${filter:+ |
|
23 | 24 |
WHERE $filter |
24 | 25 |
}}${limit:+ |
25 | 26 |
LIMIT $limit}")" |
Also available in: Unified diff
lib/sh/db.sh: mk_select: constructed queries: support custom columns list using $cols