Trying to understand expression in SQL module
Hello everyone, I am reading the sql model query config trying to understand it. I came across the following an expression *${....acct_table1}* . What is the purpose of the the ellipsis (....) in front of the variable acct_table1. See below for full query expression. INSERT INTO* ${....acct_table1}* \ (${...column_list}) \ VALUES(\ '%{Acct-Session-Id}', \ '%{Acct-Unique-Session-Id}', \ '%{SQL-User-Name}', \ NULLIF('%{Realm}', ''), \ '%{%{NAS-IPv6-Address}:-%{NAS-IP-Address}}', \ NULLIF('%{%{NAS-Port-ID}:-%{NAS-Port}}', ''), \ '%{NAS-Port-Type}', \ TO_TIMESTAMP(%{integer:Event-Timestamp}), \ TO_TIMESTAMP(%{integer:Event-Timestamp}), \ NULL, \ 0, \ '%{Acct-Authentic}', \ '%{Connect-Info}', \ NULL, \ 0, \ 0, \ '%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ NULL, \ '%{Service-Type}', \ '%{Framed-Protocol}', \ NULLIF('%{Framed-IP-Address}', '')::inet), \ '%{Nomadix-User-Definable-1}', \ '%{Nomadix-User-Definable-2}', \ '%{NAS-Identifier}' "
On Jul 10, 2017, at 7:02 AM, Kenroy <bennettk9999@gmail.com> wrote:
Hello everyone, I am reading the sql model query config trying to understand it. I came across the following an expression *${....acct_table1}* . What is the purpose of the the ellipsis (....) in front of the variable acct_table1.
It's a macro expansion, done when the server starts. See raddb/radiusd.conf. There are lots of examples
See below for full query expression.
We already know what the queries look like. Please don't post them to the list. Alan DeKok.
Hi Alan, I know is an expressions that executes when the server starts . I am just trying to get familiar with the expressions and haven't see anything that explains the ellipsis in the wiki. I wanted to know whats the purpose of the ellipsis (*....*) in front of the variable *acct_table1 *for the expression ${*....*acct_table1}* . * Looking at the queries.conf file I would assume the dots is a means of referencing a variable in a parent block. See my understanding so far in the following example. I just want to know if I am on the right track with this. blocks,a,b and c are just example blocks to demonstrate my understanding of creating expressions in unlang and not used in freeradius. varx='2' a { var1='data1' b { var2='data2' new c { var3='data2' #assign var1 from block a to newdata newdata=${...var1} #assign varx from block a to newdatax newdata=${....var1} } } } On Mon, Jul 10, 2017 at 7:28 AM, Alan DeKok <aland@deployingradius.com> wrote:
On Jul 10, 2017, at 7:02 AM, Kenroy <bennettk9999@gmail.com> wrote:
Hello everyone, I am reading the sql model query config trying to understand it. I came across the following an expression *${....acct_table1}* . What is the purpose of the the ellipsis (....) in front of the variable acct_table1.
It's a macro expansion, done when the server starts. See raddb/radiusd.conf. There are lots of examples
See below for full query expression.
We already know what the queries look like. Please don't post them to the list.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
On Jul 10, 2017, at 8:21 AM, Kenroy <bennettk9999@gmail.com> wrote:
I know is an expressions that executes when the server starts . I am just trying to get familiar with the expressions and haven't see anything that explains the ellipsis in the wiki.
$ man radiusd.conf Alan DeKok.
Thank you Alan On Mon, Jul 10, 2017 at 8:46 AM, Alan DeKok <aland@deployingradius.com> wrote:
On Jul 10, 2017, at 8:21 AM, Kenroy <bennettk9999@gmail.com> wrote:
I know is an expressions that executes when the server starts . I am just trying to get familiar with the expressions and haven't see anything that explains the ellipsis in the wiki.
$ man radiusd.conf
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/ list/users.html
participants (2)
-
Alan DeKok -
Kenroy