From e91ada0ae4c3f7d53b0595906caf1eb8a1858375 Mon Sep 17 00:00:00 2001 From: Sean Bright Date: Mon, 16 Jan 2012 17:11:39 +0000 Subject: [PATCH] Sort the output of 'database showkey' as well. You can pass wildcards (%) to the database CLI commands, so this will sort the returned list of matches. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@350978 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/db.c b/main/db.c index e4135821fd..dfaf17f2ec 100644 --- a/main/db.c +++ b/main/db.c @@ -121,7 +121,7 @@ DEFINE_SQL_STATEMENT(deltree_stmt, "DELETE FROM astdb WHERE key || '/' LIKE ? || DEFINE_SQL_STATEMENT(deltree_all_stmt, "DELETE FROM astdb") DEFINE_SQL_STATEMENT(gettree_stmt, "SELECT key, value FROM astdb WHERE key || '/' LIKE ? || '/' || '%' ORDER BY key") DEFINE_SQL_STATEMENT(gettree_all_stmt, "SELECT key, value FROM astdb ORDER BY key") -DEFINE_SQL_STATEMENT(showkey_stmt, "SELECT key, value FROM astdb WHERE key LIKE '%' || '/' || ?") +DEFINE_SQL_STATEMENT(showkey_stmt, "SELECT key, value FROM astdb WHERE key LIKE '%' || '/' || ? ORDER BY key") DEFINE_SQL_STATEMENT(create_astdb_stmt, "CREATE TABLE IF NOT EXISTS astdb(key VARCHAR(256), value VARCHAR(256), PRIMARY KEY(key))") static int init_stmt(sqlite3_stmt **stmt, const char *sql, size_t len) -- 2.47.2