Represents a table scanner specification.

Namespace: Hypertable
Assembly: ht4n (in ht4n.dll) Version: 0.9.8.11 (0.9.8.11)

Syntax

         
 C#  Visual Basic  Visual C++ 
[SerializableAttribute]
public sealed class ScanSpec
<SerializableAttribute> _
Public NotInheritable Class ScanSpec
[SerializableAttribute]
public ref class ScanSpec sealed

Members

            
 All Members  Constructors   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
ScanSpec()()()()
Initializes a new instance of the ScanSpec class.
ScanSpec(Boolean)
Initializes a new instance of the ScanSpec class using sorted containers, removes duplicates.
ScanSpec(String)
Initializes a new instance of the ScanSpec class using the row specified.
ScanSpec(CellInterval)
Initializes a new instance of the ScanSpec class using the cell interval specified.
ScanSpec(ColumnPredicate)
Initializes a new instance of the ScanSpec class using the column predicate specified.
ScanSpec(Key)
Initializes a new instance of the ScanSpec class using the key specified.
ScanSpec(RowInterval)
Initializes a new instance of the ScanSpec class using the row interval specified.
ScanSpec(ScanSpec)
Initializes a new instance of the ScanSpec class.
AddCell(IEnumerable<(Of <<'(Key>)>>))
Adds a bunch of cells to be returned in the scan.
AddCell(Key, array<Key>[]()[][])
Adds one or more cells to be returned in the scan.
AddCell(String, String, String)
Adds a cell to be returned in the scan.
AddCellInterval(IEnumerable<(Of <<'(CellInterval>)>>))
Adds a bunch of cell intervals to be returned in the scan.
AddCellInterval(CellInterval, array<CellInterval>[]()[][])
Adds one or more cell intervals to be returned in the scan.
AddColumn(IEnumerable<(Of <<'(String>)>>))
Adds a bunch of columns to be returned in the scan.
AddColumn(String, array<String>[]()[][])
Adds one or more columns to be returned in the scan.
AddColumnPredicate(IEnumerable<(Of <<'(ColumnPredicate>)>>))
Adds a bunch of column predicates to the scan.
AddColumnPredicate(ColumnPredicate, array<ColumnPredicate>[]()[][])
Adds one or more column predicates to the scan.
AddRow(IEnumerable<(Of <<'(String>)>>))
Adds a bunch of rows to be returned in the scan.
AddRow(String, array<String>[]()[][])
Adds one or more rows to be returned in the scan.
AddRowInterval(IEnumerable<(Of <<'(RowInterval>)>>))
Adds a bunch of row intervals to be returned in the scan.
AddRowInterval(RowInterval, array<RowInterval>[]()[][])
Adds one or more row intervals to be returned in the scan.
CellCount
Gets the number of cells.
CellIntervalCount
Gets the number of cell intervals.
CellIntervals
Gets the cell intervals.
CellOffset
Gets or sets the number of cells to be skipped at the beginning of the query.
Cells
Gets the cells.
ClearCellIntervals()()()()
Removes all cell intervals.
ClearColumnPredicates()()()()
Removes all column predicates.
ClearRowIntervals()()()()
Removes all row intervals.
ColumnCount
Gets the number of columns.
ColumnPredicateAnd
AND together all the column predicates, if not set then the OR logic will be used.
ColumnPredicateCount
Gets the number of column predicates.
ColumnPredicates
Gets the column predicates.
Columns
Gets the columns.
ContainsRow(String)
Checks if the scan specification contains a row.
DistictColumn(IEnumerable<(Of <<'(String>)>>))
Returns distinct columns from a sequence of columns.
DistictColumn(IEnumerable<(Of <<'(String>)>>), ISet<(Of <<'(String>)>>)%)
Returns distinct columns from a sequence of columns.
EndDateTime
Gets or sets the end time of the scan.
EndTimestamp
Gets or sets the end time of the scan, in nanoseconds since 1970-01-01 00:00:00.0 UTC.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Flags
Gets or sets the table scanner flags.
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
KeysOnly
Gets or sets a value that indicates whether to return keys only or not.
MaxCells
Gets or sets the maximum number of cells to return.
MaxCellsColumnFamily
Gets or sets the maximum number of cells to return per column family and row.
MaxRows
Gets or sets the maximum number of rows to return in the scan.
MaxVersions
Gets or sets the maximum number of revisions of each cell to return in the scan.
NotUseQueryCache
Gets or sets a value that indicates whether to add the query result to the query cache if possible or not.
RemoveCell(Key)
Removes a cell.
RemoveCell(String, String, String)
Removes a cell.
RemoveCellInterval(CellInterval)
Removes a cell interval.
RemoveColumn(String)
Removes a column family.
RemoveColumnPredicate(ColumnPredicate)
Removes a column predicate.
RemoveRow(String)
Removes a row.
RemoveRowInterval(RowInterval)
Removes a row interval.
RowCount
Gets the number of rows.
RowIntervalCount
Gets the number of row intervals.
RowIntervals
Gets the row intervals.
RowOffset
Gets or sets the number of rows to be skipped at the beginning of the query.
RowRegex
Gets or sets a regular expression to filter rows by.
Rows
Gets the rows.
ScanAndFilter
Gets or sets a value that indicates whether to use scan and filter rows or not.
StartDateTime
Gets or sets the start time of the scan.
StartTimestamp
Gets or sets the start timestamp of the scan, in nanoseconds since 1970-01-01 00:00:00.0 UTC.
Timeout
Gets or sets the maximum time to allow scanner methods to execute before time out, if zero timeout is disabled.
ToString()()()()
Returns a string that represents the current object.
(Overrides Object..::..ToString()()()().)
ValueRegex
Gets or sets a regular expression to filter cell values by.

Examples

The following example shows how to add columns to the scan specification.
CopyC#
ScanSpec scanSpec = new ScanSpec()
                       .AddColumn("cf1")             // all cells in column family cf1
                       .AddColumn("cf2:cq")          // all cells in column family cf2 with column qualifier cq
                       .AddColumn("cf3:/abc[0-9]/")  // all cells in cf3 where column qualifier matches the regex
                       .AddColumn("cf4:");           // all cells in cf4 where no column qualifier exists
                       .AddColumn("cf5:^xyz");       // all cells in cf5 where the column qualifier starts with the prefix specified

using( var scanner = table.CreateScanner(scanSpec) ) {
   foreach( cell cell in scanner ) {
      // process cell
   }
}
The following example shows how to use scan and filter rows.
CopyC#
IEnumerable<string> manyRows = ...; // 10% or more rows in table
var scanSpec = new ScanSpec() { ScanAndFilter = true }.AddRows(manyRows);

using( var scanner = table.CreateScanner(scanSpec) ) {
   foreach( cell cell in scanner ) {
      // process cell
   }
}
The following example shows how to add a row interval.
CopyC#
var scanSpec = new ScanSpec(new RowInterval("a", "z"));

using( var scanner = table.CreateScanner(scanSpec) ) {
   foreach( cell cell in scanner ) {
      // process cell
   }
}
The following example shows how to filter rows by a regular expression.
CopyC#
var scanSpec = new ScanSpec() { RowRegex = "a.*" }.AddColumn("cf");

using( ITablScanner scanner = table.CreateScanner(scanSpec) ) {
   foreach( cell cell in scanner ) {
      // process cell
   }
}

Inheritance Hierarchy

System..::..Object
  Hypertable..::..ScanSpec

See Also