Show / Hide Table of Contents

    IDataStore Interface

    .NET Standard 2.x

    Namespace: DWNet.Data

    Assembly: DWNet.Data.dll

    The IDataStore interface represents a .NET DataStore object.

    Syntax

    public interface IDataStore : IDataStoreBase;
    

    Events

    Name Description
    RetrieveEnd Occurs when DataStore retrieval is completed.
    RetrieveStart Occurs when the DataStore retrieval is about to begin.
    RowDeleted Occurs when the deletion of the DataStore row is completed.
    RowDeleting Occurs when the deletion of the DataStore row is about to begin.
    UpdateEnd Occurs when committing DataStore updates to the database is completed.
    UpdateStart Occurs after the Update method is called and before changes in the DataStore are sent to the database.

    Properties

    Name Return Type Description
    Current Object Gets the reference to the row at the current position of the enumerator.
    DataContext DataContext Represents the entry to the database.
    DataObject string Specifies the name of the DataWindow object associated with the DataStore.
    DeletedCount int Gets the total number of rows that are marked for deletion in the database.
    DwMeta IDwMeta Gets the meta data in the DataStore model.
    FilteredCount int Gets the number of rows that have been filtered by the current filter criteria.
    Index int Gets the index of the current row when traversing DataStore.
    Item[int] Object Gets and sets the row data from the index location.
    Object IDataObject Used to directly manipulate the object within a DataStore object from a script. These objects can be, for example, columns or text objects.
    RowCount int Gets the total number of rows in primary buffers of the DataStore.
    ModifiedCount int Gets the number of rows that have been modified in the DataStore but not updated to the database.
    TotalCount int Gets the total number of rows in all buffers of the DataStore.

    Methods

    Name Return Type Description
    Add(TModel item) void Appends a TModel instance as a row to the end of the primary buffer in the DataStore.
    AddRow() int Appends a row to the end of the primary buffer in the DataStore and returns the zero-based index. If any columns have default values, the row is initialized with these values.
    AddRow<TModel>(TModel model) int Appends a row to the end of the primary buffer in the DataStore and returns the zero-based index. TModel must match with the DataObject property of the DataStore.
    AddRow<TModel>(IEnumerable<TModel> list) int Appends a collection of TModel type as row(s) to the end of the primary buffer in the DataStore and returns the zero-based index of the first row added. TModel must match with the DataObject property of the DataStore.
    AsEnumerable<TModel>(DwBuffer dwBuffer = DwBuffer.Primary) IEnumerable<TModel> Converts the data in the specified buffer to an IEnumerable<TModel> object. Defaults to the primary buffer if dwBuffer is not specified.
    AsQueryable<TModel>() IQueryable<TModel> Converts the data in the specified buffer to an IQueryable.
    Avg<TModel>(Func<TModel, decimal> selector) decimal Computes the average of a sequence of System.Decimal values that are obtained by invoking a transform function on each row of the primary buffer in the DataStore.
    Avg<TModel>(Func<TModel, decimal> selector, Predicate<TModel> predicate) decimal Computes the average of a sequence of System.Decimal values that are obtained by invoking a transform function on each row of the primary buffer filtered base on a predicate in the DataStore.
    Contains(TModel item) bool Determines whether a row exists in the primary buffer of the DataStore.
    CopyTo(TModel[] array, int arrayIndex) void Copies all rows from the primary buffer of the DataStore to a compatible one-dimensional System.Array, starting at a particular System.Array index.
    Count<TModel>(Predicate<TModel> predicate) int Returns a number that represents how many rows in the primary buffer of DataStore satisfy a condition.
    DeleteRow(int row) bool Deletes the specified row by the zero-based index from the primary buffer of the DataStore. The deleted row will be moved to the delete buffer of the DataStore.
    DeleteRow<TModel>(TModel model) bool Deletes the specified row according to the specified TModel from the primary buffer of the DataStore. The deleted row will be moved to the delete buffer of the DataStore.
    DeleteRow<TModel>(Predicate<TModel> predicate) bool Deletes the row(s) based on a predicate from the primary buffer of the DataStore. The deleted row(s) will be moved to the delete buffer of the DataStore.
    Dispose()) void Performs application-defined tasks associated with freeing, releasing, or resetting the unmanaged resource.
    Evaluate<TValue>(string expression) TValue Calculates the result of the specified DataWindow expression using the data in the primary buffer of the DataStore.
    Evaluate<TValue>(string expression, int row) TValue Calculates the specified DataWindow expression by the specified row (zero-based index) in the primary buffer of the DataStore, and returns the result value.
    Exists<TModel>(Predicate<TModel> predicate) bool Determines whether there is a row in the primary buffer of the DataStore that meets the specified condition.
    Filter() bool Filters rows by the current filter criteria. Rows that do not meet the filter criteria are moved to the filter buffer. The filter criteria can be re-set using the format parameter.
    Filter(string format = null) void Filters rows by the current filter criteria. Rows that do not meet the filter criteria are moved to the filter buffer. The filter criteria can be re-set using the format parameter.
    Filter<TModel>(Func<TModel, bool> predicate) bool Filters rows by the filter criteria specified by Predicate<TModel>. Rows that do not meet the filter criteria are moved to the filter buffer.
    FilterEx<TModel>(Expression<Func<TModel, bool>> expression) bool Generic method. Filters rows by the filter criteria specified by Expression<Predicate<TModel>>. Rows that do not meet the filter criteria are moved to the filter buffer.
    Find<TModel>(string expression, int start, int end,DwBuffer dwBuffer = DwBuffer.Primary) TModel Generic method. Finds the next zero-based row in the specified buffer of the DataStore in which data meets the condition specified by the expression.
    Find<TModel>(Predicate<TModel> predicate, int start, int end, DwBuffer dwBuffer = DwBuffer.Primary) TModel Generic method. Finds the next row in the DataStore in which data meets the criteria defined by Predicate.
    Find<TModel>(string expression, DwBuffer dwBuffer = DwBuffer.Primary) TModel Generic method. Finds the next zero-based row in the specified buffer of the DataStore in which data meets the condition specified by the expression.
    Find<TModel>(Predicate<TModel> predicate, dwBuffer = DwBuffer.Primary) TModel Generic method. Finds the next row in the DataStore in which data meets the criteria defined by Predicate.
    FindIndex(string expression, int start, int end, DwBuffer dwBuffer = DwBuffer.Primary) int Returns the zero-based index of the next row in the specified buffer of the DataStore in which data meets the condition specified by the expression.
    FindIndex<TModel>(Predicate<TModel> predicate, int start, int end, DwBuffer dwBuffer = DwBuffer.Primary) int Generic method. Returns the index of the next row in the DataStore in which data meets the criteria defined by Predicate.
    FindIndex(string expression, DwBuffer dwBuffer = DwBuffer.Primary) int Returns the zero-based index of the next row in the specified buffer of the DataStore in which data meets the condition specified by the expression.
    FindIndex<TModel>(Predicate<TModel> predicate, DwBuffer dwBuffer = DwBuffer.Primary) int Generic method. Returns the index of the next row in the DataStore in which data meets the criteria defined by Predicate.
    FirstOrDefault<TModel>() TModel Generic method. Returns the first data row of the DataStore. If no data row is found, returns null.
    FirstOrDefault<TModel>(Predicate<TModel> predicate) TModel Generic method. Returns the first data row of the DataStore that meets the criteria specified by Predicate<TModel>. If no data row is found, returns null.
    GetChild(string name) IDataStore Provides a reference to the child DataWindow, which you can use to manipulate that DataStore.
    GetChild(string name, out IDataStore child) bool Provides a reference to the child DataWindow, which you can use to manipulate that DataStore.
    GetDataExporter(DataFormat dataFormat) IDwDataExporter Gets the DataStore exporter, you need to specify the data export format(DataFormat).
    GetDataImporter(DataFormat dataFormat) IDwDataImporter Gets the DataStore importer, you need to specify the data import format(DataFormat).
    GetForUpdate<TModel>(int index) TModel Obtains a TModel object for update according to the index number.
    GetForUpdate<TModel>(Predicate<TModel> predicate) TModel Obtains a TModel object for update according to the specified condition.
    GetForUpdateList<TModel>(Predicate<TModel> predicate) IEnumerable<TModel> Obtains an IEnumerable<TModel> object for update according to the specified condition.
    GetItem<TValue>(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) TValue Generic method. Gets the data for the specified row and column from the specified buffer of the DataStore. You can obtain the data that was originally retrieved and stored in the database, as well as the current value in the primary, delete, or filter buffers.
    GetItem<TValue>(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) TValue Generic method. Gets the data for the specified row and column from the specified buffer of the DataStore. You can obtain the data that was originally retrieved and stored in the database, as well as the current value in the primary, delete, or filter buffers.
    GetItem(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) object Gets the data for the specified row and column from the specified buffer of the DataStore.
    GetItem(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) object Gets the data for the specified row and column from the specified buffer of the DataStore.
    GetItemBoolean(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) bool? Gets data whose type is Boolean for the specified row and column (specified by column number) from the specified buffer of the DataStore.
    GetItemBoolean(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) bool? Gets data whose type is Boolean for the specified row and column (specified by column name) from the specified buffer of the DataStore.
    GetItemDate(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) DateTime? Gets data whose type is DateTime for the specified row and column from the specified buffer of the DataStore.
    GetItemDate(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) DateTime? Gets data whose type is DateTime for the specified row and column from the specified buffer of the DataStore.
    GetItemDateTime(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) DateTime? Gets data whose type is DateTime for the specified row and column from the specified buffer of the DataStore.
    GetItemDateTime(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) DateTime? Gets data whose type is DateTime for the specified row and column from the specified buffer of the DataStore.
    GetItemDecimal(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) decimal? Gets data whose type is Decimal for the specified row and column from the specified buffer of the DataStore.
    GetItemDecimal(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) decimal? Gets data whose type is Decimal for the specified row and column from the specified buffer of the DataStore.
    GetItemNumber(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) double? Gets data whose type is Double for the specified row and column from the specified buffer of the DataStore.
    GetItemNumber(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) double? Gets data whose type is Double for the specified row and column from the specified buffer of the DataStore.
    GetItemStatus(int row, short column, DwBuffer dwbuffer = DwBuffer.Primary) PropertyState Reports the modification status of a column (specified by column number) within a row in the specified buffer.
    GetItemStatus(int row, string column, DwBuffer dwbuffer = DwBuffer.Primary) PropertyState Gets the modification status of a column (specified by column name) within a row in the specified buffer.
    GetItemStatus<TModel>(int row, Expression<Func<TModel, object>> selector, DwBuffer dwbuffer = DwBuffer.Primary) PropertyState Gets the modification status of a column (specified by an expression) within a row in the specified buffer.
    GetItemString(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) string Gets data whose type is String for the specified row and column from the specified buffer of the DataStore.
    GetItemString(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) string Gets data whose type is String for the specified row and column from the specified buffer of the DataStore.
    GetItemTime(int row, short column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) TimeSpan? Gets data whose type is TimeSpan for the specified row and column from the specified buffer of the DataStore.
    GetItemTime(int row, string column, DwBuffer bufferType = DwBuffer.Primary, bool isOriginalValue = false) TimeSpan? Gets data whose type is TimeSpan for the specified row and column from the specified buffer of the DataStore.
    GetModel<TModel>(int row) TModel Obtains the data of the specified row.
    GetModel<TModel>(int row, bool calcCompute) TModel Obtains the data of the specified row. You can specify whether to calculate the computed columns in the model.
    GetModelByRowId<TModel>(int rowid) TModel Gets the TModel instance of a row according to the specified unique row identifier associated with that row.
    GetModelByRowId<TModel>(int rowid, bool calcCompute) TModel Gets the TModel instance of a row according to the specified unique row identifier associated with that row. You can specify whether to calculate the computed columns in the model.
    GetReport(int row, string name) IDataStore Gets the report from the composite or nested report.
    GetRowFromRowId(int rowid, DwBuffer dwBuffer = DwBuffer.Primary) int Gets the row number of a row in the DataStore from the unique row identifier associated with that row.
    GetRowIdFromRow(int rownumber, DwBuffer dwBuffer = DwBuffer.Primary) int Gets the unique row identifier of a row in the DataStore from the row number associated with that row.
    GetRowStatus(int row, DwBuffer dwbuffer = DwBuffer.Primary) ModelState Gets the modification status of a row. The modification status determines the type of SQL statement the Update method will generate for the row.
    GetSqlSelect() string Gets the SQL SELECT statement for the current DataStore.
    GetTemplate() IDataTemplate Gets the default XML format template for DataStore data export.
    GetTemplate(string templateName, DataFormat dataFormat = DataFormat.Xml) IDataTemplate Specifies the name and format to get the template for DataStore data export.
    GetValidate(short column) string Gets the validation rule for a column (specified by the column Index) in the DataStore.
    GetValidate(string column) string Gets the validation rule for a column (specified by the column name) in the DataStore.
    GetValues(short column, DwBuffer bufferType = DwBuffer.Primary) IEnumerable<object> Obtains a collection of values of the specified column (by zero-based column number), from the specified buffer in the DataStore.
    GetValues(string column, DwBuffer bufferType = DwBuffer.Primary) IEnumerable<object> Obtains a collection of values of the specified column (by column name), from the specified buffer in the DataStore.
    GroupBy() IEnumerable<IGrouping<object, IGroupingGetter>> Groups all rows of the primary buffer by the current grouping criteria of DataStore.
    GroupBy<TModel>() IEnumerable<IGrouping<object, IGroupingGetter<TModel>>> Generic method. Groups all rows of the primary buffer by the current grouping criteria of DataStore.
    GroupBy(int level, string sortKey = null) IEnumerable<IGrouping<object, IModelGetter>> Groups rows of the primary buffer by the specified zero-based level of grouping criteria of DataStore.
    GroupBy<TModel>(int level, string sortKey = null) IEnumerable<IGrouping<object, TModel>> Generic method. Groups rows of the primary buffer by the specified zero-based level of grouping criteria of DataStore.
    GroupBy(string selectorKey, string sortKey = null) IEnumerable<IGrouping<object, IModelGetter>> Groups rows of the primary buffer by the custom grouping criteria.
    GroupBy<TModel>(string selectorKey, string sortKey = null) IEnumerable<IGrouping<object, TModel>> Generic method. Groups rows of the primary buffer by the custom grouping criteria.
    GroupBy<TModel>(Func<TModel, object> selectorKey) IEnumerable<IGrouping<object, TModel>> Generic method. Groups rows of the primary buffer by the custom grouping criteria defined by Func<TModel, object>.
    GroupBy<TModel>(Func<TModel, object> selectorKey, bool isneighbor) IEnumerable<IGrouping<object, TModel>> Generic method. Groups rows of the primary buffer by the custom grouping criteria defined by Func<TModel, object>.
    IndexOf(TModel item) int Determines the index of a specific model instance in the primary buffer of DataStore.
    Insert(int index, TModel item) void Inserts data at the specified index in the primary buffer of the DataStore.
    InsertRow(int row) int Inserts a row to the specified position in the DataStore. If any columns have default values, the row is initialized with these values.
    InsertRow<TModel>(int row, TModel model) int Inserts a TModel instance as a row to the specified position in the primary buffer of the DataStore.
    ImportEntry(IModelEntry modelEntry) int Imports an IModelEntry object, which contains data and state, to the end of the DataStore.
    ImportEntry(IEnumerable<IModelEntry> modelEntries) int Imports a sequence of IModelEntry objects, which contain data and state, to the end of the DataStore.
    LastOrDefault<TModel>() TModel Generic method. Returns the last data row of the DataStore. If no data row is found, returns null.
    LastOrDefault<TModel>(Predicate<TModel> predicate) TModel Generic method. Returns the last data row of the DataStore that meets the criteria specified by Predicate<TModel>. If no data row is found, returns null.
    Max<TModel, TResult>(Func<TModel, TResult> selector) TResult Invokes a transform function on each row of the primary buffer in the DataStore and returns the maximum result value.
    Max<TModel, TResult>(Func<TModel, TResult> selector, Predicate<Tmodel> predicate) TResult Invokes a transform function on each row (that satisfies the condition specified by Predicate<TModel>) in the primary buffer of the DataStore and returns the maximum result value.
    Min<TModel, TResult>(Func<TModel, TResult> selector) TResult Invokes a transform function on each row of the primary buffer in the DataStore and returns the minimum result value.
    Min<TModel, TResult>(Func<TModel, TResult> selector, Predicate<TModel> predicate) TResult Invokes a transform function on each row (that satisfies the condition specified by Predicate<TModel>) in the primary buffer of the DataStore and returns the minimum result value.
    MoveNext() bool Advances the enumerator to the next row of the primary buffer in DataStore.
    OrderBy<TModel>(Func<TModel, object> keySelector) IOrderable<TModel> Sorts the rows of the primary buffer in the DataStore in ascending order according to a key.
    OrderByDescending<TModel>(Func<TModel, object> keySelector) IOrderable<TModel> Sorts the rows of the primary buffer in the DataStore in descending order according to a key.
    Remove<TModel>(TModel item) bool Removes the specified row from the primary buffer of the DataStore.
    RemoveAll<TModel>(Predicate<TModel> predicate) int Removes rows with specified conditions from the primary buffer of the DataStore.
    RemoveAt(int index) void Removes the row according to the specified index from the primary buffer of the DataStore. The index is the same as the zero-based row number.
    ReselectRow(int row) int Accesses the database to retrieve values for all columns that can be updated and refreshes all timestamp columns in a row in the DataStore.
    Reset() void Clears all the data from the DataStore.
    ResetUpdate() bool Clears the update flags in the primary and filter buffers and empties the delete buffer of the DataStore.
    Retrieve(params object[] arguments) int Retrieves rows from the database. If arguments are included, the argument values are used for the retrieval arguments in the SQL SELECT statement for the DataStore.
    RetrieveByKey(params object[] arguments) int Retrieves rows from the database. You can specify a value for a property with the [Key] attribute to retrieve parameters in a SQL SELECT statement in the DataStore.
    RetrieveByPage(int currentIndex, int pageSize, params object[] arguments) int Retrieves the specified number of rows in the database starting at the specified row position. If a parameter is included, the parameter value is used to retrieve the parameter in the SQL SELECT statement of the DataStore.
    RowsCopy(int startrow, int endrow, DwBuffer copybuffer, IDataStore targetdw, int beforerow, DwBuffer targetbuffer) bool Copies a range of rows from one DataStore to another, or from one buffer to another within a single DataStore.
    RowsDiscard(int startrow, int endrow, DwBuffer buffer) bool Discards a range of rows in the DataStore. Once a row has been discarded using RowsDiscard, you cannot restore the row unless you retrieve it again from the database.
    RowsMove(int startrow, int endrow, DwBuffer movebuffer, IDataStore targetdw, int beforerow, DwBuffer targetbuffer) bool Clears a range of rows from one DataStore and inserts them in another. Alternatively, RowsMove can move rows from one buffer to another within a single DataStore.
    SetDataContext(DataContext context) bool Sets the data context.
    SetFilter(string format) bool Specifies the filter criteria for the DataStore.
    SetItem(int row, short column, object value) bool Sets the value of a row and column (by column name) in the DataStore to the specified value.
    SetItem(int row, string column, object value) bool Sets the value of a row and column (by column number) in the DataStore to the specified value.
    SetItemStatus(int row, short column, DwBuffer dwbuffer, PropertyState status) bool Sets the modification status in the column (by column number) for a row in the specified buffer of the DataStore.
    SetItemStatus(int row, string column, DwBuffer dwbuffer, PropertyState status) bool Sets the modification status in the column (by column name) for a row in the specified buffer in the DataStore.
    SetModel<TModel>(int row, TModel model) void Sets the data for the specified row.
    SetRowStatus(int row, DwBuffer bufferType, ModelState modelState) bool Sets the modification status of the specified row in the specified buffer in the DataStore. The row modification status determines the type of SQL statement the Update method will generate for the row.
    SetSort(string format) bool Specifies the sort criteria for the DataStore.
    SetSqlSelect(string statement, bool isValidation = true) bool Specifies the SQL SELECT statement for the DataStore.
    SetValidate(short column, string rule) bool Sets the validation rule for a column (specified by column number) in the DataStore.
    SetValidate(string column, string rule) bool Sets the validation rule for a column (specified by column name) in the DataStore.
    Sort(string format = null) bool Sorts the rows in the DataStore using the current sort criteria.
    SortBy<TModel>(Func<TModel, object> keySelector) IOrderable<TModel> Sorts the rows of the primary buffer in the DataStore by a key in the ascending order.
    SortByDescending<TModel>(Func<TModel, object> keySelector) IOrderable<TModel> Sorts the rows of the primary buffer in the DataStore by a key in the descending order.
    Sum<TModel>(Func<TModel, decimal> selector) decimal Computes the sum of a sequence of decimal values that are obtained by invoking a transform function on each row of the primary buffer in DataStore.
    Sum<TModel>(Func<TModel, decimal> selector, Predicate<TModel> predicate) decimal Computes the sum of a sequence of System.Decimal values that are obtained by invoking a transform function on each row (filtered by a predicate) of the primary buffer in DataStore.
    Update(bool resetflag = true) int Updates the database with the changes made in the DataStore.
    Update(UpdateSqlStrategy updateSqlStrategy, bool resetFlag = true) int Updates the database with the changes made in the DataStore.
    Validate() bool Verifies the data using the data validation rules set in the DataStore.
    Validate(Out List<ValidationResult> validationResults) bool Verifies the data using the data validation rules set in the DataStore, and outputs the verification results.

    Extension Methods

    Name Return Type Description
    ExportJson(this IDataStoreBase dataStore, MappingMethod mappingMethod) string Exports data from the DataStore primary buffer to a DataWindow JSON string.
    ExportJson(this IDataStoreBase dataStore, bool changedOnly, MappingMethod mappingMethod) string Exports all rows or only the changed rows from the DataStore to a DataWindow JSON string.
    ExportJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, bool changedOnly, MappingMethod mappingMethod) string Exports all rows or only the changed rows from all or specified buffers to a DataWindow JSON string.
    ExportJson(this IDataStoreBase dataStore, bool primaryData, bool filterData, bool deleteData, bool dwcdata, MappingMethod mappingMethod) string Exports data from the specified buffer(s) and/or DataWindowChild to a DataWindow JSON string.
    ExportJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, MappingMethod mappingMethod) string Exports data from the specified buffer to a DataWindow JSON string.
    ExportJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, MappingMethod mappingMethod) string Exports the rows (from the specified starting position to the end) from the specified buffer to a DataWindow JSON string.
    ExportJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, MappingMethod mappingMethod) string Exports the rows (from the specified starting position to the ending position) from the specified buffer to a DataWindow JSON string.
    ExportJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, MappingMethod mappingMethod) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the end) from the specified buffer to a DataWindow JSON string.
    ExportJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, int endColumn, MappingMethod mappingMethod) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the ending position) from the specified buffer to a DataWindow JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, ) string Exports data from the DataStore primary buffer to a plain-format JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, bool changedOnly) string Exports all rows or only the changed rows from the DataStore to a plain-format JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, bool changedOnly) string Exports all rows or only the changed rows from all or specified buffers to a plain-format or DataWindow JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, bool primaryData, bool filterData, bool deleteData, bool dwcdata) string Exports data from the specified buffer(s) and/or DataWindowChild to a plain-format JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, DwBuffer dwbuffer) string Exports data from the specified buffer to a plain-format JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow) string Exports the rows (from the specified starting position to the end) from the specified buffer to a plain-format JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow) string Exports the rows (from the specified starting position to the ending position) from the specified buffer to a plain-format JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, int startColumn) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the end) from the specified buffer to a plain-format JSON string.
    ExportPlainJson(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, int endColumn) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the ending position) from the specified buffer to a plain-format JSON string.
    ExportPlainXml(this IDataStoreBase dataStore) string Exports data from the DataStore primary buffer to a plain-format Xml string.
    ExportPlainXml(this IDataStoreBase dataStore, bool changedOnly) string Exports all rows or only the changed rows from the DataStore to a plain-format Xml string.
    ExportPlainXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, bool changedOnly) string Exports all rows or only the changed rows from all or specified buffers to a plain-format or DataWindow Xml string.
    ExportPlainXml(this IDataStoreBase dataStore, bool primaryData, bool filterData, bool deleteData, bool dwcdata) string Exports data from the specified buffer(s) and/or DataWindowChild to a plain-format Xml string.
    ExportPlainXml(this IDataStoreBase dataStore, DwBuffer dwbuffer) string Exports data from the specified buffer to a plain-format Xml string.
    ExportPlainXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow) string Exports the rows (from the specified starting position to the end) from the specified buffer to a plain-format Xml string.
    ExportPlainXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow) string Exports the rows (from the specified starting position to the ending position) from the specified buffer to a plain-format Xml string.
    ExportPlainXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, int startColumn) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the end) from the specified buffer to a plain-format Xml string.
    ExportPlainXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, int endColumn) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the ending position) from the specified buffer to a plain-format Xml string.
    ExportRowAsJson(this IDataStoreBase dataStore, int row, DwBuffer dwBuffer = DwBuffer.Primary) string Exports a data row from the specified buffer of a DataStore object to the JSON string.
    ExportRowAsString(this IDataStoreBase dataStore, int row, DwBuffer dwBuffer = DwBuffer.Primary) string Exports a data row from the specified buffer of a DataStore object to the TXT string.
    ExportRowAsXml(this IDataStoreBase dataStore, int row, DwBuffer dwBuffer = DwBuffer.Primary) string Exports a data row from the specified buffer of a DataStore object to the XML string.
    ExportString(this IDataStoreBase dataStore, bool colheading = true) string Exports all of the data rows from the primary buffer of the DataStore to a string. The column name is exported by default.
    ExportXml(this IDataStoreBase dataStore, MappingMethod mappingMethod) string Exports data from the DataStore primary buffer to a DataWindow Xml string.
    ExportXml(this IDataStoreBase dataStore, bool changedOnly, MappingMethod mappingMethod) string Exports all rows or only the changed rows from the DataStore to a DataWindow Xml string.
    ExportXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, bool changedOnly, MappingMethod mappingMethod) string Exports all rows or only the changed rows from all or specified buffers to a DataWindow Xml string.
    ExportXml(this IDataStoreBase dataStore, bool primaryData, bool filterData, bool deleteData, bool dwcdata, MappingMethod mappingMethod) string Exports data from the specified buffer(s) and/or DataWindowChild to a DataWindow Xml string.
    ExportXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, MappingMethod mappingMethod) string Exports data from the specified buffer to a DataWindow Xml string.
    ExportXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, MappingMethod mappingMethod) string Exports the rows (from the specified starting position to the end) from the specified buffer to a DataWindow Xml string.
    ExportXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, MappingMethod mappingMethod) string Exports the rows (from the specified starting position to the ending position) from the specified buffer to a DataWindow Xml string.
    ExportXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, MappingMethod mappingMethod) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the end) from the specified buffer to a DataWindow Xml string.
    ExportXml(this IDataStoreBase dataStore, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, int endColumn, MappingMethod mappingMethod) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the ending position) from the specified buffer to a DataWindow Xml string.
    ExportString(this IDataStoreBase dataStore, int startRow, int endRow, bool colheading = true) string Exports the rows (from the specified starting position to the ending position) from the primary buffer of the DataStore to a string. The column name is exported by default.
    ExportString(this IDataStoreBase dataStore, int startRow, int endRow, int startColumn, int endColumn, bool colheading = true) string Exports the rows (from the specified starting position to the ending position) and the columns (from the specified starting position to the ending position) from the primary buffer of the DataStore to a string. The column name is exported by default.
    ImportJson(this IDataStoreBase dataStore, string text) int Inserts data from a JSON string into the DataStore.
    ImportJson(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer) int Inserts data from a JSON string into the specified buffer of DataStore.
    ImportJson(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow) int Inserts data from a JSON string into the specified buffer of DataStore. You can specify the starting position in the JSON array.
    ImportJson(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow) int Inserts data from a JSON string into the specified buffer of DataStore. You can specify the starting and ending position in the JSON array.
    ImportJson(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow, int startColumn) int Inserts data from a JSON string into the specified buffer of DataStore. You can specify the starting and ending positions in the JSON array, and you can specify the number of the first key value in the JSON object to be imported.
    ImportJson(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, int endColumn) int Inserts data from a JSON string into the specified buffer of DataStore. You can specify the starting and ending positions in the JSON array, and you can specify the number of the first key value and the number of the last key value in the JSON object to be imported.
    ImportJson(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, int endColumn, int dwStartColumn) int Inserts data from a JSON string into the specified buffer of DataStore. You can specify the starting and ending positions in the JSON array, and specify the number of the first key value and the number of the last key value in the JSON object to be imported. You can also specify the number of the first column in the DataStore that should receive data.
    ImportJsonByKey(this IDataStoreBase dataStore, string text) int Inserts data from a JSON string into the DataStore according to the key name of the JSON item.
    ImportJsonByKey(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer) int Inserts data from a JSON string into the specified buffer of DataStore according to the key name of the JSON item.
    ImportJsonByKey(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow) int Inserts data from a JSON string into the specified buffer of DataStore according to the key name of the JSON item. You can specify the starting position in the JSON array.
    ImportJsonByKey(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow) int Inserts data from a JSON string into the specified buffer of DataStore according to the key name of the JSON item. You can specify the starting and ending positions in the JSON array.
    ImportRowFromJson(this IDataStoreBase dataStore, string text, int row, DwBuffer dwBuffer = DwBuffer.Primary) int Inserts a data row from a JSON string into a DataStore object.
    ImportRowFromJString(this IDataStoreBase dataStore, string text, int row, DwBuffer dwBuffer = DwBuffer.Primary) int Inserts a data row from a TXT string into a DataStore object.
    ImportRowFromXml(this IDataStoreBase dataStore, string text, int row, DwBuffer dwBuffer = DwBuffer.Primary) int Inserts a data row from a XML string into a DataStore object.
    ImportString(this IDataStoreBase dataStore, string text) int Inserts the tab-separated data from a string into the DataStore.
    ImportString(this IDataStoreBase dataStore, string text, int startRow) int Inserts the tab-separated data from a string into the DataStore. You can specify the starting row in the string.
    ImportString(this IDataStoreBase dataStore, string text, int startRow, int endRow) int Inserts the tab-separated data from a string into the DataStore. You can specify the starting and ending rows in the string.
    ImportString(this IDataStoreBase dataStore, string text, int startRow, int endRow, int startColumn) int Inserts the tab-separated data from a string into the DataStore. You can specify the starting and ending rows in the string, and specify the number of the first column in the string to be imported.
    ImportString(this IDataStoreBase dataStore, string text, int startRow, int endRow, int startColumn, int endColumn) int Inserts the tab-separated data from a string into the DataStore. You can specify the starting and ending rows in the string, and specify the number of the first column and the number of the last column in the string to be imported.
    ImportString(this IDataStoreBase dataStore, string text, int startRow, int endRow, int startColumn, int endColumn, int dwStartColumn) int Inserts the tab-separated data from a string into the DataStore. You can specify the starting and ending rows in the string, and specify the number of the first column and the number of the last column in the string to be imported. You can also specify the number of the first column in the DataStore that should receive data.
    ImportXml(this IDataStoreBase dataStore, string text) int Inserts data from a Xml string into the DataStore.
    ImportXml(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer) int Inserts data from a Xml string into the specified buffer of DataStore.
    ImportXml(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow) int Inserts data from a Xml string into the specified buffer of DataStore. You can specify the starting position in the Xml array.
    ImportXml(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow) int Inserts data from a Xml string into the specified buffer of DataStore. You can specify the starting and ending position in the Xml array.
    ImportXml(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow, int startColumn) int Inserts data from a Xml string into the specified buffer of DataStore. You can specify the starting and ending positions in the Xml array, and you can specify the number of the first key value in the Xml object to be imported.
    ImportXml(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, int endColumn) int Inserts data from a Xml string into the specified buffer of DataStore. You can specify the starting and ending positions in the Xml array, and you can specify the number of the first key value and the number of the last key value in the Xml object to be imported.
    ImportXml(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow, int startColumn, int endColumn, int dwStartColumn) int Inserts data from a Xml string into the specified buffer of DataStore. You can specify the starting and ending positions in the Xml array, and specify the number of the first key value and the number of the last key value in the Xml object to be imported. You can also specify the number of the first column in the DataStore that should receive data.
    ImportXmlByKey(this IDataStoreBase dataStore, string text) int Inserts data from a Xml string into the DataStore according to the key name of the Xml item.
    ImportXmlByKey(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer) int Inserts data from a Xml string into the specified buffer of DataStore according to the key name of the Xml item.
    ImportXmlByKey(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow) int Inserts data from a Xml string into the specified buffer of DataStore according to the key name of the Xml item. You can specify the starting position in the Xml array.
    ImportXmlByKey(this IDataStoreBase dataStore, string text, DwBuffer dwbuffer, int startRow, int endRow) int Inserts data from a Xml string into the specified buffer of DataStore according to the key name of the Xml item. You can specify the starting and ending positions in the Xml array.

    Remarks

    .NET DataStore is used in almost exactly the same way as the PowerBuilder DataStore; and on top of that, .NET DataStore also supports to use the advanced .NET development methods, such as LINQ set operations. .NET DataStore is very useful when you want to access the database and manipulate the data.

    You can use .NET DataStore to do the following:
    1. Access the data in the database.
    2. Append, delete, modify or query the data and commit the change to the database conveniently.
    3. Group or sort the data.
    4. Manage the database transactions automatically or manually.
    5. Check the data validity and integrity.
    6. Track the data modification.
    7. Used as the replacement for the migrated PowerBuilder DataStore.

    When .NET DataStore is created, it must be associated with a DataWindow object.

    It uses the Retrieve method to obtain the data and place the data to the primary buffer. Parameters defined in the DataStore can also be passed in to retrieve data.

    AddRow method can be used to append data to the DataStore.

    DeleteRow method can be used to remove data from the DataStore, however, data is not directly deleted from the DataStore, it is only moved to the delete buffer where you can still manipulate it later.

    SetSort method can be used to set the sorting criteria and Sort method to sort the data according to the predefined criteria.

    SetFilter method can be used to filter the data, and the data will be moved to the filter buffer.

    Update method can be used to finally commit the change to the database.

    DataStore also provides many events that will occur on data change; these events include RowDeleting, RowDeleted, RetrieveStart, RetrieveEnd, UpdateStart, and UpdateEnd.

    Back to top Generated by Appeon