mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
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.
This commit is contained in:
10
openbsc/contrib/sms/hlr-query.st
Normal file
10
openbsc/contrib/sms/hlr-query.st
Normal file
@@ -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.
|
||||
].
|
||||
]
|
Reference in New Issue
Block a user