A helper class used to assist in building valid SQL statements.
An instance of this class is passed in to the SearchScope.FetchObjects and SearchScope.FetchRows methods to perform a query.
The SearchSQL
class can be used in either of the following ways:
- Use the helper methods to specify the parts of the SQL statement. For example, use SetFromClauseInitialValue to set the name of the class being searched, SetSelectList to set the names of the properties to include, and SetWhereClause to specify what to search for. When the
SearchSQL
instance is passed in as an argument to SearchScope.FetchRows
, the complete SQL statement string is constructed out of the parts supplied by the calls to the SearchSQL
helper methods. You also can get the complete SQL statement string constructed by calling the ToString method. - Pass in a complete SQL statement. If you have the complete SQL statement that needs to be executed, pass the SQL statement into either the SetQueryString method or the SearchSQL(String) constructor. The
SearchSQL
instance is then complete, and no other SearchSQL
method can be called on this instance.
The settings for the following properties can directly affect the search criteria:
ObjectStore.DefaultQueryTimeLimit
ObjectStore.MaxQueryTimeLimit
IServerCacheConfiguration.QueryPageMaxSize
IServerCacheConfiguration.QueryPageDefaultSize
IServerCacheConfiguration.NonPagedQueryMaxSize
Note |
---|
Date/Time values in queries are evaluated with respect to the Content Engine server clock. If the client and server clocks are not in sync, be careful when translating relative time concepts into absolute times. For example, specifying a value that means "within the last 5 minutes" on the client will translate to a comparison to an absolute time in the SQL query, which may not mean "within the last 5 minutes" relative to the server clock. |
Namespace: FileNet.Api.QueryAssembly: FileNet.Api (in filenet.api.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Class SearchSQL |
JScript |
---|
public class SearchSQL |
Inheritance Hierarchy
Thread Safety
Public static (Shared in Visual Basic)staticShared members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
See Also