aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/contrib
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-23 22:12:57 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-12-26 09:40:02 +0100
commit9d277d3b33d33aa1f8454c1d525262bb698e2d38 (patch)
tree0d5c5ffccfd5b09a5e2456c102755eee36e0fdb4 /openbsc/contrib
parente3018c7ad643d6f0cc0e7df0544670a8dca754a3 (diff)
sms: Add a script to query for unsent SMS
This is generating the query statement. It can be used to play with database indexes and such.
Diffstat (limited to 'openbsc/contrib')
-rw-r--r--openbsc/contrib/sms/hlr-query.st10
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/contrib/sms/hlr-query.st b/openbsc/contrib/sms/hlr-query.st
new file mode 100644
index 000000000..bd3f97a4a
--- /dev/null
+++ b/openbsc/contrib/sms/hlr-query.st
@@ -0,0 +1,10 @@
+"Query for one SMS"
+
+Eval [
+1 to: 100 do: [:each |
+ Transcript show: 'SELECT SMS.* FROM SMS
+ JOIN Subscriber ON SMS.receiver_id = Subscriber.id
+ WHERE SMS.id >= 1 AND SMS.sent IS NULL AND Subscriber.lac > 0
+ ORDER BY SMS.id LIMIT 1;'; nl.
+].
+]