Skip to content

DiGi.PostgreSQL.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.PostgreSQL.Classes Namespace

Classes

ConnectionData Class

Represents the connection settings required to establish a connection to a PostgreSQL database.

public class ConnectionData : DiGi.Core.Classes.SerializableObject, DiGi.PostgreSQL.Interfaces.IPostgreSQLSerializableObject, DiGi.PostgreSQL.Interfaces.IPostgreSQLObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → ConnectionData

Implements IPostgreSQLSerializableObject, IPostgreSQLObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Constructors

ConnectionData(ConnectionData, string) Constructor

Initializes a new instance of the ConnectionData class based on an existing connection configuration but with a different database.

public ConnectionData(DiGi.PostgreSQL.Classes.ConnectionData connectionData, string database);

Parameters

connectionData ConnectionData

The source connection data containing host, username, password, and port.

database System.String

The name of the database to connect to.

ConnectionData(string, string, string, string, Nullable<int>) Constructor

Initializes a new instance of the ConnectionData class with specified connection details.

public ConnectionData(string? host, string? username, string? password, string? database, System.Nullable<int> port);

Parameters

host System.String

The server host address.

username System.String

The user name for authentication.

password System.String

The password for authentication.

database System.String

The name of the database to connect to.

port System.Nullable<System.Int32>

The port number of the PostgreSQL server.

Properties

ConnectionData.Database Property

Gets or sets the name of the PostgreSQL database.

public string? Database { get; set; }

Property Value

System.String

ConnectionData.Host Property

Gets or sets the server host address.

public string? Host { get; set; }

Property Value

System.String

ConnectionData.Password Property

Gets or sets the password for authentication.

public string? Password { get; set; }

Property Value

System.String

ConnectionData.Port Property

Gets or sets the port number of the PostgreSQL server. Defaults to 5432.

public System.Nullable<int> Port { get; set; }

Property Value

System.Nullable<System.Int32>

ConnectionData.Username Property

Gets or sets the user name for authentication.

public string? Username { get; set; }

Property Value

System.String

Methods

ConnectionData.GetDefault() Method

Creates a new ConnectionData instance with default settings, using the current host and credentials but resetting the database and port.

public DiGi.PostgreSQL.Classes.ConnectionData GetDefault();

Returns

ConnectionData
A ConnectionData object initialized with default values.

ConnectionData.ToString() Method

Returns a string representation of the connection data in a semicolon-separated format.

public override string ToString();

Returns

System.String
A formatted string containing the connection details.

Partition Class

Represents a partition within the PostgreSQL database context.

public class Partition : DiGi.Core.Classes.SerializableObject, DiGi.PostgreSQL.Interfaces.IPostgreSQLSerializableObject, DiGi.PostgreSQL.Interfaces.IPostgreSQLObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → Partition

Implements IPostgreSQLSerializableObject, IPostgreSQLObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Constructors

Partition(Partition) Constructor

Initializes a new instance of the Partition class by copying an existing partition.

public Partition(DiGi.PostgreSQL.Classes.Partition partition);

Parameters

partition Partition

The source partition to copy from.

Partition(short, string, DataType) Constructor

Initializes a new instance of the Partition class with specified values.

public Partition(short id, string name, DiGi.PostgreSQL.Enums.DataType dataType);

Parameters

id System.Int16

The unique identifier for the partition.

name System.String

The name of the partition.

dataType DataType

The data type associated with the partition.

Partition(JsonObject) Constructor

Initializes a new instance of the Partition class using a JSON object.

