Search methods search the database based on a supplied opcode. Subsequent to the search operation, the cursor is positioned at the first object that matches the given parameters.
MCO_RET classname_indexname_search( /*IN*/ mco_trans_h trans, /*INOUT*/ mco_cursor_h cursor, /*IN*/ MCO_OPCODE op, /*IN*/ [const] <type> [*]param1, [[/*IN*/ uint2 len1,], [/*IN*/ [const] <type> [*]param2, [/*IN*/ uint2 len2,] ...]);
trans
mco_trans_start().cursor
classname_indexname_index_cursor().op
MCO_OPCODE.param1
type, where type is the data type of the classname.fieldname
component of the index. If the index component is char or string, the param is a const char *.len1
param1 is a char or string, len1 specifies the length of the input buffer.param2
len2
param2 thru paramN are char or string, each such parameter argument is
followed by a lenN parameter to specify the length of the paramN buffer.Search methods search the database based on a supplied opcode. Subsequent to the search operation, the cursor is positioned at the first object that matches the given parameters.
typedef enum MCO_OPCODE_E_
{
MCO_LT = 1,
MCO_LE = 2,
MCO_EQ = 3,
MCO_GE = 4,
MCO_GT = 5
} MCO_OPCODE;
MCO_S_OK
MCO_S_NOTFOUND
MCO_E_VOLUNTARY_NOT_EXIST
indexname is voluntary and has not been created, or was dropped.MCO_E_ILLEGAL_PARAM
MCO_E_NOMEM
MCO_ERR_CURSOR