ITableOperationsSearchRecords Method

Locally searches retrieved table records after queried from database for the specified sorting and search parameters. Search executed against fields modeled with SearchableAttribute. Function only typically used for record models that apply the EncryptDataAttribute.

Definition

Namespace: Gemstone.Data.Model
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.128 -- Release Build+cb657b646daac3e9cc5384ff42ed4530df50eab1
Object?[]? SearchRecords(
	string sortField,
	bool ascending,
	StringComparison comparison = StringComparison.OrdinalIgnoreCase,
	params IRecordFilter?[]? recordFilter
)

Parameters

sortField  String
Field name to order-by.
ascending  Boolean
Sort ascending flag; set to false for descending.
comparison  StringComparison  (Optional)
StringComparison to use when searching string fields; defaults to ordinal ignore case.
recordFilter  IRecordFilter
Record Filters to be applied.

Return Value

Object
An array of modeled table row instances for the queried records that match the search.

Remarks

This function searches records locally after query from database, this way Search functionality will work even with fields that are modeled with the EncryptDataAttribute and use restrictions not being = or =/=. Primary keys for this function will not be cached server-side and this function will be slower and more expensive than similar calls to QueryRecords(String, Boolean, Int32, Int32, IRecordFilter). Usage should be restricted to cases searching for field data that has been modeled with the EncryptDataAttribute.

This function does not paginate records, instead a full list of search records is returned. User can cache returned records and page through them using the GetPageOfRecords(Object, Int32, Int32) function. As a result, usage should be restricted to smaller data sets.

See Also