C# OJAI Client API
MapRDB.Driver.Ojai.OjaiDocumentMutation Class Reference
Inheritance diagram for MapRDB.Driver.Ojai.OjaiDocumentMutation:
MapRDB.Driver.Ojai.IDocumentMutation

Public Member Functions

string ToJsonString ()
 Parse document mutation condition into JSON string. More...
 
string ToJsonString (Formatting formatting)
 Parse document mutation condition into JSON string. More...
 
IDocumentMutation SetNull (string path)
 Sets the field at the given FieldPath to null. More...
 
IDocumentMutation Set (string path, bool value)
 Sets the field at the given FieldPath to the specified bool value. More...
 
IDocumentMutation Set (string path, Byte[] value)
 Sets the field at the given FieldPath to the specified value. More...
 
IDocumentMutation Set (string path, byte value)
 Sets the field at the given FieldPath to the specified byte value. More...
 
IDocumentMutation Set (string path, short value)
 Sets the field at the given FieldPath to the specified short value. More...
 
IDocumentMutation Set (string path, int value)
 Sets the field at the given FieldPath to the specified int value. More...
 
IDocumentMutation Set (string path, long value)
 Sets the field at the given FieldPath to the specified long value. More...
 
IDocumentMutation Set (string path, float value)
 Sets the field at the given FieldPath to the specified float value. More...
 
IDocumentMutation Set (string path, double value)
 Sets the field at the given FieldPath to the specified double value. More...
 
IDocumentMutation Set (string path, string value)
 Sets the field at the given FieldPath to the specified string value. More...
 
IDocumentMutation Set (string path, decimal value)
 Sets the field at the given FieldPath to the specified decimal value. More...
 
IDocumentMutation Set (string path, OjaiDate value)
 Sets the field at the given FieldPath to the specified OjaiDate value. More...
 
IDocumentMutation Set (string path, OjaiTime value)
 Sets the field at the given FieldPath to the specified OjaiTime value. More...
 
IDocumentMutation Set (string path, OjaiTimestamp value)
 Sets the field at the given FieldPath to the specified OjaiTimestamp value. More...
 
IDocumentMutation Set (string path, OjaiInterval value)
 Sets the field at the given FieldPath to the specified OjaiInterval value. More...
 
IDocumentMutation Set (string path, IList< OjaiValue > value)
 Sets the field at the given FieldPath to the specified list value. More...
 
IDocumentMutation Set (string path, IDictionary< string, OjaiValue > value)
 Sets the field at the given FieldPath to the specified dictionary value. More...
 
IDocumentMutation Set (string path, IDocument value)
 Sets the field at the given FieldPath to the specified document value. More...
 
IDocumentMutation SetOrReplaceNull (string path)
 Sets or replaces the field at the given FieldPath to null. More...
 
IDocumentMutation SetOrReplace (string path, Byte[] value)
 Sets or replaces the field at the given FieldPath to the specified value. More...
 
IDocumentMutation SetOrReplace (string path, bool value)
 Sets or replaces the field at the given FieldPath to the specified bool value. More...
 
IDocumentMutation SetOrReplace (string path, byte value)
 Sets or replaces the field at the given FieldPath to the specified byte value. More...
 
IDocumentMutation SetOrReplace (string path, short value)
 Sets or replaces the field at the given FieldPath to the specified short value. More...
 
IDocumentMutation SetOrReplace (string path, int value)
 Sets or replaces the field at the given FieldPath to the specified int value. More...
 
IDocumentMutation SetOrReplace (string path, long value)
 Sets or replaces the field at the given FieldPath to the specified long value. More...
 
IDocumentMutation SetOrReplace (string path, float value)
 Sets or replaces the field at the given FieldPath to the specified float value. More...
 
IDocumentMutation SetOrReplace (string path, double value)
 Sets or replaces the field at the given FieldPath to the specified double value. More...
 
IDocumentMutation SetOrReplace (string path, string value)
 Sets or replaces the field at the given FieldPath to the specified string value. More...
 
IDocumentMutation SetOrReplace (string path, decimal value)
 Sets or replaces the field at the given FieldPath to the specified decimal value. More...
 
