Skip to content

Commit

Permalink
Fixed type and added the reference for CPMap advanced script functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuce committed Apr 17, 2024
1 parent d1e79cf commit 298d2a3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/clc-cpmap.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ clc cpmap -n my-cpmap set -k string hello -v f32 19.94

== clc cpmap put

Put sthe given value in the given CPMap and return sthe old value.
Puts the given value in the given CPMap and returns the old value.

Usage:

Expand Down Expand Up @@ -238,7 +238,7 @@ clc cpmap -n my-cpmap put -k string hello -v f32 19.94

== clc cpmap remove

Removes the value of a given key in a CPMap and returns the key.
Removes the value of a given key in a CPMap and returns the old value.

Usage:

Expand Down
21 changes: 21 additions & 0 deletions docs/modules/ROOT/pages/clc-script.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,27 @@ The following functions are available for advanced scripts:
|`VALUES_LIST = map_values(name=MAP_NAME)`
|Returns the values in the Map as a list.

|`BOOL = cpmap_compare_and_set(KEY, EXPECTED_VALUE, NEW_VALUE, name=CPMAP_NAME)`
|Sets the value for the given key if it has the expected value.

|`cpmap_delete(KEY, name=CPMAP_NAME)`
|Deletes the value of a given key in a CPMap.

|`cpmap_destroy(name=CPMAP_NAME)`
|Deletes the CPMap and all the data in it.

|`cpmap_get(KEY, name=CPMAP_NAME)`
|Gets a value from the given CPMap.

|`OLD_VALUE = cpmap_put(KEY, VALUE, name=CPMAP_NAME)`
|Puts the given value in the given CPMap and returns the old value.

|`VALUE = cpmap_remove(KEY, name=CPMAP_NAME)`
|Removes the value of a given key in a CPMap and returns the old value.

|`cpmap_set(KEY, VALUE, name=CPMAP_NAME)`
|Sets a value in the given CPMap.

|`TIME = now()`
|Returns the current time in nanoseconds.

Expand Down

0 comments on commit 298d2a3

Please sign in to comment.