An instance of this class is passed in to the
The
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, andSetWhereClause to specify what to search for. When the
instance is passed in as an argument toSearchSQL
, the complete SQL statement string is constructed out of the parts supplied by the calls to theSearchScope.FetchRows
helper methods. You also can get the complete SQL statement string constructed by calling theSearchSQL 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 theSearchSQL(String) constructor. The
instance is then complete, and no otherSearchSQL
method can be called on this instance.SearchSQL
The settings for the following properties can directly affect the search criteria:
ObjectStore.DefaultQueryTimeLimit ObjectStore.MaxQueryTimeLimit IServerCacheConfiguration.QueryPageMaxSize IServerCacheConfiguration.QueryPageDefaultSize IServerCacheConfiguration.NonPagedQueryMaxSize
![]() |
---|
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. |
The following tables list the members exposed by SearchSQL.
Public Constructors
Public Methods
Name | Description | |
---|---|---|
![]() | Equals | Determines whether the specified |
![]() | GetHashCode | Serves as a hash function for a particular type. |
![]() | GetType | Gets the |
![]() | SetAll | Specifies that duplicate rows can be returned in the result set. |
![]() | SetContainsRestriction | Restricts the query to return only items where the text in the content element or elements matches the specified . This method uses the function for CBR (Content-Based Retrieval) queries. The
|
![]() | SetDistinct | Restricts the query to return only distinct rows. This setting is valid only when all properties in the select list are orderable (as specified in the clause). |
![]() | SetFolderRestriction | Restricts the query to return only items from the specified class within the specified folder. |
![]() | SetFreetextRestriction | Restricts the query to return only items where the text in the content elements matches the specified . This method uses the function for CBR (Content-Based Retrieval) queries. The |
![]() | SetFromClauseAdditionalJoin | Adds another class to the clause used in the SQL statement. |
![]() | SetFromClauseInitialValue | Sets the first class to be used in the clause for the statement. |
![]() | SetMaxRecords | Sets the maximum number of rows that can be returned in the result set. When unspecified, all records that satisfy the query will be returned, subject to the limit of the property . |
![]() | SetOrderByClause | Sets the clause to be used for the SQL statement to the specified . |
![]() | SetQueryString | Specifies the entire SQL statement. This method cannot be used in conjunction with any of the other methods on this class. Doing so will have the following effect:
No SQL validation is performed on the specified string. |
![]() | SetSelectList | Sets the list for SQL statement to the specified . This must be called prior to calling . |
![]() | SetTimeLimit | Sets the maximum duration the query runs on the server, in seconds. When unspecified, the value of the property is used. Warning: 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. |
![]() | SetWhereClause | Sets the clause to be used for SQL statement to the specified . |
![]() | ToString | Overridden. Returns either the SQL statement constructed using the helper methods (in this case, must have been called prior to this method), or the SQL statement specified in its entirety using either or the constructor. |
Protected Methods
Name | Description | |
---|---|---|
![]() | Finalize | Allows an |
![]() | MemberwiseClone | Creates a shallow copy of the current |