summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-09 17:47:21 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-10-10 02:38:56 +0200
commit0cac0a067e5824d0e0dc6b3109d7f33974c60df4 (patch)
tree6723aec77a963cae1bdfb30cefdb3953f1da0af9 /src
parentf31445915e79cc07236941c5fd5ce16268eaa255 (diff)
cosmetic: multi-line DB_STMT_AUC_BY_IMSI
In multiple lines, the statement becomes more readable. I'd like to get this change out of the way before upcoming SQL statement edits and additions. Change-Id: Icf09f4bbb298a516aa52c81e3ca67d9d91d8c7c2
Diffstat (limited to 'src')
-rw-r--r--src/db.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/db.c b/src/db.c
index 4bba2f0..2c10ba0 100644
--- a/src/db.c
+++ b/src/db.c
@@ -29,7 +29,12 @@ static const char *stmt_sql[] = {
[DB_STMT_SEL_BY_IMSI] = "SELECT id,imsi,msisdn,vlr_number,sgsn_number,sgsn_address,periodic_lu_tmr,periodic_rau_tau_tmr,nam_cs,nam_ps,lmsi,ms_purged_cs,ms_purged_ps FROM subscriber WHERE imsi = ?",
[DB_STMT_UPD_VLR_BY_ID] = "UPDATE subscriber SET vlr_number = ? WHERE id = ?",
[DB_STMT_UPD_SGSN_BY_ID] = "UPDATE subscriber SET sgsn_number = ? WHERE id = ?",
- [DB_STMT_AUC_BY_IMSI] = "SELECT id, algo_id_2g, ki, algo_id_3g, k, op, opc, sqn, ind_bitlen FROM subscriber LEFT JOIN auc_2g ON auc_2g.subscriber_id = subscriber.id LEFT JOIN auc_3g ON auc_3g.subscriber_id = subscriber.id WHERE imsi = ?",
+ [DB_STMT_AUC_BY_IMSI] =
+ "SELECT id, algo_id_2g, ki, algo_id_3g, k, op, opc, sqn, ind_bitlen"
+ " FROM subscriber"
+ " LEFT JOIN auc_2g ON auc_2g.subscriber_id = subscriber.id"
+ " LEFT JOIN auc_3g ON auc_3g.subscriber_id = subscriber.id"
+ " WHERE imsi = ?",
[DB_STMT_AUC_UPD_SQN] = "UPDATE auc_3g SET sqn = ? WHERE subscriber_id = ?",
[DB_STMT_UPD_PURGE_CS_BY_IMSI] = "UPDATE subscriber SET ms_purged_cs=1 WHERE imsi = ?",
[DB_STMT_UPD_PURGE_PS_BY_IMSI] = "UPDATE subscriber SET ms_purged_ps=1 WHERE imsi = ?",