Repository navigation
DiGi.PostgreSQL.Classes
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.ICloneableObjectInheritance 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
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);connectionData ConnectionData
The source connection data containing host, username, password, and port.
database System.String
The name of the database to connect to.
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);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.
Gets or sets the name of the PostgreSQL database.
public string? Database { get; set; }Gets or sets the server host address.
public string? Host { get; set; }Gets or sets the password for authentication.
public string? Password { get; set; }Gets or sets the port number of the PostgreSQL server. Defaults to 5432.
public System.Nullable<int> Port { get; set; }Gets or sets the user name for authentication.
public string? Username { get; set; }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();ConnectionData
A ConnectionData object initialized with default values.
Returns a string representation of the connection data in a semicolon-separated format.
public override string ToString();System.String
A formatted string containing the connection details.
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.ICloneableObjectInheritance 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
Initializes a new instance of the Partition class by copying an existing partition.
public Partition(DiGi.PostgreSQL.Classes.Partition partition);partition Partition
The source partition to copy from.
Initializes a new instance of the Partition class with specified values.
public Partition(short id, string name, DiGi.PostgreSQL.Enums.DataType dataType);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.
Initializes a new instance of the Partition class using a JSON object.
public Partition(System.Text.Json.Nodes.JsonObject jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object used to initialize the partition.
Gets the data type of the partition.
public DiGi.PostgreSQL.Enums.DataType DataType { get; }Gets the unique identifier of the partition.
public short Id { get; }Gets the name of the partition.
public string? Name { get; }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.ICloneableObjectInheritance 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
Initializes a new instance of the PostgreSQLConfigurationFile class.
public PostgreSQLConfigurationFile();Initializes a new instance of the PostgreSQLConfigurationFile class based on an existing configuration file.
public PostgreSQLConfigurationFile(DiGi.Core.Classes.ConfigurationFile? configurationFile);configurationFile DiGi.Core.Classes.ConfigurationFile
The source configuration file to copy settings from.
Initializes a new instance of the PostgreSQLConfigurationFile class using a JSON object.
public PostgreSQLConfigurationFile(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing the configuration data.
Gets or sets the name of the PostgreSQL database.
public string? Database { get; set; }Gets or sets the directory path associated with the PostgreSQL configuration.
public string? Directory { get; set; }Gets or sets the host address of the PostgreSQL server.
public string? Host { get; set; }Gets or sets the password for the PostgreSQL user.
public string? Password { get; set; }Gets or sets the port number used to connect to the PostgreSQL server.
public System.Nullable<int> Port { get; set; }Gets or sets the tablespace name for the PostgreSQL database.
public string? Tablespace { get; set; }Gets or sets the username for the PostgreSQL connection.
public string? Username { get; set; }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.IObjectTObject
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
Initializes a new instance of the PostgreSQLConverter class.
public PostgreSQLConverter(DiGi.PostgreSQL.Classes.ConnectionData? connectionData);connectionData ConnectionData
The connection data to be used for database operations.
Gets or sets the connection data used by the converter.
public DiGi.PostgreSQL.Classes.ConnectionData? ConnectionData { get; set; }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
Initializes a new instance of the PostgreSQLConverterManager class.
public PostgreSQLConverterManager();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.IPostgreSQLConverterTPostgreSQLConverter
The base type of the PostgreSQL converter to be managed.
Inheritance System.Object → PostgreSQLConverterManager<TPostgreSQLConverter>
Derived
↳ PostgreSQLConverterManager
Implements IPostgreSQLObject, DiGi.Core.Interfaces.IObject
Initializes a new instance of the PostgreSQLConverterManager<TPostgreSQLConverter> class.
public PostgreSQLConverterManager();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);postgreSQLConverter TPostgreSQLConverter
The PostgreSQL converter to add.
postgreSQLConfigurationFile PostgreSQLConfigurationFile
The optional configuration file associated with the converter.
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;UPostgreSQLConverter
The specific type of the PostgreSQL converter.
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;UPostgreSQLConverter
The specific type of the PostgreSQL converter to retrieve.
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;UPostgreSQLConverter
The specific type of the PostgreSQL converters to retrieve.
System.Collections.Generic.List<UPostgreSQLConverter>
A list of UPostgreSQLConverter instances.
Checks if the database associated with a specific converter type is available.
public bool IsAvailable<UPostgreSQLConverter>()
where UPostgreSQLConverter : TPostgreSQLConverter;UPostgreSQLConverter
The specific type of the PostgreSQL converter.
System.Boolean
True if the configuration exists and the database is available; otherwise, false.
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;UPostgreSQLConverter
The specific type of the PostgreSQL converter.
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;UPostgreSQLConverter
The specific type of the PostgreSQL converter.
postgreSQLConfigurationFile PostgreSQLConfigurationFile
When this method returns, contains the configuration file if found; otherwise, null.
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;UPostgreSQLConverter
The specific type of the PostgreSQL converter.
postgreSQLConverter UPostgreSQLConverter
When this method returns, contains the converter instance if found; otherwise, null.
System.Boolean
True if the converter was successfully retrieved; otherwise, false.
Provides data for events that occur during reference generation.
public abstract class ReferenceGeneratingEventArgs : System.EventArgsInheritance System.Object → System.EventArgs → ReferenceGeneratingEventArgs
Initializes a new instance of the ReferenceGeneratingEventArgs class.
public ReferenceGeneratingEventArgs(object? item);item System.Object
The item associated with the reference generation process.
Indicates whether the event has been handled.
protected bool handled;Gets a value indicating whether the event has been handled.
public bool Handled { get; }Gets the item associated with the reference generation process.
public object? Item { get; }