IDocumentMutation SetOrReplace (string path, OjaiDate value)
 Sets or replaces the field at the given FieldPath to the specified OjaiDate value. More...
 
IDocumentMutation SetOrReplace (string path, OjaiTime value)
 Sets or replaces the field at the given FieldPath to the specified OjaiTime value. More...
 
IDocumentMutation SetOrReplace (string path, OjaiTimestamp value)
 Sets or replaces the field at the given FieldPath to the specified OjaiTimestamp value. More...
 
IDocumentMutation SetOrReplace (string path, OjaiInterval value)
 Sets or replaces the field at the given FieldPath to the specified OjaiInterval value. More...
 
IDocumentMutation SetOrReplace (string path, IList< OjaiValue > value)
 Sets or replaces the field at the given FieldPath to the specified list value. More...
 
IDocumentMutation SetOrReplace (string path, IDictionary< string, OjaiValue > value)
 Sets or replaces the field at the given FieldPath to the specified dictionary value. More...
 
IDocumentMutation SetOrReplace (string path, IDocument value)
 Sets or replaces the field at the given FieldPath to the specified document value. More...
 
IDocumentMutation Append (string path, IList< OjaiValue > value)
 Appends elements of the given list to an existing ARRAY at the given FieldPath. If the field doesn't exist on document store, it will be created and will be Set to the specified List. If the field already exists, but is not of ARRAY type, then this operation will fail. More...
 
IDocumentMutation Append (string path, string value)
 Appends the given string to an existing STRING at the given FieldPath. If the field doesn't exist on document store, it will be created and will be Set to the specified string. If the field already exists, but is not of STRING type, then this operation will fail. More...
 
IDocumentMutation Append (string path, byte[] value, int offSet, int len)
 Appends the given byte array to an existing BINARY value at the given FieldPath. If the field doesn't exist on document store, it will be created and will be Set to the BINARY value specified by the given byte array. If the field already exists, but is not of BINARY type, then this operation will fail. More...
 
IDocumentMutation Append (string path, byte[] value)
 Appends the given byte array to an existing BINARY value at the given FieldPath. If the field doesn't exist on document store, it will be created and will be Set to the BINARY value specified by the given byte array. If the field already exists, but is not of BINARY type, then this operation will fail. More...
 
IDocumentMutation Merge (string path, IDocument value)
 Merges the existing MAP at the given FieldPath with the specified Document. More...
 
IDocumentMutation Merge (string path, IDictionary< string, OjaiValue > value)
 Merges the existing MAP at the given FieldPath with the specified Map. More...
 
IDocumentMutation Increment (string path)
 Atomically applies an increment to a given field (in dot separated notation) of the given document id. If the field doesn't exist on the server then it will be created with the type of the incremental value. The increment operation can be applied on any of the numeric types, such as byte, short, int, long, float, double, or decimal, of a field. The operation will fail if the increment is applied to a field that is of a non-numeric type. More...
 
IDocumentMutation Increment (string path, byte inc)
 
IDocumentMutation Increment (string path, short inc)
 
IDocumentMutation Increment (string path, int inc)
 
IDocumentMutation Increment (string path, long inc)
 
IDocumentMutation Increment (string path, float inc)
 
IDocumentMutation Increment (string path, double inc)
 
IDocumentMutation Increment (string path, decimal inc)
 
IDocumentMutation Decrement (string path)
 Atomically decrements the given field (in dot separated notation) of the given row id. More...
 
IDocumentMutation Decrement (string path, byte dec)
 
IDocumentMutation Decrement (string path, short dec)
 
IDocumentMutation Decrement (string path, int dec)
 
IDocumentMutation Decrement (string path, long dec)
 
IDocumentMutation Decrement (string path, float dec)
 
IDocumentMutation Decrement (string path, double dec)
 
IDocumentMutation Decrement (string path, decimal dec)
 
IDocumentMutation Delete (string path)
 Deletes the field at the given path. If the field does not exist, the mutation operation will silently succeed. For example, if a delete operation is attempted on "a.b.c", and the field "a.b" is an array, then "a.b.c" will not be deleted. More...
 

Private Member Functions

