Click or drag to resize

EqualFilter Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A ColumnFilter that selects only those records where the specified column is equal to a specified value.
Inheritance Hierarchy

Namespace:  Telogis.GeoBase.Transactional
Assembly:  geobase.net (in geobase.net.dll) Version: 4.84.0.0
Syntax
public class EqualFilter : ColumnFilter

The EqualFilter type exposes the following members.

Constructors
  NameDescription
Public methodEqualFilter
Create a new EqualFilter where the given column of a Record should match a specified value.
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
Examples
C#
String owner = "My Corporate";

// create the equal filter - this will only match records where
// the 'owner' column is equal to the string defined above
EqualFilter ef = new EqualFilter("owner", owner);

// the index defines the table we will query (myTable) and the 
// columns we want to retrieve (the columns were defined when
// the index was created 
Index idx = myTable.Indexes["my_index_name"];

// we must begin a transaction before we can perform a query
myTransactionalRepository.BeginTransaction();
Console.WriteLine("Warehouses where owner is '{0}'", owner);

// 
// here's where we actually use the EqualFilter - as part of the 
// query. note that we can iterate through the returned records
// using an enumerator.
// 
foreach (Record r in idx.Query(new ColumnFilter[1] { ef }) {
    Console.WriteLine("\t{0}, phone {1}", r["address"], r["phone"]);
}

// ... we've finished the query so we should end the transaction
myTransactionalRepository.EndTransaction();
See Also