[asterisk-commits] seanbright: branch 10 r350978 - /branches/10/main/db.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 16 11:11:43 CST 2012


Author: seanbright
Date: Mon Jan 16 11:11:39 2012
New Revision: 350978

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=350978
Log:
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.

Modified:
    branches/10/main/db.c

Modified: branches/10/main/db.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/db.c?view=diff&rev=350978&r1=350977&r2=350978
==============================================================================
--- branches/10/main/db.c (original)
+++ branches/10/main/db.c Mon Jan 16 11:11:39 2012
@@ -121,7 +121,7 @@
 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)




More information about the asterisk-commits mailing list