void SetMutation (string path, MutationOp op, OjaiValue value)
 Private method to set mutation. More...
 

Private Attributes

IDictionary< string, OjaiValue_internalDictionary
 

Member Function Documentation

◆ Append() [1/4]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Append ( string  path,
IList< OjaiValue value 
)

Appends elements of the given list to an existing ARRAY at the given FieldPath. If the field doesn't exist on document store, it will be created and will be Set to the specified List. If the field already exists, but is not of ARRAY type, then this operation will fail.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Append() [2/4]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Append ( string  path,
string  value 
)

Appends the given string to an existing STRING at the given FieldPath. If the field doesn't exist on document store, it will be created and will be Set to the specified string. If the field already exists, but is not of STRING type, then this operation will fail.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Append() [3/4]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Append ( string  path,
byte []  value,
int  offSet,
int  len 
)

Appends the given byte array to an existing BINARY value at the given FieldPath. If the field doesn't exist on document store, it will be created and will be Set to the BINARY value specified by the given byte array. If the field already exists, but is not of BINARY type, then this operation will fail.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Append() [4/4]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Append ( string  path,
byte []  value 
)

Appends the given byte array to an existing BINARY value at the given FieldPath. If the field doesn't exist on document store, it will be created and will be Set to the BINARY value specified by the given byte array. If the field already exists, but is not of BINARY type, then this operation will fail.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Decrement()

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Decrement ( string  path)

Atomically decrements the given field (in dot separated notation) of the given row id.

If the field path specified for the decrement operation doesn't exist in the document in document store, then this operation will create a new element at the given path. This new element will be of same type as the value specified in the parameter.

This operation will fail if the type of any intermediate path elements specified in the append field path doesn't match the type of the corresponding field in the document stored on the document store. For example, an operation on field "a.b.c" will fail if, on the document store, document a itself is an array or integer.

If the field doesn't exist in the document store then it will be created with the type of given decremental value. A decrement operation can be applied on any of the numeric types of a field, such as byte, short, int, long, float, double, or decimal. The operation will fail if the decrement is applied to a field that is of a non-numeric type.

The decrement operation won't change the type of the existing value stored in the given field for the row. The resultant value of the field will be truncated based on the original type of the field.

For example, field 'score' is of type int and contains 60. The decrement '5.675', a double, is applied. The resultant value of the field will be 54 (54.325 will be truncated to 54).

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Delete()

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Delete ( string  path)

Deletes the field at the given path. If the field does not exist, the mutation operation will silently succeed. For example, if a delete operation is attempted on "a.b.c", and the field "a.b" is an array, then "a.b.c" will not be deleted.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Increment()

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Increment ( string  path)

Atomically applies an increment to a given field (in dot separated notation) of the given document id. If the field doesn't exist on the server then it will be created with the type of the incremental value. The increment operation can be applied on any of the numeric types, such as byte, short, int, long, float, double, or decimal, of a field. The operation will fail if the increment is applied to a field that is of a non-numeric type.

If an id doesn't exist, it gets created (similar to the insertOrReplace behavior). And it is created, with the value of 'inc' parameter. The same logic applies to intermittent paths in the path: they get created top to bottom.

If the type is different than the field in the operation, it fails.

The increment operation won't change the type of existing value stored in the given field for the document. The resultant value of the field will be truncated based on the original type of the field.

For example, if a field 'score' is of type int and contains 60 and an increment of double '5.675' is applied, then the resultant value of the field will be 65 (65.675 will be truncated to 65).

If the type to which the increment is applied is a byte, short, or int, then it needs to use long as the operation.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Merge() [1/2]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Merge ( string  path,
IDocument  value 
)

Merges the existing MAP at the given FieldPath with the specified Document.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Merge() [2/2]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Merge ( string  path,
IDictionary< string, OjaiValue value 
)

Merges the existing MAP at the given FieldPath with the specified Map.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [1/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
bool  value 
)

Sets the field at the given FieldPath to the specified bool value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [2/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
Byte []  value 
)

Sets the field at the given FieldPath to the specified value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [3/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
byte  value 
)

Sets the field at the given FieldPath to the specified byte value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [4/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
short  value 
)

