DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
DbConnection.h
Go to the documentation of this file.
1#pragma once
2#include "Common.h"
3#include "System/Object.h"
4#include "System/String.h"
7
8namespace DotNetDupe {
9 namespace System {
10 namespace Data {
11 namespace Common {
12
23 public:
25 DbConnection() = default;
26
28 ~DbConnection() override = default;
29
33
36 virtual void SetConnectionString(const DotNetDupe::System::String& sConnStr) = 0;
37
40 virtual void Open() = 0;
41
43 virtual void Close() = 0;
44
48 };
49
50 }
51 }
52 }
53}
Defines common cross-platform macros, export decorators, and fundamental types.
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
~DbConnection() override=default
Virtual destructor ensuring clean disposal of connection resources.
DbConnection()=default
Initializes a new instance of the DbConnection class.
virtual DotNetDupe::System::String GetConnectionString() const =0
Gets the string used to open a connection to the data source.
virtual DotNetDupe::System::SmartPointer< DbCommand > CreateCommand()=0
Creates and returns a DbCommand object associated with the current connection.
virtual void SetConnectionString(const DotNetDupe::System::String &sConnStr)=0
Sets the string used to open a connection to the data source.
virtual void Close()=0
Closes the connection to the data source and releases internal resources.
virtual void Open()=0
Opens a database connection with the settings specified by the ConnectionString.
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
A unified smart pointer that supports both unique and shared ownership semantics.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition String.h:74