public Partition(System.Text.Json.Nodes.JsonObject jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object used to initialize the partition.

Properties

Partition.DataType Property

Gets the data type of the partition.

public DiGi.PostgreSQL.Enums.DataType DataType { get; }

Property Value

DataType

Partition.Id Property

Gets the unique identifier of the partition.

public short Id { get; }

Property Value

System.Int16

Partition.Name Property

Gets the name of the partition.

public string? Name { get; }

Property Value

System.String

PostgreSQLConfigurationFile Class

Represents a configuration file specifically for PostgreSQL database settings.

public class PostgreSQLConfigurationFile : DiGi.Core.Classes.ConfigurationFile, DiGi.PostgreSQL.Interfaces.IPostgreSQLSerializableObject, DiGi.PostgreSQL.Interfaces.IPostgreSQLObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → DiGi.Core.Classes.ConfigurationFile → PostgreSQLConfigurationFile

Implements IPostgreSQLSerializableObject, IPostgreSQLObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Constructors

PostgreSQLConfigurationFile() Constructor

Initializes a new instance of the PostgreSQLConfigurationFile class.

public PostgreSQLConfigurationFile();

PostgreSQLConfigurationFile(ConfigurationFile) Constructor

Initializes a new instance of the PostgreSQLConfigurationFile class based on an existing configuration file.

public PostgreSQLConfigurationFile(DiGi.Core.Classes.ConfigurationFile? configurationFile);

Parameters

configurationFile DiGi.Core.Classes.ConfigurationFile

The source configuration file to copy settings from.

PostgreSQLConfigurationFile(JsonObject) Constructor

Initializes a new instance of the PostgreSQLConfigurationFile class using a JSON object.

public PostgreSQLConfigurationFile(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing the configuration data.

Properties

PostgreSQLConfigurationFile.Database Property

Gets or sets the name of the PostgreSQL database.

public string? Database { get; set; }

Property Value

System.String

PostgreSQLConfigurationFile.Directory Property

Gets or sets the directory path associated with the PostgreSQL configuration.

public string? Directory { get; set; }

Property Value

System.String

PostgreSQLConfigurationFile.Host Property

Gets or sets the host address of the PostgreSQL server.

public string? Host { get; set; }

Property Value

System.String

PostgreSQLConfigurationFile.Password Property

Gets or sets the password for the PostgreSQL user.

public string? Password { get; set; }

Property Value

System.String

PostgreSQLConfigurationFile.Port Property

Gets or sets the port number used to connect to the PostgreSQL server.

public System.Nullable<int> Port { get; set; }

Property Value

System.Nullable<System.Int32>

PostgreSQLConfigurationFile.Tablespace Property

Gets or sets the tablespace name for the PostgreSQL database.

public string? Tablespace { get; set; }

Property Value

System.String

PostgreSQLConfigurationFile.Username Property

Gets or sets the username for the PostgreSQL connection.

public string? Username { get; set; }

Property Value

System.String

PostgreSQLConverter<TObject> Class

Base class for converting objects to and from PostgreSQL database format.

public abstract class PostgreSQLConverter<TObject> : DiGi.PostgreSQL.Interfaces.IPostgreSQLConverter<TObject>, DiGi.PostgreSQL.Interfaces.IPostgreSQLConverter, DiGi.PostgreSQL.Interfaces.IPostgreSQLObject, DiGi.Core.Interfaces.IObject
    where TObject : DiGi.Core.Interfaces.IObject

Type parameters

TObject

The type of object being converted, which must implement IObject.

Inheritance System.Object → PostgreSQLConverter<TObject>

Implements DiGi.PostgreSQL.Interfaces.IPostgreSQLConverter<TObject>, IPostgreSQLConverter, IPostgreSQLObject, DiGi.Core.Interfaces.IObject

Constructors

PostgreSQLConverter(ConnectionData) Constructor

Initializes a new instance of the PostgreSQLConverter class.

public PostgreSQLConverter(DiGi.PostgreSQL.Classes.ConnectionData? connectionData);

Parameters

connectionData ConnectionData

The connection data to be used for database operations.

Properties

PostgreSQLConverter<TObject>.ConnectionData Property

Gets or sets the connection data used by the converter.

public DiGi.PostgreSQL.Classes.ConnectionData? ConnectionData { get; set; }

Property Value

ConnectionData

PostgreSQLConverterManager Class

A non-generic manager for PostgreSQL converters using the IPostgreSQLConverter interface.

public class PostgreSQLConverterManager : DiGi.PostgreSQL.Classes.PostgreSQLConverterManager<DiGi.PostgreSQL.Interfaces.IPostgreSQLConverter>

Inheritance System.Object → DiGi.PostgreSQL.Classes.PostgreSQLConverterManager<IPostgreSQLConverter> → PostgreSQLConverterManager

Constructors

PostgreSQLConverterManager() Constructor

Initializes a new instance of the PostgreSQLConverterManager class.

public PostgreSQLConverterManager();

PostgreSQLConverterManager<TPostgreSQLConverter> Class

Manages a collection of PostgreSQL converters and their associated configuration files.

public class PostgreSQLConverterManager<TPostgreSQLConverter> : DiGi.PostgreSQL.Interfaces.IPostgreSQLObject, DiGi.Core.Interfaces.IObject
    where TPostgreSQLConverter : DiGi.PostgreSQL.Interfaces.IPostgreSQLConverter

Type parameters

TPostgreSQLConverter

The base type of the PostgreSQL converter to be managed.

Inheritance System.Object → PostgreSQLConverterManager<TPostgreSQLConverter>

Derived
↳ PostgreSQLConverterManager

Implements IPostgreSQLObject, DiGi.Core.Interfaces.IObject

Constructors

PostgreSQLConverterManager() Constructor

Initializes a new instance of the PostgreSQLConverterManager<TPostgreSQLConverter> class.

public PostgreSQLConverterManager();

Methods

PostgreSQLConverterManager<TPostgreSQLConverter>.Add(TPostgreSQLConverter, PostgreSQLConfigurationFile) Method

Adds or updates a PostgreSQL converter and its associated configuration file in the manager.

public bool Add(TPostgreSQLConverter? postgreSQLConverter, DiGi.PostgreSQL.Classes.PostgreSQLConfigurationFile? postgreSQLConfigurationFile=null);

Parameters

postgreSQLConverter TPostgreSQLConverter

The PostgreSQL converter to add.

postgreSQLConfigurationFile PostgreSQLConfigurationFile

The optional configuration file associated with the converter.

Returns

System.Boolean
True if the converter was successfully added or updated; otherwise, false.

PostgreSQLConverterManager<TPostgreSQLConverter>.GetPostgreSQLConfigurationFile<UPostgreSQLConverter>() Method

Retrieves the configuration file for a specific type of PostgreSQL converter.

public DiGi.PostgreSQL.Classes.PostgreSQLConfigurationFile? GetPostgreSQLConfigurationFile<UPostgreSQLConverter>()
    where UPostgreSQLConverter : TPostgreSQLConverter;

Type parameters

UPostgreSQLConverter

The specific type of the PostgreSQL converter.

Returns

PostgreSQLConfigurationFile
The associated PostgreSQLConfigurationFile, or null if not found.

PostgreSQLConverterManager<TPostgreSQLConverter>.GetPostgreSQLConverter<UPostgreSQLConverter>() Method

Retrieves a specific instance of a PostgreSQL converter by its type.

public UPostgreSQLConverter? GetPostgreSQLConverter<UPostgreSQLConverter>()
    where UPostgreSQLConverter : TPostgreSQLConverter;

Type parameters

UPostgreSQLConverter

The specific type of the PostgreSQL converter to retrieve.

Returns

UPostgreSQLConverter
The UPostgreSQLConverter instance, or null if not found.

PostgreSQLConverterManager<TPostgreSQLConverter>.GetPostgreSQLConverters<UPostgreSQLConverter>() Method

Retrieves all registered converters of a specific type.

public System.Collections.Generic.List<UPostgreSQLConverter> GetPostgreSQLConverters<UPostgreSQLConverter>()
    where UPostgreSQLConverter : TPostgreSQLConverter;

Type parameters

UPostgreSQLConverter

The specific type of the PostgreSQL converters to retrieve.

Returns

System.Collections.Generic.List<UPostgreSQLConverter>
A list of UPostgreSQLConverter instances.

PostgreSQLConverterManager<TPostgreSQLConverter>.IsAvailable<UPostgreSQLConverter>() Method

Checks if the database associated with a specific converter type is available.

public bool IsAvailable<UPostgreSQLConverter>()
    where UPostgreSQLConverter : TPostgreSQLConverter;

Type parameters

UPostgreSQLConverter

The specific type of the PostgreSQL converter.

Returns

System.Boolean
True if the configuration exists and the database is available; otherwise, false.

PostgreSQLConverterManager<TPostgreSQLConverter>.TryCreateDatabase<UPostgreSQLConverter>() Method

Attempts to create a database using the configuration associated with a specific converter type.

public System.Threading.Tasks.Task<bool> TryCreateDatabase<UPostgreSQLConverter>()
    where UPostgreSQLConverter : TPostgreSQLConverter;

Type parameters

UPostgreSQLConverter

The specific type of the PostgreSQL converter.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task representing the asynchronous operation, containing true if the database was created successfully; otherwise, false.

PostgreSQLConverterManager<TPostgreSQLConverter>.TryGetPostgreSQLConfigurationFile<UPostgreSQLConverter>(PostgreSQLConfigurationFile) Method

Attempts to retrieve the configuration file for a specific converter type.

public bool TryGetPostgreSQLConfigurationFile<UPostgreSQLConverter>(out DiGi.PostgreSQL.Classes.PostgreSQLConfigurationFile? postgreSQLConfigurationFile)
    where UPostgreSQLConverter : TPostgreSQLConverter;

Type parameters

UPostgreSQLConverter

The specific type of the PostgreSQL converter.

Parameters

postgreSQLConfigurationFile PostgreSQLConfigurationFile

When this method returns, contains the configuration file if found; otherwise, null.

Returns

System.Boolean
True if the configuration file was successfully retrieved; otherwise, false.

PostgreSQLConverterManager<TPostgreSQLConverter>.TryGetPostgreSQLConverter<UPostgreSQLConverter>(UPostgreSQLConverter) Method

Attempts to retrieve a converter instance of a specific type.

public bool TryGetPostgreSQLConverter<UPostgreSQLConverter>(out UPostgreSQLConverter? postgreSQLConverter)
    where UPostgreSQLConverter : TPostgreSQLConverter;

Type parameters

UPostgreSQLConverter

The specific type of the PostgreSQL converter.

Parameters

postgreSQLConverter UPostgreSQLConverter

When this method returns, contains the converter instance if found; otherwise, null.

Returns

System.Boolean
True if the converter was successfully retrieved; otherwise, false.

ReferenceGeneratingEventArgs Class

Provides data for events that occur during reference generation.

public abstract class ReferenceGeneratingEventArgs : System.EventArgs

Inheritance System.Object → System.EventArgs → ReferenceGeneratingEventArgs

Constructors

ReferenceGeneratingEventArgs(object) Constructor

Initializes a new instance of the ReferenceGeneratingEventArgs class.

public ReferenceGeneratingEventArgs(object? item);

Parameters

item System.Object

The item associated with the reference generation process.

Fields

ReferenceGeneratingEventArgs.handled Field

Indicates whether the event has been handled.

protected bool handled;

Field Value

System.Boolean

Properties

ReferenceGeneratingEventArgs.Handled Property

Gets a value indicating whether the event has been handled.

public bool Handled { get; }

Property Value

System.Boolean

ReferenceGeneratingEventArgs.Item Property

Gets the item associated with the reference generation process.

public object? Item { get; }

Property Value

System.Object

Clone this wiki locally