Skip to content

DiGi.PostgreSQL.PartitionReference.Classes

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

DiGi.PostgreSQL.PartitionReference.Classes Namespace

Classes

PartitionReference Class

Represents a reference to a partition.

public class PartitionReference : DiGi.Core.Classes.SerializableReference

Inheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → DiGi.Core.Classes.SerializableReference → PartitionReference

Constructors

PartitionReference() Constructor

Initializes a new instance of the PartitionReference class.

public PartitionReference();

PartitionReference(PartitionReference) Constructor

Initializes a new instance of the PartitionReference class by copying another reference.

public PartitionReference(DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference? partitionReference);

Parameters

partitionReference PartitionReference

The source reference to copy.

PartitionReference(string, string) Constructor

Initializes a new instance of the PartitionReference class with a specified name and unique identifier.

public PartitionReference(string? name, string? uniqueId);

Parameters

name System.String

The name of the partition.

uniqueId System.String

The unique identifier of the partition.

PartitionReference(JsonObject) Constructor

Initializes a new instance of the PartitionReference class from a JSON object.

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

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

Properties

PartitionReference.Name Property

Gets the name of the partition reference.

public string? Name { get; }

Property Value

System.String

PartitionReference.UniqueId Property

Gets the unique identifier for this reference.

public string? UniqueId { get; }

Property Value

System.String

Methods

PartitionReference.Clone() Method

Creates a deep copy of the current partition reference.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a clone of the current object.

PartitionReference.Equals(object) Method

Determines whether the specified object is equal to the current partition reference.

public override bool Equals(object? obj);

Parameters

obj System.Object

The object to compare with the current object.

Returns

System.Boolean
True if the objects are equal; otherwise, false.

PartitionReference.GetHashCode() Method

Returns the hash code for the current partition reference.

public override int GetHashCode();

Returns

System.Int32
A 32-bit signed integer hash code.

PartitionReference.ToString() Method

Returns a string representation of the partition reference, combining the name and unique identifier with a separator.

public override string? ToString();

Returns

System.String
A string representing the partition reference, or null if the name or unique identifier is empty.

PartitionReferenceGeneratingEventArgs Class

Provides data for events that occur during the generation of a partition reference.

public class PartitionReferenceGeneratingEventArgs : DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgs

Inheritance System.Object → System.EventArgs → DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgs → PartitionReferenceGeneratingEventArgs

Constructors

PartitionReferenceGeneratingEventArgs(object) Constructor

Initializes a new instance of the PartitionReferenceGeneratingEventArgs class.

public PartitionReferenceGeneratingEventArgs(object? item);

Parameters

item System.Object

The item associated with the event.

Properties

PartitionReferenceGeneratingEventArgs.PartitionReference Property

Gets or sets the partition reference associated with this event.

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

Property Value

PartitionReference

PartitionReferencePostgreSQLConverter Class

A non-generic implementation of the partition reference PostgreSQL converter using ISerializableObject.

public class PartitionReferencePostgreSQLConverter : DiGi.PostgreSQL.PartitionReference.Classes.PartitionReferencePostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject>

Inheritance System.Object → DiGi.PostgreSQL.Classes.PostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject> → DiGi.PostgreSQL.PartitionReference.Classes.PartitionReferencePostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject> → PartitionReferencePostgreSQLConverter

Constructors

PartitionReferencePostgreSQLConverter(ConnectionData) Constructor

Initializes a new instance of the PartitionReferencePostgreSQLConverter class.

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

Parameters

connectionData DiGi.PostgreSQL.Classes.ConnectionData

The connection data used to establish a database connection.

PartitionReferencePostgreSQLConverter<TSerializableObject> Class

Provides a converter for managing partition references within a PostgreSQL database for serializable objects.

public class PartitionReferencePostgreSQLConverter<TSerializableObject> : DiGi.PostgreSQL.Classes.PostgreSQLConverter<TSerializableObject>
    where TSerializableObject : DiGi.Core.Interfaces.ISerializableObject

Type parameters

TSerializableObject

The type of the serializable object that implements ISerializableObject.

Inheritance System.Object → DiGi.PostgreSQL.Classes.PostgreSQLConverter<TSerializableObject> → PartitionReferencePostgreSQLConverter<TSerializableObject>

Derived
↳ PartitionReferencePostgreSQLConverter

Constructors

PartitionReferencePostgreSQLConverter(ConnectionData) Constructor

Initializes a new instance of the PartitionReferencePostgreSQLConverter<TSerializableObject> class.

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

Parameters

connectionData DiGi.PostgreSQL.Classes.ConnectionData

The connection data used to establish a database connection.

Methods

PartitionReferencePostgreSQLConverter<TSerializableObject>.ContainsAsync<TUniqueReference>(IEnumerable<PartitionReference>) Method

Asynchronously checks if the specified partition references exist in the database.

public System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>?> ContainsAsync<TUniqueReference>(System.Collections.Generic.IEnumerable<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>? partitionReferences);

Type parameters

TUniqueReference

The type of the unique reference used for the check.

Parameters

partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>

A collection of partition references to verify.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionReference>>
A hash set containing the existing partition references, or null if the input is null or connection fails.

PartitionReferencePostgreSQLConverter<TSerializableObject>.CountAsync(string) Method

Asynchronously counts the number of elements associated with a specific partition name.

public System.Threading.Tasks.Task<long> CountAsync(string name);

Parameters

name System.String

