Show / Hide Table of Contents

Class Result

Result object given by a

Query
performed on a database.

The typical pattern for using this class is to receive an instance of it as a result of using the

Database
and
Query
class methods that return a result. This class should not be initialised independently.

Note that this is a stub class that a driver will extend and complete as required for individual database types. Individual drivers could add additional methods, but this is discouraged to ensure that the API is the same for all database types.

Inheritance
System.Object
Result
Result
Result
Namespace: DataTables
Assembly: DataTables-Editor-Server.dll
Syntax
public abstract class Result : object

Constructors

| Improve this Doc View Source

Result(Database, System.Data.DataTable, Query)

Create a new result instance. Typically this should only be done by a

Query
method.

Declaration
protected Result(Database db, System.Data.DataTable dt, Query q)
Parameters
Type Name Description
Database db

Database connection

System.Data.DataTable dt

Query results

Query q

Query

Methods

| Improve this Doc View Source

Count()

Count the number of rows in the result set.

Declaration
public virtual int Count()
Returns
Type Description
System.Int32

Number of rows in the result set

| Improve this Doc View Source

DataTable()

Get a DataTable of the results

Declaration
public System.Data.DataTable DataTable()
Returns
Type Description
System.Data.DataTable

DataTable filled form the query result

| Improve this Doc View Source

Fetch()

Get the next row in a result set

Declaration
public virtual Dictionary<string, object> Fetch()
Returns
Type Description
Dictionary<System.String, System.Object>

Next row

| Improve this Doc View Source

FetchAll()

Get all rows in the result set

Declaration
public virtual List<Dictionary<string, object>> FetchAll()
Returns
Type Description
List<Dictionary<System.String, System.Object>>

The data for all rows

| Improve this Doc View Source

InsertId()

After an INSERT query, get the ID that was inserted.

Declaration
public virtual string InsertId()
Returns
Type Description
System.String

Insert id

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX