radiusd
.ServiceDatabase SQL
has a number of customisable
SQL statements (AddServiceQuery, GetServiceQuery, UpdateServiceQuery,
DeleteServiceQuery, AddSubscriptionQuery, GetSubscriptionQuery,
UpdateSubscriptonQuery and DeleteSubscriptionQuery). These statements are
used to access the entries in the SQL Service Database. The default
statements will work with the example SERVICES and SUBSCRIPTIONS tables in
the example SQL schema in file goodies/hotspot.sql
.
If you wish, you can use more or fewer columns in your SQL Service
Database, and you can change the names of the columns or the table. If you
do use a different table schema, you will probably have to change
statements to match your schema.ServiceDatabase
SQL
uses by defining one or more DBSource, DBUsername and
DBAuth lines. For more information about SQL configuration and failure
behaviour, see Section 3.8. SQL configuration.ServiceDatabase SQL
understands also the same
parameters as ServiceDatabase xxxxxx
. For more
information, see Section 3.22. <ServiceDatabase xxxxxx>. It supports
also all the common SQL configuration parameters. For more information
about the SQL configuration parameters, see Section 3.8. SQL configuration.DeleteSubscriptionQuery DELETE FROM SUBSCRIPTIONS WHERE tenant_id=? AND id=? DeleteSubscriptionQueryParam %2 DeleteSubscriptionQueryParam %3
AddServiceQuery
defaults
to:INSERT INTO SERVICES (%0) VALUES (%1)
GetServiceQuery
defaults
to:SELECT * FROM SERVICES WHERE tenant_id=%2 AND (name=%4 OR id=%3)
UpdateServiceQuery
defaults
to:UPDATE SERVICES SET name=%4 WHERE tenant_id=%2 AND id=%3
DeleteServiceQuery
defaults
to:DELETE FROM SERVICES WHERE tenant_id=%2 AND id=%3
AddSubscriptionQuery
defaults
to:INSERT INTO SUBSCRIPTIONS (%0) VALUES (%1)
GetSubscriptionQuery
defaults
to:SELECT * FROM SUBSCRIPTIONS WHERE tenant_id=%2 AND (name=%4 OR id=%3)
UpdateSubscriptionQuery
defaults
to:UPDATE SUBSCRIPTIONS SET %0 WHERE tenant_id=%2 AND id=%3
DeleteSubscriptionQuery
defaults
to:DELETE FROM SUBSCRIPTIONS WHERE tenant_id=%2 AND id=%3