[asterisk-commits] seanbright: trunk r350979 - in /trunk: ./ main/db.c

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


Author: seanbright
Date: Mon Jan 16 11:12:36 2012
New Revision: 350979

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

Merged revisions 350978 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    trunk/   (props changed)
    trunk/main/db.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/main/db.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/db.c?view=diff&rev=350979&r1=350978&r2=350979
==============================================================================
--- trunk/main/db.c (original)
+++ trunk/main/db.c Mon Jan 16 11:12:36 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