Show / Hide Table of Contents

Class KbCategoryRows.CustomSearch

Class representing a custom search against table 'kb_category'. Use this class to create a query that is pre-populated with the correct KbCategoryTableInfo and return fields; you can then add your own restrictions and other clauses to the query. The result will be a KbCategoryRows collection of matching rows.

Inheritance
Object
SqlCommand
PrivateSelect
IdxBase
IdxBase<KbCategoryTableInfo>
KbCategoryRow.KbCategoryRowIdxBase
KbCategoryRows.KbCategoryRowsIdx
KbCategoryRows.CustomSearch
Implements
ICloneable
ISentryIgnorable
Inherited Members
PrivateSelect._isDistinct
PrivateSelect.GetTableInfos()
PrivateSelect.GetRelations(TableInfo)
PrivateSelect.GetRelations(TableInfo, SoTable)
PrivateSelect.IsTableOuterJoined(TableInfo)
PrivateSelect.GetTablesInOrderBy()
PrivateSelect.GetTablesLeadingToTable(TableInfo)
PrivateSelect.ValidateJoin()
PrivateSelect.Clone()
PrivateSelect.CloneSelect()
PrivateSelect.ToString()
PrivateSelect.GetCachingHash()
PrivateSelect.GetRestrictionTables()
PrivateSelect.CreateOrderBy()
PrivateSelect.InnerReturnFields
PrivateSelect.IsDistinct
PrivateSelect.ForceRecompile
PrivateSelect.InnerGroupBy
PrivateSelect.InnerJoinRestriction
PrivateSelect.SqlType
SqlCommand.Origin
SqlCommand.AdditionalInfo
SqlCommand.AddIgnoreAutoSentryTableInfo(TableInfo)
SqlCommand.AddIgnoreAutoSentryTableInfo(IEnumerable<TableInfo>)
SqlCommand.RemoveIgnoreAutoSentryTableInfo(TableInfo)
SqlCommand.ClearIgnoreAutoSentryTableInfos()
SqlCommand.IsAutoSentryIgnoredOnTableInfo(TableInfo)
SqlCommand.GetPrivateSaves()
SqlCommand.GetInserts()
SqlCommand.GetUpdates()
SqlCommand.GetDeletes()
SqlCommand.GetSelect()
SqlCommand.AutoSentryIgnoredTables
Namespace: SuperOffice.CRM.Rows
Assembly: SoDataBase.dll
Syntax
public sealed class CustomSearch : KbCategoryRows.KbCategoryRowsIdx, ICloneable, ISentryIgnorable
Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

Constructors

CustomSearch()

Constructor for class KbCategoryRows.CustomSearch. This class represents a custom search against table 'kb_category'.

Declaration
public CustomSearch()
Remarks

By adding restrictions and order by information, a custom query can be formatted against the database.
If this is not added, all the rows in the table are returned.

Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

Properties

InnerOrderBy

Implementation of the OrderBy clause.

Declaration
protected override OrderBy InnerOrderBy { get; }
Property Value
Type Description
OrderBy
Overrides
SuperOffice.CRM.Rows.IdxBase.InnerOrderBy
Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

InnerRestriction

Restriction (e.g. sql: WHERE) for the select statement.

Declaration
protected override Restriction InnerRestriction { get; }
Property Value
Type Description
Restriction

RestrictionObject holding the restrictions for the select statement.

Overrides
PrivateSelect.InnerRestriction
Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

OrderBy

Implementation of the OrderBy clause.

Declaration
public OrderBy OrderBy { get; }
Property Value
Type Description
OrderBy
Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

Restriction

Restriction (e.g. sql: WHERE) for the select statement.

Declaration
public Restriction Restriction { get; set; }
Property Value
Type Description
Restriction

RestrictionObject holding the restrictions for the select statement.

Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

Methods

RestrictionAnd(Restriction)

Calling this method is equivalent to the statement Restriction = Restriction.And( <argument> ), including protection against null Restrictions. Use it as a convenient shorthand if you are building complex restrictions out of smaller parts.

Declaration
public void RestrictionAnd(Restriction rightHandSide)
Parameters
Type Name Description
Restriction rightHandSide

The right-hand side of the AND, the left-hand side is this objects' current Restriction.

Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

RestrictionOr(Restriction)

Calling this method is equivalent to the statement Restriction = Restriction.Or( <argument> ), including protection against null Restrictions. Use it as a convenient shorthand if you are building complex restrictions out of smaller parts.

Declaration
public void RestrictionOr(Restriction rightHandSide)
Parameters
Type Name Description
Restriction rightHandSide

The right-hand side of the OR, the left-hand side is this objects' current Restriction.

Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

UpdateRow(TableRowBase)

Update the KbCategoryRow with the values from the index.

Declaration
public override void UpdateRow(TableRowBase row)
Parameters
Type Name Description
TableRowBase row

The row to update. This must be an instance of KbCategoryRow.

Overrides
SuperOffice.CRM.Rows.IdxBase.UpdateRow(SuperOffice.CRM.Rows.TableRowBase)
Remarks

This method does nothing for a the CustomSearch class.

Examples

This example shows how a custom search is created, one restriction added, and the search executed.

KbCategoryRows.CustomSearch mySearch = new KbCategoryRow.CustomSearch();
mySearch.Restriction = (some relevant restriction);
KbCategoryRows myResult = KbCategoryRows.GetFromCustomSearch( mySearch );        // query executed here
foreach( KbCategoryRow row in myResult )
       (do some work with each row)

Implements

System.ICloneable
ISentryIgnorable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
QueryExectionExtensions.ExecuteReader(SqlCommand, Boolean)
QueryExectionExtensions.ExecuteScalar<T>(SqlCommand)
QueryExectionExtensions.ExecuteScalar<T>(SqlCommand, Boolean)
QueryExectionExtensions.ExecuteNonQuery(SqlCommand)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top