Sets the field at the given FieldPath to the specified short value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [5/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
int  value 
)

Sets the field at the given FieldPath to the specified int value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [6/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
long  value 
)

Sets the field at the given FieldPath to the specified long value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [7/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
float  value 
)

Sets the field at the given FieldPath to the specified float value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [8/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
double  value 
)

Sets the field at the given FieldPath to the specified double value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [9/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
string  value 
)

Sets the field at the given FieldPath to the specified string value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [10/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
decimal  value 
)

Sets the field at the given FieldPath to the specified decimal value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [11/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
OjaiDate  value 
)

Sets the field at the given FieldPath to the specified OjaiDate value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [12/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
OjaiTime  value 
)

Sets the field at the given FieldPath to the specified OjaiTime value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [13/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
OjaiTimestamp  value 
)

Sets the field at the given FieldPath to the specified OjaiTimestamp value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [14/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
OjaiInterval  value 
)

Sets the field at the given FieldPath to the specified OjaiInterval value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [15/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
IList< OjaiValue value 
)

Sets the field at the given FieldPath to the specified list value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [16/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
IDictionary< string, OjaiValue value 
)

Sets the field at the given FieldPath to the specified dictionary value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ Set() [17/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.Set ( string  path,
IDocument  value 
)

Sets the field at the given FieldPath to the specified document value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetMutation()

void MapRDB.Driver.Ojai.OjaiDocumentMutation.SetMutation ( string  path,
MutationOp  op,
OjaiValue  value 
)
private

Private method to set mutation.

◆ SetNull()

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetNull ( string  path)

Sets the field at the given FieldPath to null.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [1/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
Byte []  value 
)

Sets or replaces the field at the given FieldPath to the specified value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [2/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
bool  value 
)

Sets or replaces the field at the given FieldPath to the specified bool value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [3/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
byte  value 
)

Sets or replaces the field at the given FieldPath to the specified byte value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [4/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
short  value 
)

Sets or replaces the field at the given FieldPath to the specified short value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [5/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
int  value 
)

Sets or replaces the field at the given FieldPath to the specified int value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [6/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
long  value 
)

Sets or replaces the field at the given FieldPath to the specified long value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [7/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
float  value 
)

Sets or replaces the field at the given FieldPath to the specified float value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [8/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
double  value 
)

Sets or replaces the field at the given FieldPath to the specified double value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [9/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
string  value 
)

Sets or replaces the field at the given FieldPath to the specified string value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [10/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
decimal  value 
)

Sets or replaces the field at the given FieldPath to the specified decimal value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [11/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
OjaiDate  value 
)

Sets or replaces the field at the given FieldPath to the specified OjaiDate value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [12/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
OjaiTime  value 
)

Sets or replaces the field at the given FieldPath to the specified OjaiTime value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [13/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
OjaiTimestamp  value 
)

Sets or replaces the field at the given FieldPath to the specified OjaiTimestamp value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [14/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
OjaiInterval  value 
)

Sets or replaces the field at the given FieldPath to the specified OjaiInterval value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [15/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
IList< OjaiValue value 
)

Sets or replaces the field at the given FieldPath to the specified list value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [16/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
IDictionary< string, OjaiValue value 
)

Sets or replaces the field at the given FieldPath to the specified dictionary value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplace() [17/17]

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplace ( string  path,
IDocument  value 
)

Sets or replaces the field at the given FieldPath to the specified document value.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ SetOrReplaceNull()

IDocumentMutation MapRDB.Driver.Ojai.OjaiDocumentMutation.SetOrReplaceNull ( string  path)

Sets or replaces the field at the given FieldPath to null.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ ToJsonString() [1/2]

string MapRDB.Driver.Ojai.OjaiDocumentMutation.ToJsonString ( )

Parse document mutation condition into JSON string.

Implements MapRDB.Driver.Ojai.IDocumentMutation.

◆ ToJsonString() [2/2]

string MapRDB.Driver.Ojai.OjaiDocumentMutation.ToJsonString ( Formatting  formatting)

Parse document mutation condition into JSON string.

Implements MapRDB.Driver.Ojai.IDocumentMutation.