Class IUsesDatabaseQueryingExtensionMethods
Namespace: Unity.MARS.Data
Syntax
public static class IUsesDatabaseQueryingExtensionMethods
Methods
IsSetQueryDataDirty(IUsesDatabaseQuerying, QueryMatchID)
Checks whether data used by a set query match has changed
Declaration
public static bool IsSetQueryDataDirty(this IUsesDatabaseQuerying obj, QueryMatchID queryMatchID)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
QueryMatchID | queryMatchID | ID of the query match using data |
Returns
Type | Description |
---|---|
Boolean | True if any of the set's data has changed, false otherwise |
MarkDataUsedForUpdates(IUsesDatabaseQuerying, Int32, QueryMatchID, Exclusivity)
Tells the database that data will be used to update a query match
Declaration
public static void MarkDataUsedForUpdates(this IUsesDatabaseQuerying obj, int dataID, QueryMatchID queryMatchID, Exclusivity exclusivity)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
Int32 | dataID | ID for the data used by a query match |
QueryMatchID | queryMatchID | ID of the query match using this data |
Exclusivity | exclusivity | Specification of how the data should be reserved |
MarkSetDataUsedForUpdates(IUsesDatabaseQuerying, QueryMatchID, HashSet<Int32>)
Tells the database that data will be used to update a set query match
Declaration
public static void MarkSetDataUsedForUpdates(this IUsesDatabaseQuerying obj, QueryMatchID queryMatchID, HashSet<int> data)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
QueryMatchID | queryMatchID | ID of the query match using this data |
HashSet<Int32> | data | Specification of which data is used for each set child |
QueryDataDirty(IUsesDatabaseQuerying, QueryMatchID)
Checks whether data used by a query match has changed
Declaration
public static bool QueryDataDirty(this IUsesDatabaseQuerying obj, QueryMatchID queryMatchID)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
QueryMatchID | queryMatchID | ID of the query match using data |
Returns
Type | Description |
---|---|
Boolean | True if the data has changed, false otherwise |
TryUpdateQueryMatchData(IUsesDatabaseQuerying, Int32, Conditions, ProxyTraitRequirements, QueryResult)
Tries to fill out a QueryResult with updated data for a query that has been matched. This also checks if the data no longer meets the given conditions.
Declaration
public static bool TryUpdateQueryMatchData(this IUsesDatabaseQuerying obj, int dataID, Conditions conditions, ProxyTraitRequirements requirements, QueryResult result)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
Int32 | dataID | ID for the data used by the query match |
Conditions | conditions | Criteria that the data must continue to meet |
ProxyTraitRequirements | requirements | |
QueryResult | result | Object that will contain the updated data that still matches the conditions |
Returns
Type | Description |
---|---|
Boolean | True if the data still matches the conditions, false otherwise |
TryUpdateSetQueryMatchData(IUsesDatabaseQuerying, SetMatchData, Relations, SetQueryResult)
Tries to fill out a SetQueryResult with updated data for a query that has been matched. This also checks if the data no longer meets the given relations.
Declaration
public static bool TryUpdateSetQueryMatchData(this IUsesDatabaseQuerying obj, SetMatchData data, Relations relations, SetQueryResult result)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
SetMatchData | data | Specification of which data is used for each set child |
Relations | relations | Bi-directional constraints that the data must continue to meet |
SetQueryResult | result | Object that will contain the updated data that still matches the relations, as well as a list of non-required children that were lost during this update |
Returns
Type | Description |
---|---|
Boolean | True if the data still matches the relations, false otherwise |
UnmarkDataUsedForUpdates(IUsesDatabaseQuerying, QueryMatchID)
Tells the database that data is no longer used by a query match
Declaration
public static void UnmarkDataUsedForUpdates(this IUsesDatabaseQuerying obj, QueryMatchID queryMatchID)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
QueryMatchID | queryMatchID | ID of the query match no longer using its data |
UnmarkPartialSetDataUsedForUpdates(IUsesDatabaseQuerying, QueryMatchID, ICollection<IMRObject>)
Tells the database that a certain set of child data is no longer used by a set query match. This should be used when a set's non-required children are lost, in order to free up their data.
Declaration
public static void UnmarkPartialSetDataUsedForUpdates(this IUsesDatabaseQuerying obj, QueryMatchID queryMatchID, ICollection<IMRObject> childrenToUnmark)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
QueryMatchID | queryMatchID | ID of the query match no longer using some of its data |
ICollection<IMRObject> | childrenToUnmark | Collection of child MR objects whose data should be unmarked |
UnmarkSetDataUsedForUpdates(IUsesDatabaseQuerying, QueryMatchID)
Tells the database that data is no longer used by a set query match
Declaration
public static void UnmarkSetDataUsedForUpdates(this IUsesDatabaseQuerying obj, QueryMatchID queryMatchID)
Parameters
Type | Name | Description |
---|---|---|
IUsesDatabaseQuerying | obj | |
QueryMatchID | queryMatchID | ID of the query match no longer using its data |