Repository navigation
DiGi.PostgreSQL.PartitionReference.Classes
Represents a reference to a partition.
public class PartitionReference : DiGi.Core.Classes.SerializableReferenceInheritance System.Object → DiGi.Core.Classes.Object → DiGi.Core.Classes.SerializableObject → DiGi.Core.Classes.SerializableReference → PartitionReference
Initializes a new instance of the PartitionReference class.
public PartitionReference();Initializes a new instance of the PartitionReference class by copying another reference.
public PartitionReference(DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference? partitionReference);partitionReference PartitionReference
The source reference to copy.
Initializes a new instance of the PartitionReference class with a specified name and unique identifier.
public PartitionReference(string? name, string? uniqueId);name System.String
The name of the partition.
uniqueId System.String
The unique identifier of the partition.
Initializes a new instance of the PartitionReference class from a JSON object.
public PartitionReference(System.Text.Json.Nodes.JsonObject? jsonObject);jsonObject System.Text.Json.Nodes.JsonObject
The JSON object to initialize from.
Gets the name of the partition reference.
public string? Name { get; }Gets the unique identifier for this reference.
public string? UniqueId { get; }Creates a deep copy of the current partition 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 the current object.
Determines whether the specified object is equal to the current partition reference.
public override bool Equals(object? obj);obj System.Object
The object to compare with the current object.
System.Boolean
True if the objects are equal; otherwise, false.
Returns the hash code for the current partition reference.
public override int GetHashCode();System.Int32
A 32-bit signed integer hash code.
Returns a string representation of the partition reference, combining the name and unique identifier with a separator.
public override string? ToString();System.String
A string representing the partition reference, or null if the name or unique identifier is empty.
Provides data for events that occur during the generation of a partition reference.
public class PartitionReferenceGeneratingEventArgs : DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgsInheritance System.Object → System.EventArgs → DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgs → PartitionReferenceGeneratingEventArgs
Initializes a new instance of the PartitionReferenceGeneratingEventArgs class.
public PartitionReferenceGeneratingEventArgs(object? item);item System.Object
The item associated with the event.
Gets or sets the partition reference associated with this event.
public DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference? PartitionReference { get; set; }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
Initializes a new instance of the PartitionReferencePostgreSQLConverter class.
public PartitionReferencePostgreSQLConverter(DiGi.PostgreSQL.Classes.ConnectionData? connectionData);connectionData DiGi.PostgreSQL.Classes.ConnectionData
The connection data used to establish a database connection.
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.ISerializableObjectTSerializableObject
The type of the serializable object that implements ISerializableObject.
Inheritance System.Object → DiGi.PostgreSQL.Classes.PostgreSQLConverter<TSerializableObject> → PartitionReferencePostgreSQLConverter<TSerializableObject>
Derived
↳ PartitionReferencePostgreSQLConverter
Initializes a new instance of the PartitionReferencePostgreSQLConverter<TSerializableObject> class.
public PartitionReferencePostgreSQLConverter(DiGi.PostgreSQL.Classes.ConnectionData? connectionData);connectionData DiGi.PostgreSQL.Classes.ConnectionData
The connection data used to establish a database connection.
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);TUniqueReference
The type of the unique reference used for the check.
partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>
A collection of partition references to verify.
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.
Asynchronously counts the number of elements associated with a specific partition name.
public System.Threading.Tasks.Task<long> CountAsync(string name);name System.String
The name of the partition to count.
System.Threading.Tasks.Task<System.Int64>
The total count of elements, or -1 if the name is null or an error occurs.
Retrieves the data type associated with a given partition name.
public virtual DiGi.PostgreSQL.Enums.DataType GetDataType(string? name);name System.String
The name of the partition.
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;USerializableObject
The specific type of the serializable object.
partitionReference PartitionReference
The partition reference to retrieve the object for.
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;USerializableObject
The specific type of the serializable object.
name System.String
The name of the partition.
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;USerializableObject
The specific type of the serializable object.
partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>
A collection of partition references to retrieve objects for.
System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>>
A list of retrieved serializable objects, or null if input is null or connection fails.
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);partitionReference PartitionReference
The partition reference to remove.
System.Threading.Tasks.Task<PartitionReference>
The removed partition reference, or default if not found or input is null.
Asynchronously removes a partition reference identified by its name.
public System.Threading.Tasks.Task<bool> RemoveAsync(string? name);name System.String
The name of the partition to remove.
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);partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>
A collection of partition references to remove.
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.
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);names System.Collections.Generic.IEnumerable<System.String>
A collection of partition names to remove.
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.
Asynchronously updates a single serializable object in the database.
public System.Threading.Tasks.Task<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference?> UpdateAsync(TSerializableObject? serializableObject);serializableObject TSerializableObject
The serializable object to update.
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;USerializableObject
The specific type of the serializable object.
serializableObjects System.Collections.Generic.IEnumerable<USerializableObject>
A collection of serializable objects to update.
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.
Event that is triggered when a partition reference is being generated.
public event PartitionReferenceGeneratingEventHandler? PartitionReferenceGenerating;PartitionReferenceGeneratingEventHandler(object, PartitionReferenceGeneratingEventArgs)