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: (in Version:
public class EqualFilter : ColumnFilter

The EqualFilter type exposes the following members.

Public methodEqualFilter
Create a new EqualFilter where the given column of a Record should match a specified value.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
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
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
See Also