Skip to content

Commit 511347b

Browse files
committed
Update and add documentation #374
1 parent ec7f7a3 commit 511347b

File tree

1 file changed

+32
-24
lines changed

1 file changed

+32
-24
lines changed

README.md

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,19 @@ Options:
303303

304304
#### Record-level functions
305305

306+
##### `add_array`
307+
308+
Creates a new array (with optional values).
309+
310+
```perl
311+
add_array("<targetFieldName>")
312+
add_array("<targetFieldName>", "<value_1>"[, ...])
313+
```
314+
315+
[Example in Playground](https://metafacture.org/playground/?example=add_array)
316+
317+
[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+add_array+{")
318+
306319
##### `add_field`
307320

308321
Creates a field with a defined value.
@@ -315,6 +328,19 @@ add_field("<targetFieldName>", "<fieldValue>")
315328

316329
[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+add_field+{")
317330

331+
##### `add_hash`
332+
333+
Creates a new hash (with optional values).
334+
335+
```perl
336+
add_hash("<targetFieldName>")
337+
add_hash("<targetFieldName>", "subfieldName": "<subfieldValue>"[, ...])
338+
```
339+
340+
[Example in Playground](https://metafacture.org/playground/?example=add_hash)
341+
342+
[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+add_hash+{")
343+
318344
##### `array`
319345

320346
Converts a hash/object into an array.
@@ -535,39 +561,21 @@ retain("<sourceField_1>"[, ...])
535561

536562
##### `set_array`
537563

538-
Creates a new array (with optional values).
564+
_Currently alias for [`add_array`](#add_array)._
539565

540-
```perl
541-
set_array("<targetFieldName>")
542-
set_array("<targetFieldName>", "<value_1>"[, ...])
543-
```
544-
545-
[Example in Playground](https://metafacture.org/playground/?example=set_array)
546-
547-
[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+set_array+{")
566+
We advise you to use [`add_array`](#add_array) instead of `set_array` due to changing behaviour in an upcoming release. For more information see: [#309](https://github.com/metafacture/metafacture-fix/issues/309)
548567

549568
##### `set_field`
550569

551-
Creates (or replaces) a field with a defined value.
552-
553-
```perl
554-
set_field("<targetFieldName>", "<fieldValue>")
555-
```
570+
_Currently alias for [`add_field`](#add_field)._
556571

557-
[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+set_field+{")
572+
We advise you to use [`add_field`](#add_field) instead of `set_field` due to changing behaviour in an upcoming release. For more information see: [#309](https://github.com/metafacture/metafacture-fix/issues/309)
558573

559574
##### `set_hash`
560575

561-
Creates a new hash (with optional values).
562-
563-
```perl
564-
set_hash("<targetFieldName>")
565-
set_hash("<targetFieldName>", "subfieldName": "<subfieldValue>"[, ...])
566-
```
567-
568-
[Example in Playground](https://metafacture.org/playground/?example=set_hash)
576+
_Currently alias for [`add_hash`](#add_hash)._
569577

570-
[Java Code](https://github.com/search?type=code&q=repo:metafacture/metafacture-fix+path:FixMethod.java+"+set_hash+{")
578+
We advise you to use [`add_hash`](#add_hash) instead of `set_hash` due to changing behaviour in an upcoming release. For more information see: [#309](https://github.com/metafacture/metafacture-fix/issues/309)
571579

572580
##### `timestamp`
573581

0 commit comments

Comments
 (0)