| ibi Patterns .NET API

Loading...
Searching...
No Matches
Public Member Functions | List of all members
NetricsServerInterface.NetricsTableRecSrc Class Referenceabstract

## Public Member Functions
abstract NetricsRecord | getNext ()
| Returns the next record.
abstract bool | hasNext ()
| Returns true if the source has more records.
abstract void | reset ()
| Reset the source to the first record.
bool | hasNext ()
| Returns true if the source has more records.
NetricsBaseRecord | getNext ()
| Returns the next record.
void | reset ()
| Reset the source to the first record.

## Detailed Description

Generic interface for reading records.

This interface defines how sets of single table records are passed in the API. When a constructor or method needs a set of simple records it expects an object that implements this interface. By creating a class that implements this interface the user can feed records from any source directly into the API. The API can then stream these records into the engine. For example, an implementation of NetricsRecSrc that feeds the records in a DataTable into the getNext method would allow records to be streamed from a DBMS into an ibi™ Patterns - Search table. If a server-side cursor was used any number of records could be streamed without incurring a large memory overhead. E.g.:

``

The ibi™ Patterns - Search .NET interface has two predefined implementations of the NetricsRecSrc interface: NetricsArrayRecSrc is a simple array of records, NetricsCSVRecSrc reads records from a standard format CSV file.

See also
  NetricsArrayRecSrc, NetricsCSVRecSrc, NetricsBaseRecSrc

## Member Function Documentation

## ◆ getNext()

abstract NetricsRecord NetricsServerInterface.NetricsTableRecSrc.getNext | ( |  | ) |
| pure virtual

Returns the next record.

This restricts the return value to NetricsRecord instead of the base NetricsBaseRecord.

Exceptions

  NetricsRecSrcException | Thrown if an error occurs, or if there are no more records.

Returns
  the next record

Implements NetricsServerInterface.NetricsBaseRecSrc.

Implemented in NetricsServerInterface.NetricsArrayRecSrc, NetricsServerInterface.NetricsCSVRecSrc, NetricsServerInterface.NetricsTableCursorRecSrc, and NetricsServerInterface.NetricsTextFileRecSrc.

## ◆ reset()

abstract void NetricsServerInterface.NetricsTableRecSrc.reset | ( |  | ) |
| pure virtual

Reset the source to the first record.

Not all record sources may support this operation.

Implements NetricsServerInterface.NetricsBaseRecSrc.

Implemented in NetricsServerInterface.NetricsArrayRecSrc, NetricsServerInterface.NetricsCSVRecSrc, NetricsServerInterface.NetricsTableCursorRecSrc, and NetricsServerInterface.NetricsTextFileRecSrc.