Repository navigation
DiGi.PostgreSQL.PartitionReference
public static class ModifyInheritance System.Object → Modify
Asynchronously removes the specified partition references from the database.
public static System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>?> RemoveAsync(Npgsql.NpgsqlConnection? npgsqlConnection, System.Collections.Generic.IEnumerable<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference> partitionReferences);npgsqlConnection Npgsql.NpgsqlConnection
The Npgsql connection to be used for the operation.
partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>
The collection of partition references to remove.
System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionReference>>
A hash set containing the successfully removed partition references, or null if the connection is null or an error occurred during processing.
Modify.UpdateAsync<USerializableObject>(this NpgsqlConnection, IEnumerable<USerializableObject>, Func<string,DataType>, object, PartitionReferenceGeneratingEventHandler) Method
Asynchronously updates the specified serializable objects in the PostgreSQL database, utilizing partitions and UPSERT logic.
public static System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>?> UpdateAsync<USerializableObject>(this Npgsql.NpgsqlConnection? npgsqlConnection, System.Collections.Generic.IEnumerable<USerializableObject> serializableObjects, System.Func<string?,DiGi.PostgreSQL.Enums.DataType> dataTypeFunc, object? sender=null, DiGi.PostgreSQL.PartitionReference.Delegates.PartitionReferenceGeneratingEventHandler? partitionReferenceGeneratingEventHandler=null)
where USerializableObject : DiGi.Core.Interfaces.ISerializableObject;USerializableObject
The type of the serializable object, which must implement DiGi.Core.Interfaces.ISerializableObject.
npgsqlConnection Npgsql.NpgsqlConnection
The Npgsql connection to be used for the database operation.
serializableObjects System.Collections.Generic.IEnumerable<USerializableObject>
The collection of objects to be updated.
dataTypeFunc System.Func<System.String,DiGi.PostgreSQL.Enums.DataType>
A function that determines the DiGi.PostgreSQL.Enums.DataType based on the partition name.
sender System.Object
The object that sends the event, passed to the partitionReferenceGeneratingEventHandler.
partitionReferenceGeneratingEventHandler PartitionReferenceGeneratingEventHandler(object, PartitionReferenceGeneratingEventArgs)
An optional event handler for generating partition references.
System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionReference>>
A task that represents the asynchronous operation. The task result contains a HashSet of PartitionReference of updated partition references, or null if the connection or objects are null or if the table creation fails.
public static class QueryInheritance System.Object → Query
Asynchronously checks if the specified partition references exist in the database.
public static System.Threading.Tasks.Task<System.Collections.Generic.HashSet<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>?> ContainsAsync(this Npgsql.NpgsqlConnection npgsqlConnection, System.Collections.Generic.IEnumerable<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference>? partitionReferences);npgsqlConnection Npgsql.NpgsqlConnection
The Npgsql connection to be used for the operation.
partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>
The collection of partition references to check for existence.
System.Threading.Tasks.Task<System.Collections.Generic.HashSet<PartitionReference>>
A task that represents the asynchronous operation. The task result contains a HashSet of the partition references that exist in the database, or null if the connection or the input collection is null.
Asynchronously retrieves a list of serializable objects associated with a specific partition name.
public static System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>?> SerializableObjectsAsync<USerializableObject>(Npgsql.NpgsqlConnection? npgsqlConnection, string name)
where USerializableObject : DiGi.Core.Interfaces.ISerializableObject;USerializableObject
The type of the serializable object, which must implement ISerializableObject.
npgsqlConnection Npgsql.NpgsqlConnection
The Npgsql connection to use for the database query.
name System.String
The name of the partition from which to retrieve objects.
System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>>
A task that represents the asynchronous operation, containing a list of serializable objects or null if the connection is null.
Query.SerializableObjectsAsync<USerializableObject>(NpgsqlConnection, IEnumerable<PartitionReference>) Method
Asynchronously retrieves a list of serializable objects associated with a collection of partition references.
public static System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>?> SerializableObjectsAsync<USerializableObject>(Npgsql.NpgsqlConnection? npgsqlConnection, System.Collections.Generic.IEnumerable<DiGi.PostgreSQL.PartitionReference.Classes.PartitionReference> partitionReferences)
where USerializableObject : DiGi.Core.Interfaces.ISerializableObject;USerializableObject
The type of the serializable object, which must implement ISerializableObject.
npgsqlConnection Npgsql.NpgsqlConnection
The Npgsql connection to use for the database query.
partitionReferences System.Collections.Generic.IEnumerable<PartitionReference>
A collection of partition references used to identify the objects to retrieve.
System.Threading.Tasks.Task<System.Collections.Generic.List<USerializableObject>>
A task that represents the asynchronous operation, containing a list of serializable objects or null if the connection or partition references are null.