Skip to content

DiGi.PostgreSQL.PartitionUniqueReference.Classes

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

DiGi.PostgreSQL.PartitionUniqueReference.Classes Namespace

Classes

PartitionUniqueReference Class

Represents a unique reference for a partition.

public class PartitionUniqueReference : DiGi.Core.Classes.SerializableReference

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

Constructors

PartitionUniqueReference() Constructor

Initializes a new instance of the PartitionUniqueReference class.

public PartitionUniqueReference();

PartitionUniqueReference(PartitionUniqueReference) Constructor

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

public PartitionUniqueReference(DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReference? partitionUniqueReference);

Parameters

partitionUniqueReference PartitionUniqueReference

The source instance to copy.

PartitionUniqueReference(string, IUniqueReference) Constructor

Initializes a new instance of the PartitionUniqueReference class with the specified name and unique reference.

public PartitionUniqueReference(string? name, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);

Parameters

name System.String

The name of the partition.

uniqueReference DiGi.Core.Interfaces.IUniqueReference

The unique reference for the partition.

PartitionUniqueReference(JsonObject) Constructor

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

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

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object to initialize from.

Properties

PartitionUniqueReference.Name Property

Gets the name of the partition unique reference.

public string? Name { get; }

Property Value

System.String

PartitionUniqueReference.UniqueReference Property

Gets the unique reference associated with the partition.

public DiGi.Core.Interfaces.IUniqueReference? UniqueReference { get; }

Property Value

DiGi.Core.Interfaces.IUniqueReference

Methods

PartitionUniqueReference.Clone() Method

Creates a deep copy of the current partition unique 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 this object.

PartitionUniqueReference.Equals(object) Method

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

public override bool Equals(object? obj);

Parameters

obj System.Object

The object to compare with the current instance.

Returns

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

PartitionUniqueReference.GetHashCode() Method

Gets the hash code for the current partition unique reference.

public override int GetHashCode();

Returns

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

PartitionUniqueReference.ToString() Method

Returns a string representation of the partition unique reference.

public override string? ToString();

Returns

System.String
A string combining the name and unique reference, or null if either is missing.

PartitionUniqueReferenceGeneratingEventArgs Class

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

public class PartitionUniqueReferenceGeneratingEventArgs : DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgs

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

Constructors

PartitionUniqueReferenceGeneratingEventArgs(object) Constructor

Initializes a new instance of the PartitionUniqueReferenceGeneratingEventArgs class.

public PartitionUniqueReferenceGeneratingEventArgs(object? item);

Parameters

item System.Object

The item for which the reference is being generated.

Properties

PartitionUniqueReferenceGeneratingEventArgs.PartitionReference Property

Gets or sets the partition reference associated with this event.

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

Property Value

DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference

PartitionUniqueReferenceGeneratingEventArgs.PartitionUniqueReference Property

Gets the generated partition unique reference based on the provided item and partition reference.

public DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReference? PartitionUniqueReference { get; }

Property Value

PartitionUniqueReference

PartitionUniqueReferencePostgreSQLConverter Class

A non-generic implementation of the partition unique reference converter using DiGi.Core.Interfaces.ISerializableObject.

public class PartitionUniqueReferencePostgreSQLConverter : DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReferencePostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject>

Inheritance System.Object → DiGi.PostgreSQL.Classes.PostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject> → DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReferencePostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject> → PartitionUniqueReferencePostgreSQLConverter

Constructors

PartitionUniqueReferencePostgreSQLConverter(ConnectionData) Constructor

Initializes a new instance of the PartitionUniqueReferencePostgreSQLConverter class.

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

Parameters

connectionData DiGi.PostgreSQL.Classes.ConnectionData

The connection data used to establish a database connection.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject> Class

Provides functionality to convert and manage partition unique references within a PostgreSQL database for objects implementing DiGi.Core.Interfaces.ISerializableObject.

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

Type parameters

TSerializableObject

The type of the serializable object, which must implement DiGi.Core.Interfaces.ISerializableObject.

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

Derived
↳ PartitionUniqueReferencePostgreSQLConverter

Constructors

PartitionUniqueReferencePostgreSQLConverter(ConnectionData) Constructor

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

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

Parameters

connectionData DiGi.PostgreSQL.Classes.ConnectionData

The connection data used to establish a database connection.

Methods

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.Clean(bool, bool) Method

Cleans the specified partitions and types from the database.

public System.Threading.Tasks.Task<bool> Clean(bool partitions=true, bool types=true);

Parameters

partitions System.Boolean

A value indicating whether to clean partitions.

types System.Boolean

A value indicating whether to clean types.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation. The task result contains true if any partitions or types were cleaned; otherwise, false.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.ContainsAsync(Type) Method

Checks asynchronously whether the specified type exists in the database.

public System.Threading.Tasks.Task<bool> ContainsAsync(DiGi.PostgreSQL.PartitionUniqueReference.Classes.Type? type);

Parameters

type Type

The type to check for existence.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation. The task result contains true if the type exists; otherwise, false.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.ContainsAsync(IEnumerable<PartitionUniqueReference>) Method