The name of the partition to count.

Returns

System.Threading.Tasks.Task<System.Int64>
The total count of elements, or -1 if the name is null or an error occurs.

PartitionReferencePostgreSQLConverter<TSerializableObject>.GetDataType(string) Method

Retrieves the data type associated with a given partition name.

public virtual DiGi.PostgreSQL.Enums.DataType GetDataType(string? name);

Parameters

name System.String

The name of the partition.

Returns

DiGi.PostgreSQL.Enums.DataType
The DiGi.PostgreSQL.Enums.DataType of the partition, or DataType.Undefined if the name is null or whitespace.

PartitionReferencePostgreSQLConverter<TSerializableObject>.GetSerializableObjectAsync<USerializableObject>(PartitionReference) Method

Asynchronously retrieves a single serializable object associated with the specified partition reference.

public System.Threading.Tasks.Task<USerializableObject?> GetSerializableObjectAsync<USerializableObject>(DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference? partitionReference)
    where USerializableObject : TSerializableObject;

Type parameters

USerializableObject

The specific type of the serializable object.

Parameters

partitionReference PartitionReference

The partition reference to retrieve the object for.

Returns

System.Threading.Tasks.Task<USerializableObject>
The retrieved serializable object, or default if not found or input is null.

PartitionReferencePostgreSQLConverter<TSerializableObject>.GetSerializableObjectsAsync<USerializableObject>(string) Method

Asynchronously retrieves a list of serializable objects associated with the specified partition name.

public System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>?> GetSerializableObjectsAsync<USerializableObject>(string? name)
    where USerializableObject : TSerializableObject;

Type parameters

USerializableObject

The specific type of the serializable object.

Parameters

name System.String

The name of the partition.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>>
A list of retrieved serializable objects, or default if input is null or connection fails.

PartitionReferencePostgreSQLConverter<TSerializableObject>.GetSerializableObjectsAsync<USerializableObject>(IEnumerable<PartitionReference>) Method

Asynchronously retrieves a list of serializable objects associated with the specified partition references.

public System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>?> GetSerializableObjectsAsync<USerializableObject>(System.Collections.Generic.IEnumerable<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>? partitionReferences)
    where USerializableObject : TSerializableObject;

Type parameters

USerializableObject

The specific type of the serializable object.

Parameters

partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>

A collection of partition references to retrieve objects for.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>>
A list of retrieved serializable objects, or null if input is null or connection fails.

PartitionReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync(PartitionReference) Method

Asynchronously removes a single partition reference from the database.

public System.Threading.Tasks.Task<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference?> RemoveAsync(DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference? partitionReference);

Parameters

partitionReference PartitionReference

The partition reference to remove.

Returns

System.Threading.Tasks.Task<PartitionReference>
The removed partition reference, or default if not found or input is null.

PartitionReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync(string) Method

Asynchronously removes a partition reference identified by its name.

public System.Threading.Tasks.Task<bool> RemoveAsync(string? name);

Parameters

name System.String

The name of the partition to remove.

Returns

System.Threading.Tasks.Task<System.Boolean>
True if the partition was successfully removed, otherwise false.

PartitionReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync(IEnumerable<PartitionReference>) Method

Asynchronously removes a collection of partition references from the database.

public System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>?> RemoveAsync(System.Collections.Generic.IEnumerable<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>? partitionReferences);

Parameters

partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>

A collection of partition references to remove.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionReference>>
A hash set containing the removed partition references, or null if input is null or connection fails.

PartitionReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync(IEnumerable<string>) Method

Asynchronously removes multiple partition references identified by their names.

public System.Threading.Tasks.Task<System.Collections.Generic.HashSet<string>?> RemoveAsync(System.Collections.Generic.IEnumerable<string>? names);

Parameters

names System.Collections.Generic.IEnumerable<System.String>

A collection of partition names to remove.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.HashSet<System.String>>
A hash set containing the names of successfully removed partitions, or null if input is null.

PartitionReferencePostgreSQLConverter<TSerializableObject>.UpdateAsync(TSerializableObject) Method

Asynchronously updates a single serializable object in the database.

public System.Threading.Tasks.Task<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference?> UpdateAsync(TSerializableObject? serializableObject);

Parameters

serializableObject TSerializableObject

The serializable object to update.

Returns

System.Threading.Tasks.Task<PartitionReference>
The updated partition reference, or null if input is null or update fails.

PartitionReferencePostgreSQLConverter<TSerializableObject>.UpdateAsync<USerializableObject>(IEnumerable<USerializableObject>) Method

Asynchronously updates a collection of serializable objects in the database.

public System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>?> UpdateAsync<USerializableObject>(System.Collections.Generic.IEnumerable<USerializableObject>? serializableObjects)
    where USerializableObject : TSerializableObject;

Type parameters

USerializableObject

The specific type of the serializable object.

Parameters

serializableObjects System.Collections.Generic.IEnumerable<USerializableObject>

A collection of serializable objects to update.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionReference>>
A hash set containing the updated partition references, or null if input is null or connection fails.

Events

PartitionReferencePostgreSQLConverter<TSerializableObject>.PartitionReferenceGenerating Event

Event that is triggered when a partition reference is being generated.

public event PartitionReferenceGeneratingEventHandler? PartitionReferenceGenerating;

Event Type

PartitionReferenceGeneratingEventHandler(object, PartitionReferenceGeneratingEventArgs)

Clone this wiki locally