Repository navigation
DiGi.PostgreSQL.UniqueReference.Classes
Event arguments used during the generation of a unique ID reference.
public class UniqueIdReferenceGeneratingEventArgs : DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgsInheritance System.Object → System.EventArgs → DiGi.PostgreSQL.Classes.ReferenceGeneratingEventArgs → UniqueIdReferenceGeneratingEventArgs
Initializes a new instance of the UniqueIdReferenceGeneratingEventArgs class.
public UniqueIdReferenceGeneratingEventArgs(object? item);item System.Object
The item for which the reference is being generated.
Gets or sets the unique identifier string associated with this reference.
public string? UniqueId { get; set; }Gets the constructed UniqueIdReference based on the item type and the provided unique identifier.
public DiGi.Core.Classes.UniqueIdReference? UniqueIdReference { get; }DiGi.Core.Classes.UniqueIdReference
Provides a specialized PostgreSQL converter for unique references specifically targeting objects that implement the DiGi.Core.Interfaces.ISerializableObject interface.
public class UniqueReferencePostgreSQLConverter : DiGi.PostgreSQL.UniqueReference.Classes.UniqueReferencePostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject>Inheritance System.Object → DiGi.PostgreSQL.Classes.PostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject> → DiGi.PostgreSQL.UniqueReference.Classes.UniqueReferencePostgreSQLConverter<DiGi.Core.Interfaces.ISerializableObject> → UniqueReferencePostgreSQLConverter
Initializes a new instance of the UniqueReferencePostgreSQLConverter class using the specified connection data.
public UniqueReferencePostgreSQLConverter(DiGi.PostgreSQL.Classes.ConnectionData? connectionData);connectionData DiGi.PostgreSQL.Classes.ConnectionData
The connection data used to configure the PostgreSQL converter; may be null.
Provides a PostgreSQL converter implementation specifically designed to handle unique references for objects that implement the DiGi.Core.Interfaces.ISerializableObject interface.
public class UniqueReferencePostgreSQLConverter<TSerializableObject> : DiGi.PostgreSQL.Classes.PostgreSQLConverter<TSerializableObject>
where TSerializableObject : DiGi.Core.Interfaces.ISerializableObjectTSerializableObject
The type of the serializable object being converted, which must implement the DiGi.Core.Interfaces.ISerializableObject interface.
Inheritance System.Object → DiGi.PostgreSQL.Classes.PostgreSQLConverter<TSerializableObject> → UniqueReferencePostgreSQLConverter<TSerializableObject>
Derived
↳ UniqueReferencePostgreSQLConverter
Initializes a new instance of the UniqueReferencePostgreSQLConverter class.
public UniqueReferencePostgreSQLConverter(DiGi.PostgreSQL.Classes.ConnectionData? connectionData);connectionData DiGi.PostgreSQL.Classes.ConnectionData
The connection data used to configure the PostgreSQL database connection; can be null.
Asynchronously determines whether the container contains the specified type.
public System.Threading.Tasks.Task<bool> ContainsAsync(System.Type? type);type System.Type
The System.Type to locate in the container. This value can be null.
System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation. The task result contains true if the specified type is found; otherwise, false.
UniqueReferencePostgreSQLConverter<TSerializableObject>.ContainsAsync<TUniqueReference>(IEnumerable<TUniqueReference>) Method
Asynchronously checks for the existence of a collection of unique references and returns those that are present.
public System.Threading.Tasks.Task<System.Collections.Generic.HashSet<TUniqueReference>?> ContainsAsync<TUniqueReference>(System.Collections.Generic.IEnumerable<TUniqueReference>? uniqueReferences)
where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;TUniqueReference
The type of the unique reference, which must implement the DiGi.Core.Interfaces.IUniqueReference interface.
uniqueReferences System.Collections.Generic.IEnumerable<TUniqueReference>
An optional enumerable collection of unique references to verify.
System.Threading.Tasks.Task<System.Collections.Generic.HashSet<TUniqueReference>>
A task that represents the asynchronous operation. The task result contains a System.Collections.Generic.HashSet<> of existing references, or null if no references were provided or found.
Asynchronously counts the number of elements associated with the specified type.
public System.Threading.Tasks.Task<long> CountAsync(System.Type? type, bool inheritance=true);type System.Type
The System.Type to count. If null, the behavior is determined by the underlying implementation.
inheritance System.Boolean
A value indicating whether to include types derived from the specified type in the count. Defaults to true.
System.Threading.Tasks.Task<System.Int64>
A task that represents the asynchronous operation. The task result contains the total count as a System.Int64.
UniqueReferencePostgreSQLConverter<TSerializableObject>.CountAsync<USerializableObject>(bool) Method
Asynchronously counts the total number of records for the specified serializable object type.
public System.Threading.Tasks.Task<long> CountAsync<USerializableObject>(bool inheritance=true)
where USerializableObject : TSerializableObject;USerializableObject
The type of the serializable object to count, which must derive from TSerializableObject.
inheritance System.Boolean
A value indicating whether to include types derived from USerializableObject in the count. Defaults to true.
System.Threading.Tasks.Task<System.Int64>
A task that represents the asynchronous operation. The task result contains the total number of records as a System.Int64.
Retrieves the corresponding DiGi.PostgreSQL.Enums.DataType for the specified .NET type.
public virtual DiGi.PostgreSQL.Enums.DataType GetDataType(System.Type? type);type System.Type
The .NET type to map to a DiGi.PostgreSQL.Enums.DataType. This value can be null.
DiGi.PostgreSQL.Enums.DataType
The DiGi.PostgreSQL.Enums.DataType that represents the provided type.
Retrieves the DiGi.PostgreSQL.Enums.DataType associated with the specified serializable object type.
public DiGi.PostgreSQL.Enums.DataType GetDataType<USerializableObject>()
where USerializableObject : TSerializableObject;USerializableObject
The type of the serializable object, which must derive from TSerializableObject.
DiGi.PostgreSQL.Enums.DataType
The DiGi.PostgreSQL.Enums.DataType corresponding to the provided generic type.
UniqueReferencePostgreSQLConverter<TSerializableObject>.GetSerializableObjectAsync<USerializableObject>(IUniqueReference) Method
Asynchronously retrieves a serializable object associated with the specified unique reference.
public System.Threading.Tasks.Task<USerializableObject?> GetSerializableObjectAsync<USerializableObject>(DiGi.Core.Interfaces.IUniqueReference? uniqueReference)
where USerializableObject : TSerializableObject;USerializableObject
The type of the serializable object to retrieve, which must derive from TSerializableObject.
uniqueReference DiGi.Core.Interfaces.IUniqueReference
The unique reference used to identify the object. May be null.
System.Threading.Tasks.Task<USerializableObject>
A task that represents the asynchronous operation. The task result contains the retrieved serializable object if found; otherwise, null.
UniqueReferencePostgreSQLConverter<TSerializableObject>.GetSerializableObjectsAsync<USerializableObject,TUniqueReference>(IEnumerable<TUniqueReference>) Method
Asynchronously retrieves a list of serializable objects associated with the provided unique references.
public System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>?> GetSerializableObjectsAsync<USerializableObject,TUniqueReference>(System.Collections.Generic.IEnumerable<TUniqueReference>? uniqueReferences)
where USerializableObject : TSerializableObject
where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;USerializableObject
The type of serializable object to retrieve, which must derive from TSerializableObject.
TUniqueReference
The type of unique reference used for identification, which must implement DiGi.Core.Interfaces.IUniqueReference.
uniqueReferences System.Collections.Generic.IEnumerable<TUniqueReference>
An optional collection of unique references to be used as keys for retrieving 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 retrieved serializable objects, or null if the input references were null or no objects could be found.
UniqueReferencePostgreSQLConverter<TSerializableObject>.GetSerializableObjectsAsync<USerializableObject>(bool) Method
Asynchronously retrieves a list of serializable objects from the data store.
public System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>?> GetSerializableObjectsAsync<USerializableObject>(bool inheritance=true)
where USerializableObject : TSerializableObject;USerializableObject
The type of serializable object to retrieve, which must derive from TSerializableObject.
inheritance System.Boolean
A value indicating whether to include types derived from USerializableObject in the results. Defaults to true.
System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>>
A task that represents the asynchronous operation. The task result contains a list of objects of type USerializableObject, or null if no objects are found.
Asynchronously removes the specified type from the collection.
public System.Threading.Tasks.Task<bool> RemoveAsync(System.Type? type, bool inheritance=true);type System.Type
The System.Type to remove. Can be null.
inheritance System.Boolean
A value indicating whether types that inherit from the specified type should also be removed. Defaults to true.
System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation. The task result contains true if the type was successfully removed; otherwise, false.
UniqueReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync<TUniqueReference>(IEnumerable<TUniqueReference>) Method
Asynchronously removes the entities associated with the specified collection of unique references.
public System.Threading.Tasks.Task<System.Collections.Generic.List<TUniqueReference>?> RemoveAsync<TUniqueReference>(System.Collections.Generic.IEnumerable<TUniqueReference>? uniqueReferences)
where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;TUniqueReference
The type of the unique reference, which must implement DiGi.Core.Interfaces.IUniqueReference.
uniqueReferences System.Collections.Generic.IEnumerable<TUniqueReference>
An optional collection of unique references to be removed.
System.Threading.Tasks.Task<System.Collections.Generic.List<TUniqueReference>>
A task that represents the asynchronous operation. The task result contains a list of the unique references that were successfully removed, or null if the input was null or no items were removed.
UniqueReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync<TUniqueReference>(TUniqueReference) Method
Asynchronously removes an item identified by the specified unique reference.
public System.Threading.Tasks.Task<TUniqueReference?> RemoveAsync<TUniqueReference>(TUniqueReference? uniqueReference)
where TUniqueReference : DiGi.Core.Interfaces.IUniqueReference;TUniqueReference
The type of the unique reference, which must implement DiGi.Core.Interfaces.IUniqueReference.
uniqueReference TUniqueReference
The unique reference of the item to be removed. This value can be null.
System.Threading.Tasks.Task<TUniqueReference>
A task that represents the asynchronous operation. The task result contains the removed unique reference if the operation was successful; otherwise, null.
UniqueReferencePostgreSQLConverter<TSerializableObject>.RemoveAsync<USerializableObject>(bool) Method
Asynchronously removes an object of the specified serializable type from the data store.
public System.Threading.Tasks.Task<bool> RemoveAsync<USerializableObject>(bool inheritance=true)
where USerializableObject : TSerializableObject;USerializableObject
The type of the serializable object to remove, which must derive from TSerializableObject.
inheritance System.Boolean
A value indicating whether the removal process should include inherited types. Defaults to true.
System.Threading.Tasks.Task<System.Boolean>
A task that represents the asynchronous operation. The task result contains true if the object was successfully removed; otherwise, false.
Asynchronously updates the specified serializable object in the data store.
public System.Threading.Tasks.Task<DiGi.Core.Classes.UniqueReference?> UpdateAsync(TSerializableObject? serializableObject);serializableObject TSerializableObject
The serializable object instance to update. Can be null.
System.Threading.Tasks.Task<DiGi.Core.Classes.UniqueReference>
A task that represents the asynchronous operation. The task result contains the DiGi.Core.Classes.UniqueReference of the updated object, or null if the update could not be completed or the input was null.
UniqueReferencePostgreSQLConverter<TSerializableObject>.UpdateAsync<USerializableObject>(IEnumerable<USerializableObject>) Method
Asynchronously updates a collection of serializable objects and returns the set of unique references associated with the updated entities.
public System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.Core.Classes.UniqueReference>?> UpdateAsync<USerializableObject>(System.Collections.Generic.IEnumerable<USerializableObject>? serializableObjects)
where USerializableObject : TSerializableObject;USerializableObject
The type of the serializable object to update, which must implement or derive from TSerializableObject.
serializableObjects System.Collections.Generic.IEnumerable<USerializableObject>
An optional collection of objects to be processed for updates.
System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.Core.Classes.UniqueReference>>
A task that represents the asynchronous operation. The task result contains a HashSet of UniqueReference of unique references if the update was performed; otherwise, null.
Occurs when a unique identifier reference is being generated.
public event UniqueIdReferenceGeneratingEventHandler? UniqueIdReferenceGenerating;UniqueIdReferenceGeneratingEventHandler(object, UniqueIdReferenceGeneratingEventArgs)