EqualFilter Class |
Namespace: Telogis.GeoBase.Transactional
The EqualFilter type exposes the following members.
Name | Description | |
---|---|---|
EqualFilter |
Create a new EqualFilter where the given column of a Record should match a
specified value.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | 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 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();