Click or drag to resize

DatabaseDBExistsCache Method

Determines if a particular record exists. For better performance and clarity, use this instead of DBCount(String, String, String, DataFuncOptions, String) to determine if a record or records exist. DBExistsCache is an enhancement to the existing DBExists function. Ultimately we still use the same DBExists mechanism to retrieve the required value but the result is cached to Thread Local Storage. Subsequent requests to check existence of the same value (using the SAME SQL) will pull that value from the thread cache rather than hitting the database.

Namespace:  NetQuarry
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
public bool DBExistsCache(
	string table,
	string where,
	DataFuncOptions options = ,
	string logSource = null
)

Parameters

table
Type: SystemString
The table in which to query.
where
Type: SystemString
The WHERE clause (without the WHERE) identifing item(s) of interest.
options (Optional)
Type: NetQuarryDataFuncOptions
Options specifying how the query should be performed.
logSource (Optional)
Type: SystemString
The source of the operation, to be logged to the devlog.

Return Value

Type: Boolean
True if one or more matching records exists, else False.

Implements

IDatabaseDBExistsCache(String, String, DataFuncOptions, String)
See Also