some build and cleanup

pull/627/head
Timothy Stack 6 years ago
parent dcccebe797
commit 4381c23641

@ -82,7 +82,7 @@ CREATE TABLE lnav_file (
switch (col) {
case 0:
to_sqlite(ctx, st.st_dev);
to_sqlite(ctx, (int64_t) st.st_dev);
break;
case 1:
to_sqlite(ctx, (int64_t) st.st_ino);

@ -333,10 +333,18 @@ bool setup_logline_table(exec_context &ec)
}
for (const auto &pair : sqlite_function_help) {
lnav_data.ld_rl_view->add_possibility(
LNM_SQL,
"*",
pair.first + (pair.second->ht_parameters.empty() ? "()" : ("(")));
switch (pair.second->ht_context) {
case HC_SQL_FUNCTION:
case HC_SQL_TABLE_VALUED_FUNCTION: {
string poss = pair.first +
(pair.second->ht_parameters.empty() ? "()" : ("("));
lnav_data.ld_rl_view->add_possibility(LNM_SQL, "*", poss);
break;
}
default:
break;
}
}
}

@ -172,7 +172,7 @@ static void build_all_help_text()
map<string, help_text *> sql_funcs;
map<string, help_text *> sql_keywords;
for (auto iter : sqlite_function_help) {
for (const auto &iter : sqlite_function_help) {
switch (iter.second->ht_context) {
case HC_SQL_FUNCTION:
case HC_SQL_TABLE_VALUED_FUNCTION:
@ -186,7 +186,7 @@ static void build_all_help_text()
}
}
for (auto iter : sql_funcs) {
for (const auto &iter : sql_funcs) {
all_help_text.append(2, '\n');
format_help_text_for_term(*iter.second, 79, all_help_text);
if (!iter.second->ht_example.empty()) {
@ -195,7 +195,7 @@ static void build_all_help_text()
}
}
for (auto iter : sql_keywords) {
for (const auto &iter : sql_keywords) {
all_help_text.append(2, '\n');
format_help_text_for_term(*iter.second, 79, all_help_text);
if (!iter.second->ht_example.empty()) {

Loading…
Cancel
Save