CloudExpression

CloudExpression["name"]

represents an expression whose value is persistently stored in the cloud.

CloudExpression["http://"], CloudExpression["https://"]

represents a cloud expression with a given URI.

CloudExpression[base,part1,part2,]

represents the part of a cloud expression specified by the parti.

Details

  • CloudExpression["name"] immediately evaluates to CloudExpression[uri], where the path for the URI is determined by the value of $CloudExpressionBase.
  • The value stored in a cloud expression can be any Wolfram Language expression.
  • When the value consists of nested lists and associations, lookup and updating of parts is handled directly in the cloud.
  • CloudExpression[][part1,part2,] retrieves the value of the specified part of the cloud expression.
  • CloudExpression[][] retrieves the value of the entire cloud expression.
  • CloudExpression[][part1,part2,]=value sets the value of part of a cloud expression.
  • The following operations can be performed on CloudExpression objects:
  • Getget the complete value of the cloud expression
    Putput a new complete value into the cloud expression
    Partreturn a cloud expression object that represents the part
    Setassign new values to parts of the cloud expression
    Unsetremove parts from the cloud expression
    AppendToappend to a list or association within the cloud expression
    AssociateToassociate a new value to a key in an association
    AddTo,Increment,add, increment, etc. parts in the cloud expression
    DeleteCloudExpressiondelete the cloud expression
    Lengthreturn the length of the cloud expression
    KeyExistsQtest if a key exists in the cloud expression
    SetOptionsset options associated with the cloud expression
    Optionsget the options associated with the cloud expression
    SetPermissionsset permissions of the cloud expression
    ClearPermissionsclear permissions of the cloud expression
  • CloudExpression[][[part1,part2,]] gives CloudExpression[,part1,part2,], from which the value can be retrieved using Get.
  • Cloud expressions have the following options, whose values are stored in the cloud:
  • PartProtectionAutomaticwhich parts are protected from change
    PermissionsAutomaticpermissions for access etc.
  • After creating a cloud expression with CreateCloudExpression, options for cloud expressions can be retrieved using Options and changed using SetOptions.
  • In associations, when a mutable operation is applied to a missing key, the associated value is initialized before the operation is applied.
  • Setassociate the missing key to the value specified in Set
    AssociateToinitialize the value to an empty association
    AppendToinitialize the value to an empty list
    AddTo, Increment, ...initialize the value to 0
    TimesBy, DivideByinitialize the value to 1

Examples

open allclose all

Basic Examples  (2)

Create an anonymous cloud expression storing a list:

In[1]:=
Click for copyable input
Out[1]=

Retrieve a part from the cloud expression:

In[2]:=
Click for copyable input
Out[2]=

Reset a part in the cloud expression:

In[3]:=
Click for copyable input
Out[3]=

Get the value of the whole cloud expression:

In[4]:=
Click for copyable input
Out[4]=

Append a value to the cloud expression:

In[5]:=
Click for copyable input

Delete a value:

In[6]:=
Click for copyable input

Get the final value of the whole cloud expression:

In[7]:=
Click for copyable input
Out[7]=

Create an anonymous cloud expression storing an association:

In[1]:=
Click for copyable input
Out[1]=

Update the value of a key:

In[2]:=
Click for copyable input

Add a new key:

In[3]:=
Click for copyable input

Delete a key:

In[4]:=
Click for copyable input

Get the final value of the whole cloud expression:

In[5]:=
Click for copyable input
Out[5]=

Scope  (9)

Options  (2)

Properties & Relations  (8)

Possible Issues  (4)

Neat Examples  (3)

See Also

CreateCloudExpression  CloudExpressions  DeleteCloudExpression  CloudSymbol  CloudObject  Databin

Introduced in 2016
(10.4)