Repository navigation
DiGi.PostgreSQL.PartitionUniqueReference.Classes
Represents a unique reference for a partition.
public class PartitionUniqueReference : DiGi.Core.Classes.SerializableReferenceInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → DiGi.Core.Classes.SerializableReference → PartitionUniqueReference
Initializes a new instance of the PartitionUniqueReference class.
public PartitionUniqueReference();Initializes a new instance of the PartitionUniqueReference class by copying an existing instance.
public PartitionUniqueReference(DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReference? partitionUniqueReference);partitionUniqueReference PartitionUniqueReference
The source instance to copy.
Initializes a new instance of the PartitionUniqueReference class with the specified name and unique reference.
public PartitionUniqueReference(string? name, DiGi.Core.Interfaces.IUniqueReference? uniqueReference);name System.String
The name of the partition.
uniqueReference DiGi.Core.Interfaces.IUniqueReference
The unique reference for the partition.
Initializes a new instance of the PartitionUniqueReference class from a JSON object.
public PartitionUniqueReference(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object to initialize from.
Gets the name of the partition unique reference.
public string? Name { get; }Gets the unique reference associated with the partition.
public DiGi.Core.Interfaces.IUniqueReference? UniqueReference { get; }DiGi.Core.Interfaces.IUniqueReference
Creates a deep copy of the current partition unique reference.
public override DiGi.Core.Interfaces.ISerializableObject? Clone();Implements Clone()
DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a clone of this object.
Determines whether the specified object is equal to the current partition unique reference.
public override bool Equals(object? obj);obj System.Object
The object to compare with the current instance.
System.Boolean
True if the objects are equal; otherwise, false.
Gets the hash code for the current partition unique reference.
public override int GetHashCode();System.Int32
A 32-bit signed integer hash code.
Returns a string representation of the partition unique reference.
public override string? ToString();System.String
A string combining the name and unique reference, or null if either is missing.
Provides data for events that occur during the generation of a partition unique reference.
public class PartitionUniqueReferenceGeneratingEventArgs : DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgsInheritance System.Object → System.EventArgs → DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgs → PartitionUniqueReferenceGeneratingEventArgs
Initializes a new instance of the PartitionUniqueReferenceGeneratingEventArgs class.
public PartitionUniqueReferenceGeneratingEventArgs(object? item);item System.Object
The item for which the reference is being generated.
Gets or sets the partition reference associated with this event.
public DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference? PartitionReference { get; set; }DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference
Gets the generated partition unique reference based on the provided item and partition reference.
public DiGi.PostgreSQL.PartitionUniqueReference.Classes.PartitionUniqueReference? PartitionUniqueReference { get; }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
Initializes a new instance of the PartitionUniqueReferencePostgreSQLConverter class.
public PartitionUniqueReferencePostgreSQLConverter(DiGi.PostgreSQL.Classes.ConnectionData? connectionData);connectionData DiGi.PostgreSQL.Classes.ConnectionData
The connection data used to establish a database connection.
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.ISerializableObjectTSerializableObject
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
Initializes a new instance of the PartitionUniqueReferencePostgreSQLConverter<TSerializableObject> class.
public PartitionUniqueReferencePostgreSQLConverter(DiGi.PostgreSQL.Classes.ConnectionData? connectionData);connectionData DiGi.PostgreSQL.Classes.ConnectionData
The connection data used to establish a database connection.
Cleans the specified partitions and types from the database.
public System.Threading.Tasks.Task<bool> Clean(bool partitions=true, bool types=true);partitions System.Boolean
A value indicating whether to clean partitions.
types System.Boolean
A value indicating whether to clean types.
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.
Checks asynchronously whether the specified type exists in the database.
public System.Threading.Tasks.Task<bool> ContainsAsync(DiGi.PostgreSQL.PartitionUniqueReference.Classes.Type? type);type Type
The type to check for existence.
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);partitionUniqueReferences System.Collections.Generic.IEnumerable<PartitionUniqueReference>
The collection of unique references to check.
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.
Checks asynchronously whether the specified system type exists in the database.
public System.Threading.Tasks.Task<bool> ContainsAsync(System.Type? type);type System.Type
The system type to check for existence.
System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation. The task result contains true if the type exists; otherwise, false.
Gets the data type associated with the specified name.
public virtual DiGi.PostgreSQL.Enums.DataType GetDataType(string? name);name System.String
The name of the entity to determine the data type for.
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;USerializableObject
The specific type of the serializable object.
partitionUniqueReference PartitionUniqueReference
The unique reference used to locate the object.
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;USerializableObject
The specific type of the serializable objects.
partitionUniqueReferences System.Collections.Generic.IEnumerable<PartitionUniqueReference>
The collection of unique references used to locate the objects.
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);partitionUniqueReference PartitionUniqueReference
The unique reference to remove.
clean System.Boolean
A value indicating whether to perform a cleaning operation after removal.
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);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.
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);serializableObject TSerializableObject
The object to update.
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;USerializableObject
The specific type of the serializable objects.
serializableObjects System.Collections.Generic.IEnumerable<USerializableObject>
The collection of objects to update.
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.
PartitionUniqueReferencePostgreSQLConverter<TSerializableObject>.PartitionUniqueReferenceReferenceGenerating Event
Occurs when a partition unique reference is being generated.
public event PartitionUniqueReferenceGeneratingEventHandler? PartitionUniqueReferenceReferenceGenerating;PartitionUniqueReferenceGeneratingEventHandler(object, PartitionUniqueReferenceGeneratingEventArgs)
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.ICloneableObjectInheritance 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
Initializes a new instance of the Type class by copying another instance.
public Type(DiGi.PostgreSQL.PartitionUniqueReference.Classes.Type type);type Type
The type instance to copy.
Initializes a new instance of the Type class with the specified ID and name.
public Type(short id, string name);id System.Int16
The unique identifier of the type.
name System.String
The name of the type.
Initializes a new instance of the Type class from a JSON object.
public Type(System.Text.Json.Nodes.JsonObject jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object containing the type definition data.
Gets the unique identifier of the type.
public short Id { get; }Gets the name of the type.
public string? Name { get; }