Search Results for

    Show / Hide Table of Contents

    Class DBCursor

    Represents a database cursor which enabled sync and async loading of data

    Inheritance
    System.Object
    DBCursor
    SADBCursor
    Implements
    System.IDisposable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Simplic.Framework.DAL
    Assembly: Simplic.Framework.DAL.dll
    Syntax
    public abstract class DBCursor : IDisposable

    Constructors

    | Improve this Doc View Source

    DBCursor(DBCursorBehavior)

    Initialize an instance of DBCursor

    Declaration
    public DBCursor(DBCursorBehavior behavior)
    Parameters
    Type Name Description
    DBCursorBehavior behavior

    configuration behavior for the DBCursor instance

    Properties

    | Improve this Doc View Source

    ColumnList

    Current column list

    Declaration
    public IList<string> ColumnList { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<System.String>
    | Improve this Doc View Source

    Columns

    Current Columns

    Declaration
    public IDictionary<string, Type> Columns { get; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Type>
    | Improve this Doc View Source

    CurrentRowCount

    current rowcount, increased by Fetch() method

    Declaration
    public int CurrentRowCount { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    EndOfResult

    indicates if the cursor reached the end of the underlying sql statement

    Declaration
    public bool EndOfResult { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    FilterColumns

    Columns which should be used for filtering unique values

    Declaration
    public string[] FilterColumns { get; set; }
    Property Value
    Type Description
    System.String[]
    | Improve this Doc View Source

    PreparedRowsCount

    currently prepared row count to fetch

    Declaration
    public int PreparedRowsCount { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    PreparedSqlStatement

    Last executed and prepared statement

    Declaration
    public string PreparedSqlStatement { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ResultTable

    Resulttable contains all fetched rows

    Declaration
    public ObservableDataTable ResultTable { get; }
    Property Value
    Type Description
    ObservableDataTable
    | Improve this Doc View Source

    RowCollection

    Access underlying data via ObservableCollection

    Declaration
    public RadObservableCollection<DataRow> RowCollection { get; }
    Property Value
    Type Description
    RadObservableCollection<System.Data.DataRow>
    | Improve this Doc View Source

    TotalRowCount

    contains a number which represents the maximum rowcount given by current statement

    Declaration
    public int? TotalRowCount { get; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    Methods

    | Improve this Doc View Source

    AddColumnSplitter(String, String)

    Split column by character to group or ungroup data

    Declaration
    public void AddColumnSplitter(string column, string character)
    Parameters
    Type Name Description
    System.String column
    System.String character
    | Improve this Doc View Source

    AddColumnSplitterAsync(String, String)

    Split column by character to group or ungroup data

    Declaration
    public async Task AddColumnSplitterAsync(string column, string character)
    Parameters
    Type Name Description
    System.String column
    System.String character
    Returns
    Type Description
    System.Threading.Tasks.Task
    | Improve this Doc View Source

    AddRow(IDictionary<String, Object>)

    Add data row from dictionary

    Declaration
    public void AddRow(IDictionary<string, object> row)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.Object> row

    Row values

    | Improve this Doc View Source

    CancelLoading()

    cancels the current loading task

    Declaration
    public void CancelLoading()
    | Improve this Doc View Source

    Clear(Boolean)

    deletes cached statements and dataset, closes the db connection used in Open() method

    Declaration
    public void Clear(bool ingoreInPlace)
    Parameters
    Type Name Description
    System.Boolean ingoreInPlace
    | Improve this Doc View Source

    ConvertRowsToListDict(IList<DataRow>, Boolean)

    converts a datarow collection to a list of dictionaries which contains the column header + value pairs

    Declaration
    public IList<IDictionary<string, string>> ConvertRowsToListDict(IList<DataRow> datarows, bool toLower = false)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<System.Data.DataRow> datarows
    System.Boolean toLower
    Returns
    Type Description
    System.Collections.Generic.IList<System.Collections.Generic.IDictionary<System.String, System.String>>
    | Improve this Doc View Source

    ConvertRowToDict(DataRow, Boolean)

    Converts a datarow into a dictionary

    Declaration
    public IDictionary<string, string> ConvertRowToDict(DataRow datarow, bool toLower = false)
    Parameters
    Type Name Description
    System.Data.DataRow datarow
    System.Boolean toLower
    Returns
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.String>
    | Improve this Doc View Source

    Dispose()

    IDisposable Member, calls the Clear() method

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Fetch(Int32, Boolean)

    Fetches the next result rows, returns fetched rows adds the rows to the ObservableCollection

    Declaration
    public IEnumerable<DataRow> Fetch(int count = 1, bool suppressEvents = false)
    Parameters
    Type Name Description
    System.Int32 count

    amount of rows to fetch

    System.Boolean suppressEvents
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.Data.DataRow>
    | Improve this Doc View Source

    FetchAsync(Int32)

    Fetches the next result rows asynchronous. Be careful when binding RowCollection you need to set the controls dispatcher first!

    Declaration
    public void FetchAsync(int counter = 1)
    Parameters
    Type Name Description
    System.Int32 counter

    amount of rows to fetch

    | Improve this Doc View Source

    FetchToEnd()

    Fetches the sql statement to the end of the result

    Declaration
    public IEnumerable<DataRow> FetchToEnd()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.Data.DataRow>
    | Improve this Doc View Source

    FetchToEndAsync()

    Fetches the entire result to the end

    Declaration
    public void FetchToEndAsync()
    | Improve this Doc View Source

    GetAdapter()

    Create new get dataadapter instance (provider specific)

    Declaration
    protected abstract DbDataAdapter GetAdapter()
    Returns
    Type Description
    System.Data.Common.DbDataAdapter
    | Improve this Doc View Source

    GetConnection(String)

    Get a connection instance

    Declaration
    protected abstract DbConnection GetConnection(string connectionName)
    Parameters
    Type Name Description
    System.String connectionName
    Returns
    Type Description
    System.Data.Common.DbConnection
    | Improve this Doc View Source

    IsConnectionError(DbException)

    Check whether exception is cause by a connection error

    Declaration
    protected abstract bool IsConnectionError(DbException exception)
    Parameters
    Type Name Description
    System.Data.Common.DbException exception
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Open(String, String, Object[])

    Opens a new cursor

    Declaration
    public void Open(string statement, string connectionName, params object[] parameters)
    Parameters
    Type Name Description
    System.String statement

    select statement to execute

    System.String connectionName

    connection name

    System.Object[] parameters

    select parameters

    | Improve this Doc View Source

    OpenReader(DbCommand)

    Open data reader

    Declaration
    protected abstract DbDataReader OpenReader(DbCommand command)
    Parameters
    Type Name Description
    System.Data.Common.DbCommand command
    Returns
    Type Description
    System.Data.Common.DbDataReader
    | Improve this Doc View Source

    PrepareStatement(String, IDictionary<String, Object>, Object[])

    Build/Prepare statement

    Declaration
    protected abstract DbCommand PrepareStatement(string statement, IDictionary<string, object> namedParameters, params object[] parameters)
    Parameters
    Type Name Description
    System.String statement
    System.Collections.Generic.IDictionary<System.String, System.Object> namedParameters
    System.Object[] parameters
    Returns
    Type Description
    System.Data.Common.DbCommand
    | Improve this Doc View Source

    RemoveColumnSplitterAsnyc(String)

    Remove a splitted column grom grouping and unaggregate all data

    Declaration
    public async Task RemoveColumnSplitterAsnyc(string column)
    Parameters
    Type Name Description
    System.String column

    Column which should be ungrouped

    Returns
    Type Description
    System.Threading.Tasks.Task

    Events

    | Improve this Doc View Source

    BeforePreparingStatementEvent

    before preparing statement, fires before the sql statement is executed

    Declaration
    public event DBCursor.BeforePreparingStatementHandler BeforePreparingStatementEvent
    Event Type
    Type Description
    DBCursor.BeforePreparingStatementHandler
    | Improve this Doc View Source

    DoneLoadingEvent

    fires when the cursor is done loading (asynchronous mode)

    Declaration
    public event DBCursor.DoneLoadingEventHandler DoneLoadingEvent
    Event Type
    Type Description
    DBCursor.DoneLoadingEventHandler
    | Improve this Doc View Source

    StartLoadingEvent

    fires when the cursor starts loading (asynchronous - mode)

    Declaration
    public event DBCursor.StartLoadingEventHandler StartLoadingEvent
    Event Type
    Type Description
    DBCursor.StartLoadingEventHandler

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx