Relational Database Source

Class: RDBSource

Implements the IRDBSource interface for handling operations with relational databases.

Properties

  • GuidID: Unique identifier for the instance.
  • Id: A general identifier.
  • DatasourceName: Name of the data source.
  • DatasourceType: Type of the data source (e.g., SQL Server, MySQL).
  • ConnectionStatus: Current status of the database connection.
  • Category: Category of the data source (e.g., RDBMS).
  • ErrorObject: Object to hold error information.
  • Logger: Logger instance for logging activities.
  • EntitiesNames: List of names of entities (e.g., tables) in the database.
  • DMEEditor: Editor instance for managing database operations.
  • Entities: List of entity structures in the database.
  • Dataconnection: The connection object to the database.
  • RDBMSConnection: Specific connection object for relational databases.
  • ColumnDelimiter: Delimiter used for columns in queries.
  • ParameterDelimiter: Delimiter used for parameters in queries.

Constructors

  • RDBSource: Initializes a new instance of the RDBSource class with specified parameters like datasource name, logger, editor, etc.

Methods

  • Openconnection: Opens a database connection.
  • Closeconnection: Closes the database connection.
  • GetScalarAsync: Asynchronously gets a scalar value from the database.
  • ExecuteSql: Executes a SQL command.
  • RunQuery: Runs a query and returns the result.
  • UpdateEntities: Updates entities in the database.
  • BeginTransaction: Begins a database transaction.
  • EndTransaction: Ends a database transaction.
  • Commit: Commits the current transaction.
  • UpdateEntity: Updates a single entity in the database.
  • DeleteEntity: Deletes an entity from the database.
  • InsertEntity: Inserts an entity into the database.
  • GetEntity: Retrieves an entity based on specified filters.
  • GetEntityAsync: Asynchronously retrieves an entity based on specified filters.
  • GetEntityStructure: Retrieves the structure of an entity.
  • CreateEntities: Creates entities in the database.
  • GetEntitesList: Retrieves a list of entities in the database.
  • AddNewEntity: Adds a new entity to the database.
  • CheckEntityExist: Checks if an entity exists in the database.
  • CreateEntityAs: Creates an entity in the database as specified.
  • Dispose: Disposes of the resources used by the RDBSource instance.

Events

  • PassEvent: Event triggered for passing arguments.

Notes

  • The class includes several protected and private methods and fields that handle lower-level database operations, command creation, and query building.
  • This class is responsible for direct interactions with the database, including CRUD operations, connection handling, and transaction management.
  • It also includes utility methods for generating and executing SQL scripts.

This documentation provides a high-level overview and might not cover every method or property in detail. For specific implementation details, refer to the source code or further documentation.