本文整理汇总了C#中Aerospike.Client.Value类的典型用法代码示例。如果您正苦于以下问题:C# Value类的具体用法?C# Value怎么用?C# Value使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Value类属于Aerospike.Client命名空间,在下文中一共展示了Value类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Qualifier
public Qualifier(String field, FilterOperation operation, Value value1)
: this()
{
internalMap[FIELD] = field;
internalMap[OPERATION] = operation;
internalMap[VALUE1] = value1;
}
示例2: LargeList
/// <summary>
/// Initialize large list operator.
/// </summary>
/// <param name="client">client</param>
/// <param name="policy">generic configuration parameters, pass in null for defaults</param>
/// <param name="key">unique record identifier</param>
/// <param name="binName">bin name</param>
public LargeList(AerospikeClient client, WritePolicy policy, Key key, string binName)
{
this.client = client;
this.policy = policy;
this.key = key;
this.binName = Value.Get(binName);
}
示例3: LargeSet
/// <summary>
/// Initialize large set operator.
/// </summary>
/// <param name="client">client</param>
/// <param name="policy">generic configuration parameters, pass in null for defaults</param>
/// <param name="key">unique record identifier</param>
/// <param name="binName">bin name</param>
/// <param name="createModule">Lua function name that initializes list configuration parameters, pass null for default set</param>
public LargeSet(AerospikeClient client, WritePolicy policy, Key key, string binName, string createModule)
{
this.client = client;
this.policy = policy;
this.key = key;
this.binName = Value.Get(binName);
this.createModule = Value.Get(createModule);
}
示例4: ExecuteCommand
public ExecuteCommand(Cluster cluster, WritePolicy writePolicy, Key key, string packageName, string functionName, Value[] args)
: base(cluster, writePolicy, key, null)
{
this.writePolicy = writePolicy;
this.packageName = packageName;
this.functionName = functionName;
this.args = args;
}
示例5: AsyncExecute
public AsyncExecute(AsyncCluster cluster, WritePolicy writePolicy, ExecuteListener listener, Key key, string packageName, string functionName, Value[] args)
: base(cluster, writePolicy, null, key, null)
{
this.writePolicy = writePolicy;
this.executeListener = listener;
this.packageName = packageName;
this.functionName = functionName;
this.args = args;
}
示例6: Add
public void Add(Value value)
{
Key subKey = MakeSubKey (value);
client.Put (this.policy, subKey, new Bin (ListElementBinName, value));
// add the digest of the subKey to the CDT List in the Customer record
client.Operate(this.policy, this.key, ListOperation.Append(this.binNameString, Value.Get(subKey.digest)));
}
示例7: Append
/// <summary>
/// Create list append operation.
/// Server appends value to end of list bin.
/// Server returns list size.
/// </summary>
public static Operation Append(string binName, Value value)
{
Packer packer = new Packer();
packer.PackRawShort(APPEND);
packer.PackArrayBegin(1);
value.Pack(packer);
byte[] bytes = packer.ToByteArray();
return new Operation(Operation.Type.CDT_MODIFY, binName, Value.Get(bytes));
}
示例8: CreateOperation
protected internal static Operation CreateOperation(int command, int attributes, string binName, Value value1, Value value2)
{
Packer packer = new Packer();
packer.PackRawShort(command);
packer.PackArrayBegin(3);
value1.Pack(packer);
value2.Pack(packer);
packer.PackNumber(attributes);
return new Operation(Operation.Type.MAP_MODIFY, binName, Value.Get(packer.ToByteArray()));
}
示例9: Key
/// <summary>
/// Initialize key from namespace, optional set name and user key.
/// The set name and user defined key are converted to a digest before sending to the server.
/// The user key is not used or returned by the server by default. If the user key needs
/// to persist on the server, use one of the following methods:
/// <list type="bullet">
/// <item>Set "WritePolicy.sendKey" to true. In this case, the key will be sent to the server for storage on writes
/// and retrieved on multi-record scans and queries.</item>
/// <item>Explicitly store and retrieve the key in a bin.</item>
/// </list>
/// </summary>
/// <param name="ns">namespace</param>
/// <param name="setName">optional set name, enter null when set does not exist</param>
/// <param name="key">user defined unique identifier within set.</param>
/// <exception cref="AerospikeException">if digest computation fails</exception>
public Key(string ns, string setName, Value key)
{
this.ns = ns;
this.setName = setName;
this.userKey = key;
// Some value types can't be used as keys (csblob, list, map, null). Verify key type.
key.ValidateKeyType();
digest = ComputeDigest(setName, key);
}
示例10: Range
/// <summary>
/// Select range of values from list.
/// </summary>
/// <param name="begin">begin value inclusive</param>
/// <param name="end">end value inclusive</param>
public IList Range(Value begin, Value end)
{
return (IList)client.Execute(policy, key, PackageName, "range", binName, begin, end);
}
示例11: FindThenFilter
/// <summary>
/// Select values from list and apply specified Lua filter.
/// </summary>
/// <param name="value">value to select</param>
/// <param name="filterModule">Lua module name which contains filter function</param>
/// <param name="filterName">Lua function name which applies filter to returned list</param>
/// <param name="filterArgs">arguments to Lua function name</param>
public IList FindThenFilter(Value value, string filterModule, string filterName, params Value[] filterArgs)
{
return (IList)client.Execute(policy, key, PackageName, "find_then_filter", binName, value, Value.Get(filterModule), Value.Get(filterName), Value.Get(filterArgs));
}
示例12: FindFrom
/// <summary>
/// Select values from the begin key up to a maximum count.
/// Supported by server versions >= 3.5.8.
/// </summary>
/// <param name="begin">start value (inclusive)</param>
/// <param name="count">maximum number of values to return</param>
public IList FindFrom(Value begin, int count)
{
return (IList)client.Execute(policy, key, PackageName, "find_from", binName, begin, Value.Get(count));
}
示例13: Find
/// <summary>
/// Select values from list.
/// </summary>
/// <param name="value">value to select</param>
public IList Find(Value value)
{
return (IList)client.Execute(policy, key, PackageName, "find", binName, value);
}
示例14: Get
/// <summary>
/// Select value from set.
/// </summary>
/// <param name="value">value to select</param>
public object Get(Value value)
{
return client.Execute(policy, key, PackageName, "get", binName, value);
}
示例15: Remove
/// <summary>
/// Delete values from list between range. Return count of entries removed.
/// </summary>
/// <param name="begin">low value of the range (inclusive)</param>
/// <param name="end">high value of the range (inclusive)</param>
public int Remove(Value begin, Value end)
{
object result = client.Execute(policy, key, PackageName, "remove_range", binName, begin, end);
return (result != null) ? (int)(long)result : 0;
}