[asterisk-commits] seanbright: branch 10 r350938 - /branches/10/main/db.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 16 08:27:59 CST 2012
Author: seanbright
Date: Mon Jan 16 08:27:57 2012
New Revision: 350938
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=350938
Log:
Sort the output of 'database show' by key.
This more closely mimics the behavior of 'database show' before the conversion
to sqlite3.
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=350938&r1=350937&r2=350938
==============================================================================
--- branches/10/main/db.c (original)
+++ branches/10/main/db.c Mon Jan 16 08:27:57 2012
@@ -119,8 +119,8 @@
DEFINE_SQL_STATEMENT(del_stmt, "DELETE FROM astdb WHERE key=?")
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 ? || '/' || '%'")
-DEFINE_SQL_STATEMENT(gettree_all_stmt, "SELECT key, value 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(create_astdb_stmt, "CREATE TABLE IF NOT EXISTS astdb(key VARCHAR(256), value VARCHAR(256), PRIMARY KEY(key))")
More information about the asterisk-commits
mailing list