]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove '&' from csv
authorAlan T. DeKok <aland@freeradius.org>
Thu, 6 Mar 2025 15:19:38 +0000 (10:19 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 6 Mar 2025 16:49:39 +0000 (11:49 -0500)
doc/antora/modules/reference/pages/raddb/mods-available/csv.adoc
raddb/mods-available/csv
src/tests/keywords/map

index 21dba59ef469560c18cbb5c8fdf9283159f9cb52..2c6bfbad34ddb15de7c6e34746dc5f6b9cc60c28 100644 (file)
@@ -12,7 +12,7 @@ WARNING: Multi-line fields are NOT allowed.
 
 The CSV map can be used in a `map` section, as in the following example.
 
-  map csv &User-Name {
+  map csv User-Name {
   }
 
 The argument to "map" is dynamically expanded.  The result is taken
@@ -117,7 +117,7 @@ tree.
 If a data type other than the native type of `key` expression
 is needed, the casting operator can be used.
 For example:
-a key value of `<ipv4prefix>&reply.Reply-Message`.
+a key value of `(ipv4addr) reply.Reply-Message`.
 would result in a prefix trie being used for lookups, and the
 `string` value of the `link:https://freeradius.org/rfc/rfc2865.html#Reply-Message[Reply-Message]` attribute being parsed as
 CIDR notation.
@@ -170,9 +170,9 @@ Where `csv` is the name of the module, and `key` is an expansion
 as given the the key` field above.  For example, the map could
 look like this:
 
-map csv &User-Name {
-&reply.Reply-Message := 'color'
-&my-integer := 'count'
+map csv User-Name {
+reply.Reply-Message := 'color'
+my-integer := 'count'
 }
 
 This map does the same operations as the key / update
@@ -197,10 +197,10 @@ csv {
        allow_multiple_keys = no
        fields = "name,size,color,count"
        index_field = "name"
-       key = &User-Name
+       key = User-Name
        update reply {
-              &Reply-Message := 'color'
-              &my-integer := 'count'
+              Reply-Message := 'color'
+              my-integer := 'count'
        }
 }
 ```
index 362fda22ed882b2679de2ec2ac5a23f32e27526c..a360d9fd20a4a997f4545b41bc78e4b9ea969513 100644 (file)
@@ -15,7 +15,7 @@
 #
 #  The CSV map can be used in a `map` section, as in the following example.
 #
-#    map csv &User-Name {
+#    map csv User-Name {
 #              Attribute-Name := field1
 #              Attribute-Name := field2
 #              ...
@@ -130,7 +130,7 @@ csv {
        #  If a data type other than the native type of `key` expression
        #  is needed, the casting operator can be used.
        #  For example:
-       #  a key value of `<ipv4prefix>&reply.Reply-Message`.
+       #  a key value of `(ipv4addr) reply.Reply-Message`.
        #  would result in a prefix trie being used for lookups, and the
        #  `string` value of the `Reply-Message` attribute being parsed as
        #  CIDR notation.
@@ -140,7 +140,7 @@ csv {
        #  parsed to the final data type only when the `csv` module
        #  is run, either in-place, or as a `map`.
        #
-       key = &User-Name
+       key = User-Name
 
        #
        #  ### Mapping of CSV fields to attributes.
@@ -175,8 +175,8 @@ csv {
        #  update { ... }::
        #
        update reply {
-              &Reply-Message := 'color'
-              &my-integer := 'count'
+              Reply-Message := 'color'
+              my-integer := 'count'
        }
 
        #
@@ -188,9 +188,9 @@ csv {
        #  as given the the key` field above.  For example, the map could
        #  look like this:
        #
-       #       map csv &User-Name {
-       #               &reply.Reply-Message := 'color'
-       #               &my-integer := 'count'
+       #       map csv User-Name {
+       #               reply.Reply-Message := 'color'
+       #               my-integer := 'count'
        #       }
        #
        #  This map does the same operations as the key / update
index 4b0c464af44eafb1d8acd7c72b65bd408b40b46e..2c7e446003f19670cda25ebf7bb0e6a458b1f08f 100644 (file)
@@ -3,7 +3,7 @@ string CSV-Result
 #
 #  PRE: map-2arg-error map-empty-error map-module-error map-field-error
 #
-map csv &User-Name {
+map csv User-Name {
        CSV-Result := 'field3'
 }