Statement MembersAerospike

The Statement type exposes the following members.
Constructors

  NameDescription
Public methodStatement
Initializes a new instance of the Statement class
Back to Top
Methods

  NameDescription
Public methodSetAggregateFunction(String, String,  Value )
Set Lua aggregation function parameters for a Lua package located on the filesystem. This function will be called on both the server and client for each selected item.
Public methodSetAggregateFunction(String, String, String,  Value )
Set Lua aggregation function parameters for a Lua package located in a string with lua code. This function will be called on both the server and client for each selected item.
Public methodSetAggregateFunction(Assembly, String, String, String,  Value )
Set Lua aggregation function parameters for a Lua package located in an assembly resource. This function will be called on both the server and client for each selected item.
Public methodSetBinNames
Set query bin names.
Public methodSetFilter
Set optional query index filter. This filter is applied to the secondary index on query. Query index filters must reference a bin which has a secondary index defined.
Public methodSetFilters
Set optional query index filters. Currently, only one filter is allowed by the server on a secondary index lookup. If multiple filters are necessary, see QueryFilter example for a workaround. QueryFilter demonstrates how to add additional filters in an user-defined aggregation function.

This method is obsolete. Use SetFilter(Filter) instead.

Public methodSetIndexName
Set optional query index name. If not set, the server will determine the index from the filter's bin name.
Public methodSetNamespace
Set query namespace.
Public methodSetPredExp
Set optional predicate expression filters in postfix notation. Predicate expression filters are applied on the query results on the server. Predicate expression filters may occur on any bin in the record. Requires Aerospike Server versions >= 3.12.

Postfix notation is described here: Onlinehttp://wiki.c2.com/?PostfixNotation

Example:

            // (c >= 11 and c <= 20) or (d > 3 and (d < 5)
            stmt.SetPredExp(
              PredExp.IntegerBin("c"),
              PredExp.IntegerValue(11),
              PredExp.IntegerGreaterEq(),
              PredExp.IntegerBin("c"),
              PredExp.IntegerValue(20),
              PredExp.IntegerLessEq(),
              PredExp.And(2),
              PredExp.IntegerBin("d"),
              PredExp.IntegerValue(3),
              PredExp.IntegerGreater(),
              PredExp.IntegerBin("d"),
              PredExp.IntegerValue(5),
              PredExp.IntegerLess(),
              PredExp.And(2),
              PredExp.Or(2)
            );
            
            // Record last update time > 2017-01-15
            stmt.SetPredExp(
              PredExp.RecLastUpdate(),
              PredExp.IntegerValue(new DateTime(2017, 0, 15)),
              PredExp.IntegerGreater(),
            ); 
            

This is an experimental method and subject to change.

Public methodSetSetName
Set optional query set name.
Public methodSetTaskId
Set optional query task id.
Back to Top
Properties

  NameDescription
Public propertyBinNames
Query bin names.
Public propertyFilter
Optional query filter. This filter is applied to the secondary index on query. Query index filters must reference a bin which has a secondary index defined.
Public propertyFilters
Optional query filters. Currently, only one filter is allowed by the server on a secondary index lookup. If multiple filters are necessary, see QueryFilter example for a workaround. QueryFilter demonstrates how to add additional filters in an user-defined aggregation function.

This property is obsolete. Use Filter instead.

Public propertyFunctionArgs
Arguments to pass to function name, if any. Used by aggregate queries only.
Public propertyFunctionName
Aggregation function name. Used by aggregate queries only.
Public propertyIndexName
Optional query index name. If not set, the server will determine the index from the filter's bin name.
Public propertyNamespace
Query namespace.
Public propertyPackageContents
String containing lua code that comprises a package. Used by aggregate queries only when aggregation function is defined in a string.
Public propertyPackageName
Server package where user defined function resides. Used by aggregate queries only.
Public propertyPredExp
Optional predicate expression filters in postfix notation.

This is an experimental property and subject to change.

Public propertyResourceAssembly
Assembly where resource is located. Current assembly can be obtained by: Assembly.GetExecutingAssembly(). Used by aggregate queries only.
Public propertyResourcePath
Namespace path where Lua resource is located. Example: Aerospike.Client.Resources.mypackage.lua Used by aggregate queries only.
Public propertySetName
Optional query set name.
Public propertyTaskId
Optional query task id.
Back to Top
See Also