本文整理汇总了C#中Aerospike.Client.Value类的典型用法代码示例。如果您正苦于以下问题:C# Value类的具体用法?C# Value怎么用?C# Value使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Value类属于Aerospike.Client命名空间,在下文中一共展示了Value类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Qualifier
public Qualifier(String field, FilterOperation operation, Value value1)
: this()
{
internalMap[FIELD] = field;
internalMap[OPERATION] = operation;
internalMap[VALUE1] = value1;
}
开发者ID:helipilot50,项目名称:aerospike-helper,代码行数:7,代码来源:Qualifier.cs
示例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);
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:14,代码来源:LargeList.cs
示例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);
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:16,代码来源:LargeSet.cs
示例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;
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:8,代码来源:ExecuteCommand.cs
示例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;
}
开发者ID:Caldas,项目名称:aerospike-client-csharp,代码行数:9,代码来源:AsyncExecute.cs
示例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)));
}
开发者ID:helipilot50,项目名称:Aerospike-list-expansion,代码行数:9,代码来源:LargeList.cs
示例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));
}
开发者ID:Caldas,项目名称:aerospike-client-csharp,代码行数:14,代码来源:ListOperation.cs
示例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()));
}
开发者ID:Caldas,项目名称:aerospike-client-csharp,代码行数:10,代码来源:MapBase.cs
示例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);
}
开发者ID:Caldas,项目名称:aerospike-client-csharp,代码行数:26,代码来源:Key.cs
示例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);
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:9,代码来源:LargeList.cs
示例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));
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:11,代码来源:LargeList.cs
示例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));
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:10,代码来源:LargeList.cs
示例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);
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:8,代码来源:LargeList.cs
示例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);
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:8,代码来源:LargeSet.cs
示例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;
}
开发者ID:vonbv,项目名称:aerospike-client-csharp,代码行数:10,代码来源:LargeList.cs
示例16: Find
public IList Find(Value value)
{
Key subKey = MakeSubKey (value);
Record record = client.Get (this.policy, subKey, ListElementBinName);
if (record != null) {
Object result = record.GetValue (ListElementBinName);
return new List<Object> (){ result };
} else {
return null;
}
}
开发者ID:helipilot50,项目名称:Aerospike-list-expansion,代码行数:11,代码来源:LargeList.cs
示例17: Exists
public bool Exists(Value keyValue)
{
Key subKey = MakeSubKey (keyValue);
return client.Exists (this.policy, subKey);
}
开发者ID:helipilot50,项目名称:Aerospike-list-expansion,代码行数:5,代码来源:LargeList.cs
示例18: MakeSubKey
private Key MakeSubKey(Value value)
{
Key subKey;
String valueString;
if (value is Value.MapValue) {
IDictionary map = (IDictionary) value.Object;
valueString = map ["key"].ToString();
} else {
valueString = value.ToString ();
}
string subKeyString = String.Format ("{0}::{1}", this.key.userKey.ToString (), valueString);
subKey = new Key (this.key.ns, this.key.setName, subKeyString);
return subKey;
}
开发者ID:helipilot50,项目名称:Aerospike-list-expansion,代码行数:18,代码来源:LargeList.cs
示例19: Update
public void Update(Value value)
{
if (Size () == 0) {
Add (value);
} else {
Key subKey = MakeSubKey (value);
client.Put (this.policy, subKey, new Bin (ListElementBinName, value));
}
}
开发者ID:helipilot50,项目名称:Aerospike-list-expansion,代码行数:9,代码来源:LargeList.cs
示例20: Exists
/// <summary>
/// Check existence of value in the set.
/// </summary>
/// <param name="value">value to check</param>
public bool Exists(Value value)
{
object result = client.Execute(policy, key, PackageName, "exists", binName, value);
return Util.ToBool(result);
}
开发者ID:Caldas,项目名称:aerospike-client-csharp,代码行数:9,代码来源:LargeSet.cs
注:本文中的Aerospike.Client.Value类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论