IDataSource Interface

Overview

IDataSource is an interface defining the contract for implementing various data sources in a data management framework. It encompasses a wide range of functionalities related to data handling, including querying, CRUD operations, entity management, and transaction control.

Properties

  • GuidID: Unique identifier for the data source.
  • DatasourceType: Specifies the type of data source (e.g., SQL, NoSQL, API).
  • Category: Categorizes the data source (e.g., RDBMS, Web API).
  • Dataconnection: Manages the data connection details.
  • DatasourceName: The name of the data source.
  • ErrorObject: Handles errors occurring within the data source.
  • Id: An identifier for the data source.
  • Logger: Provides logging capabilities.
  • EntitiesNames: List of names of entities available in the data source.
  • Entities: List of entity structures managed by the data source.
  • DMEEditor: Reference to the IDMEEditor for integrated data management.
  • ConnectionStatus: The current status of the data source connection.

Methods

Entity and Data Management

  • GetEntitesList: Retrieves a list of all entities in the data source.
  • CreateEntityAs: Creates a new entity based on the given structure.
  • CheckEntityExist: Checks if an entity exists in the data source.
  • GetEntityStructure: Retrieves the structure of a specified entity.
  • UpdateEntity: Updates a specific entity.
  • DeleteEntity: Deletes a specific entity.
  • InsertEntity: Inserts a new entity.

Query Execution

  • RunQuery: Executes a given query string.
  • ExecuteSql: Executes a SQL command.
  • GetScalar: Executes a scalar query and returns the result.
  • GetScalarAsync: Asynchronously executes a scalar query.

Script Execution

  • RunScript: Runs a specified ETL script.
  • GetCreateEntityScript: Generates scripts for creating entities.

Transaction Control

  • BeginTransaction: Begins a transaction.
  • EndTransaction: Ends a transaction.
  • Commit: Commits the current transaction.

Connection Management

  • Openconnection: Opens the connection to the data source.
  • Closeconnection: Closes the connection to the data source.

Asynchronous Data Retrieval

  • GetEntityAsync: Asynchronously retrieves an entity.

Events

  • PassEvent: An event that is triggered to pass arguments or information.

Usage

Implementations of the IDataSource interface are crucial in applications where data from various sources needs to be integrated, managed, and manipulated. This interface provides a standardized way to handle different data sources, ensuring flexibility and scalability in data management applications.

Note

This documentation provides an overview of the IDataSource interface. Implementers are expected to provide concrete implementations of the methods and properties based on the specific requirements of their data source.