From d51ec32938f7bb4c85ab2d6aa330b257d920eb69 Mon Sep 17 00:00:00 2001
From: Stelio Kontos <37424493+Ste1io@users.noreply.github.com>
Date: Mon, 9 Oct 2023 11:28:17 -0500
Subject: [PATCH] update DatabaseProvider class doc comments
---
PetaPoco/Core/DatabaseProvider.cs | 10 +++++++---
PetaPoco/Core/IProvider.cs | 2 +-
PetaPoco/OracleProvider.cs | 14 +++++++-------
PetaPoco/Providers/FirebirdDatabaseProvider.cs | 6 +++++-
PetaPoco/Providers/MSAccessDatabaseProvider.cs | 10 +++++++---
PetaPoco/Providers/MariaDBDatabaseProvider.cs | 5 +++--
.../Providers/MySqlConnectorDatabaseProvider.cs | 5 ++++-
PetaPoco/Providers/MySqlDatabaseProvider.cs | 5 ++++-
PetaPoco/Providers/OracleDatabaseProvider.cs | 5 ++++-
PetaPoco/Providers/PostgresDatabaseProvider.cs | 6 +++++-
PetaPoco/Providers/SQLiteDatabaseProvider.cs | 7 +++++--
PetaPoco/Providers/SqlServerCeDatabaseProviders.cs | 7 ++++++-
PetaPoco/Providers/SqlServerDatabaseProvider.cs | 10 ++++++++--
.../Providers/SqlServerMSDataDatabaseProvider.cs | 5 +++--
14 files changed, 69 insertions(+), 28 deletions(-)
diff --git a/PetaPoco/Core/DatabaseProvider.cs b/PetaPoco/Core/DatabaseProvider.cs
index 65911993..6485a169 100644
--- a/PetaPoco/Core/DatabaseProvider.cs
+++ b/PetaPoco/Core/DatabaseProvider.cs
@@ -14,9 +14,13 @@
namespace PetaPoco.Core
{
///
- /// The DatabaseProvider class defines a base implementation for database Provider classes, and provides common defaults used by
- /// different database management systems.
+ /// Provides an abstract base class for database providers. This class implements common functionality and provides default behavior for
+ /// specialized database providers.
///
+ ///
+ /// This class includes methods for database-specific operations like parameter handling, SQL escaping, and paging, among others.
+ /// Derived classes should override these methods to implement behavior specific to the database they target.
+ ///
public abstract class DatabaseProvider : IProvider
{
private static readonly ConcurrentDictionary customProviders = new ConcurrentDictionary();
@@ -101,7 +105,7 @@ protected DbProviderFactory GetFactory(params string[] assemblyQualifiedNames)
if (ft == null)
throw new ArgumentException($"Could not load the {GetType().Name} DbProviderFactory.");
- return (DbProviderFactory) ft.GetField("Instance").GetValue(null);
+ return (DbProviderFactory)ft.GetField("Instance").GetValue(null);
}
///
diff --git a/PetaPoco/Core/IProvider.cs b/PetaPoco/Core/IProvider.cs
index 3ec7ca57..4f724173 100644
--- a/PetaPoco/Core/IProvider.cs
+++ b/PetaPoco/Core/IProvider.cs
@@ -9,7 +9,7 @@
namespace PetaPoco.Core
{
///
- /// Represents a contract for a database type provider.
+ /// Defines the contract for database providers that expose functionality for connecting to various types of databases.
///
public interface IProvider
{
diff --git a/PetaPoco/OracleProvider.cs b/PetaPoco/OracleProvider.cs
index 9988e87f..80f47cc9 100644
--- a/PetaPoco/OracleProvider.cs
+++ b/PetaPoco/OracleProvider.cs
@@ -5,13 +5,13 @@
namespace PetaPoco
{
///
- /// Pprovides an implementation of for early versions of the Oracle drivers that don't include it.
+ /// Provides an implementation of for Oracle databases using the unmanaged Oracle Data Provider.
///
///
- /// For later versions of Oracle, the standard OracleProviderFactory class should work fine.
- /// Uses reflection to load Oracle.DataAccess assembly and in-turn create connections and commands.
- /// Thanks to Adam Schroder (@schotime) for this.
- /// Currently untested.
+ /// This provider uses the "Oracle.DataAccess.Client" ADO.NET driver for data access. For later versions of Oracle, the managed class should work fine. Uses reflection to load "Oracle.DataAccess" assembly and in-turn
+ /// create connections and commands.
+ /// Thanks to Adam Schroder (@schotime) for this. Currently untested.
///
///
///
@@ -69,7 +69,7 @@ public OracleProvider()
/// A new .
public override DbConnection CreateConnection()
{
- return (DbConnection) Activator.CreateInstance(_connectionType);
+ return (DbConnection)Activator.CreateInstance(_connectionType);
}
///
@@ -78,7 +78,7 @@ public override DbConnection CreateConnection()
/// A new .
public override DbCommand CreateCommand()
{
- DbCommand command = (DbCommand) Activator.CreateInstance(_commandType);
+ DbCommand command = (DbCommand)Activator.CreateInstance(_commandType);
var oracleCommandBindByName = _commandType.GetProperty("BindByName");
oracleCommandBindByName.SetValue(command, true, null);
diff --git a/PetaPoco/Providers/FirebirdDatabaseProvider.cs b/PetaPoco/Providers/FirebirdDatabaseProvider.cs
index 523f7939..5c2fdbad 100644
--- a/PetaPoco/Providers/FirebirdDatabaseProvider.cs
+++ b/PetaPoco/Providers/FirebirdDatabaseProvider.cs
@@ -11,9 +11,13 @@
namespace PetaPoco.Providers
{
// TODO: Rename class: FirebirdDatabaseProvider
+
///
- /// Provides a specific implementation of the class for Firebird.
+ /// Provides an implementation of for Firebird databases.
///
+ ///
+ /// This provider uses the "FirebirdSql.Data.FirebirdClient" ADO.NET driver for data access.
+ ///
public class FirebirdDbDatabaseProvider : DatabaseProvider
{
///
diff --git a/PetaPoco/Providers/MSAccessDatabaseProvider.cs b/PetaPoco/Providers/MSAccessDatabaseProvider.cs
index bc80f9a5..5066b392 100644
--- a/PetaPoco/Providers/MSAccessDatabaseProvider.cs
+++ b/PetaPoco/Providers/MSAccessDatabaseProvider.cs
@@ -11,9 +11,13 @@
namespace PetaPoco.Providers
{
// TODO: Rename class: MSAccessDatabaseProvider
+
///
- /// Provides a specific implementation of the class for Microsoft Access.
+ /// Provides an implementation of for Microsoft Access databases.
///
+ ///
+ /// This provider uses the "System.Data.OleDb" ADO.NET driver for data access.
+ ///
public class MsAccessDbDatabaseProvider : DatabaseProvider
{
///
@@ -39,10 +43,10 @@ public override async Task