Checks asynchronously whether the specified collection of partition unique references exists in the database.

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

Parameters

partitionUniqueReferences System.Collections.Generic.IEnumerable<PartitionUniqueReference>

The collection of unique references to check.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionUniqueReference>>
A task that represents the asynchronous operation. The task result contains a hash set of existing unique references, or null if the input was null or connection failed.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.ContainsAsync(Type) Method

Checks asynchronously whether the specified system type exists in the database.

public System.Threading.Tasks.Task<bool> ContainsAsync(System.Type? type);

Parameters

type System.Type

The system type to check for existence.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation. The task result contains true if the type exists; otherwise, false.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.GetDataType(string) Method

Gets the data type associated with the specified name.

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

Parameters

name System.String

The name of the entity to determine the data type for.

Returns

DiGi.PostgreSQL.Enums.DataType
The DiGi.PostgreSQL.Enums.DataType associated with the name, or DiGi.PostgreSQL.Enums.DataType.Undefined if the name is null or whitespace.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.GetSerializableObjectAsync<USerializableObject>(PartitionUniqueReference) Method

Retrieves a single serializable object asynchronously based on the provided unique reference.

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

Type parameters

USerializableObject

The specific type of the serializable object.

Parameters

partitionUniqueReference PartitionUniqueReference

The unique reference used to locate the object.

Returns

System.Threading.Tasks.Task<USerializableObject>
A task that represents the asynchronous operation. The task result contains the found object, or default if not found or input is null.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.GetSerializableObjectsAsync<USerializableObject>(IEnumerable<PartitionUniqueReference>) Method

Retrieves a list of serializable objects asynchronously based on the provided collection of unique references.

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

Type parameters

USerializableObject

The specific type of the serializable objects.

Parameters

partitionUniqueReferences System.Collections.Generic.IEnumerable<PartitionUniqueReference>

The collection of unique references used to locate the objects.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>>
A task that represents the asynchronous operation. The task result contains a list of found objects, or null if input is null or connection failed.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync(PartitionUniqueReference, bool) Method

Removes a single unique reference from the database asynchronously.

public System.Threading.Tasks.Task<DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReference?> RemoveAsync(DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReference? partitionUniqueReference, bool clean=true);

Parameters

partitionUniqueReference PartitionUniqueReference

The unique reference to remove.

clean System.Boolean

A value indicating whether to perform a cleaning operation after removal.

Returns

System.Threading.Tasks.Task<PartitionUniqueReference>
A task that represents the asynchronous operation. The task result contains the removed unique reference, or null if not found or input is null.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync(IEnumerable<PartitionUniqueReference>, bool) Method

Removes the specified collection of unique references from the database asynchronously.

public System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReference>?> RemoveAsync(System.Collections.Generic.IEnumerable<DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReference>? partitionUniqueReferences, bool clean=true);

Parameters

partitionUniqueReferences System.Collections.Generic.IEnumerable<PartitionUniqueReference>

The collection of unique references to remove.

clean System.Boolean

A value indicating whether to perform a cleaning operation after removal.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionUniqueReference>>
A task that represents the asynchronous operation. The task result contains a hash set of removed unique references, or null if input is null or connection failed.

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.UpdateAsync(TSerializableObject) Method

Updates a single serializable object in the database asynchronously.

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

Parameters

serializableObject TSerializableObject

The object to update.

Returns

System.Threading.Tasks.Task<PartitionUniqueReference>
A task that represents the asynchronous operation. The task result contains the unique reference of the updated object, or null if input is null or update failed.

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

Updates a collection of serializable objects in the database asynchronously.

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

Type parameters

USerializableObject

The specific type of the serializable objects.

Parameters

serializableObjects System.Collections.Generic.IEnumerable<USerializableObject>

The collection of objects to update.

Returns

System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionUniqueReference>>
A task that represents the asynchronous operation. The task result contains a hash set of unique references for the updated objects, or null if input is null or connection failed.

Events

PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.PartitionUniqueReferenceReferenceGenerating Event

Occurs when a partition unique reference is being generated.

public event PartitionUniqueReferenceGeneratingEventHandler? PartitionUniqueReferenceReferenceGenerating;

Event Type

PartitionUniqueReferenceGeneratingEventHandler(object, PartitionUniqueReferenceGeneratingEventArgs)

Type Class

Represents a type definition with an ID and name, used for partitioning unique references.

public class Type : 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 → Type

Implements 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

Constructors

Type(Type) Constructor

Initializes a new instance of the Type class by copying another instance.

public Type(DiGi.PostgreSQL.PartitionUniqueReference.Classes.Type type);

Parameters

type Type

The type instance to copy.

Type(short, string) Constructor

Initializes a new instance of the Type class with the specified ID and name.

public Type(short id, string name);

Parameters

id System.Int16

The unique identifier of the type.

name System.String

The name of the type.

Type(JsonObject) Constructor

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

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

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing the type definition data.

Properties

Type.Id Property

Gets the unique identifier of the type.

public short Id { get; }

Property Value

System.Int16

Type.Name Property

Gets the name of the type.

public string? Name { get; }

Property Value

System.String

Clone this wiki locally