Class SqlServerDataStoreProvider
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice.
Inheritance
System.Object
SqlServerDataStoreProvider
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: EPiServer.Data.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(IncludeServiceAccessor = false)]
public class SqlServerDataStoreProvider : DbDataStoreProvider
Constructors
SqlServerDataStoreProvider()
Declaration
public SqlServerDataStoreProvider()
Methods
CanMoveDataBetweenProperties(InlinePropertyMap, InlinePropertyMap)
Declaration
public override bool CanMoveDataBetweenProperties(InlinePropertyMap fromProperty, InlinePropertyMap toProperty)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
ConvertToGuid(Object)
Declaration
protected override Guid ConvertToGuid(object value)
Parameters
Type |
Name |
Description |
System.Object |
value |
|
Returns
Type |
Description |
System.Guid |
|
Overrides
CreateParameter(String, DbType, ParameterDirection, Object)
Declaration
protected override IDbDataParameter CreateParameter(string name, DbType dbType, ParameterDirection direction, object value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Data.DbType |
dbType |
|
System.Data.ParameterDirection |
direction |
|
System.Object |
value |
|
Returns
Type |
Description |
System.Data.IDbDataParameter |
|
Overrides
CreateParameter(String, Object)
Declaration
public override IDbDataParameter CreateParameter(string name, object value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Object |
value |
|
Returns
Type |
Description |
System.Data.IDbDataParameter |
|
Overrides
GetCreateSaveSPCommandText(StoreDefinition)
Declaration
protected override string GetCreateSaveSPCommandText(StoreDefinition storeDefinition)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetCreateViewCommandText(StoreDefinition)
Declaration
protected override string GetCreateViewCommandText(StoreDefinition storeDefinition)
Parameters
Returns
Type |
Description |
System.String |
|
Overrides
GetDeleteAllProcedureCommand(String)
Declaration
protected override DbCommand GetDeleteAllProcedureCommand(string storeName)
Parameters
Type |
Name |
Description |
System.String |
storeName |
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetDeleteExcessReferencesCommand(Int64, String, Int32)
Declaration
protected override DbCommand GetDeleteExcessReferencesCommand(long id, string propertyName, int startIndex)
Parameters
Type |
Name |
Description |
System.Int64 |
id |
|
System.String |
propertyName |
|
System.Int32 |
startIndex |
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetDeleteProcedureCommand(Identity)
Declaration
protected override DbCommand GetDeleteProcedureCommand(Identity id)
Parameters
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetDropSaveSPCommandText(String)
Declaration
protected override string GetDropSaveSPCommandText(string storeName)
Parameters
Type |
Name |
Description |
System.String |
storeName |
|
Returns
Type |
Description |
System.String |
|
Overrides
GetDropViewCommandText(String)
Declaration
protected override string GetDropViewCommandText(string storeName)
Parameters
Type |
Name |
Description |
System.String |
storeName |
|
Returns
Type |
Description |
System.String |
|
Overrides
GetEntityReferenceCountCommand(IEntity)
Creates a command that returns the number of Dynamic Data Store objects that reference a specific IEntity.
Declaration
protected override DbCommand GetEntityReferenceCountCommand(IEntity entity)
Parameters
Type |
Name |
Description |
IEntity |
entity |
The IEntity for which reference should be counted.
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
An System.Data.IDbCommand instance that should be run by calling ExecuteScalar to return the number of references.
|
Overrides
GetLoadCollectionCommand(Identity, String)
Declaration
protected override DbCommand GetLoadCollectionCommand(Identity id, string propertyName)
Parameters
Type |
Name |
Description |
Identity |
id |
|
System.String |
propertyName |
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetLoadCommand(String, IDictionary<String, Object>, IEnumerable<InlinePropertyMap>)
Declaration
protected override DbCommand GetLoadCommand(string storeName, IDictionary<string, object> parameters, IEnumerable<InlinePropertyMap> inlineProperties)
Parameters
Type |
Name |
Description |
System.String |
storeName |
|
System.Collections.Generic.IDictionary<System.String, System.Object> |
parameters |
|
System.Collections.Generic.IEnumerable<InlinePropertyMap> |
inlineProperties |
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetLoadReferencesCommand(Identity)
Declaration
protected override DbCommand GetLoadReferencesCommand(Identity id)
Parameters
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetMoveDataCommand(StoreDefinition)
Declaration
protected override DbCommand GetMoveDataCommand(StoreDefinition storeDefinition)
Parameters
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetProviderSpecificParameterName(String)
Return the decorated parameter name as used by MS SQL Server
Declaration
protected virtual string GetProviderSpecificParameterName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
The parameter name
|
Returns
Type |
Description |
System.String |
The decorated parameter name
|
GetQueryObject<T>(DynamicDataStore, LoadAsObjectType)
Declaration
protected override Query<T> GetQueryObject<T>(DynamicDataStore store, LoadAsObjectType loadObjectAs)
Parameters
Returns
Type |
Description |
Query<T> |
|
Type Parameters
Overrides
GetSaveInlinePropertiesCommand(ProviderCallContext)
Declaration
protected override DbCommand GetSaveInlinePropertiesCommand(ProviderCallContext context)
Parameters
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetSaveReferencePropertyCommand(PropertyMapType, DbType, Int64, String, Boolean, Int32, Type, Type, String, String, Object)
Declaration
protected override DbCommand GetSaveReferencePropertyCommand(PropertyMapType propertyType, DbType dataType, long id, string propertyName, bool isKey, int index, Type collectionType, Type elementType, string elementStoreName, string columnName, object value)
Parameters
Type |
Name |
Description |
PropertyMapType |
propertyType |
|
System.Data.DbType |
dataType |
|
System.Int64 |
id |
|
System.String |
propertyName |
|
System.Boolean |
isKey |
|
System.Int32 |
index |
|
System.Type |
collectionType |
|
System.Type |
elementType |
|
System.String |
elementStoreName |
|
System.String |
columnName |
|
System.Object |
value |
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
DbDataStoreProvider.GetSaveReferencePropertyCommand(PropertyMapType, DbType, Int64, String, Boolean, Int32, Type, Type, String, String, Object)
GetSaveReferencePropertyCommand(PropertyMapType, Int64, String, Boolean, Int32, Type, Type, String, IList<Tuple<String, Object, DbType>>)
Declaration
protected override DbCommand GetSaveReferencePropertyCommand(PropertyMapType propertyType, long id, string propertyName, bool isKey, int index, Type collectionType, Type elementType, string elementStoreName, IList<Tuple<string, object, DbType>> columnValues)
Parameters
Type |
Name |
Description |
PropertyMapType |
propertyType |
|
System.Int64 |
id |
|
System.String |
propertyName |
|
System.Boolean |
isKey |
|
System.Int32 |
index |
|
System.Type |
collectionType |
|
System.Type |
elementType |
|
System.String |
elementStoreName |
|
System.Collections.Generic.IList<System.Tuple<System.String, System.Object, System.Data.DbType>> |
columnValues |
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
DbDataStoreProvider.GetSaveReferencePropertyCommand(PropertyMapType, Int64, String, Boolean, Int32, Type, Type, String, IList<Tuple<String, Object, DbType>>)
GetStoreInfoDeleteCommand(String)
Gets the store info command delete.
Declaration
protected override DbCommand GetStoreInfoDeleteCommand(string storeName)
Parameters
Type |
Name |
Description |
System.String |
storeName |
Name of the store.
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetStoreInfoLoadCommand(String, Boolean)
Gets the store info command load.
Declaration
protected override DbCommand GetStoreInfoLoadCommand(string storeName, bool loadInactiveProperties)
Parameters
Type |
Name |
Description |
System.String |
storeName |
Name of the store.
|
System.Boolean |
loadInactiveProperties |
Set to true if properties belonging to old mapping of store should be included
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetStoreInfoSaveCommand(StoreDefinition)
Get the 'Store Info Save' command
Declaration
protected override DbCommand GetStoreInfoSaveCommand(StoreDefinition storeDefinition)
Parameters
Returns
Type |
Description |
System.Data.Common.DbCommand |
An System.Data.IDbCommand instance
|
Overrides
GetStoreNameForItemCommand(Identity, String)
Declaration
protected override DbCommand GetStoreNameForItemCommand(Identity id, string tableName)
Parameters
Type |
Name |
Description |
Identity |
id |
|
System.String |
tableName |
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetStoreNamesCommandText()
Declaration
protected override string GetStoreNamesCommandText()
Returns
Type |
Description |
System.String |
|
Overrides
GetStoreSaveProcedureName(String)
Declaration
protected override string GetStoreSaveProcedureName(string storeName)
Parameters
Type |
Name |
Description |
System.String |
storeName |
|
Returns
Type |
Description |
System.String |
|
Overrides
GetStoreViewName(String)
Declaration
public override string GetStoreViewName(string storeName)
Parameters
Type |
Name |
Description |
System.String |
storeName |
|
Returns
Type |
Description |
System.String |
|
Overrides
Declaration
public override TableInformation GetTableInformation(string tableName)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
Returns
Overrides
GetUpdateIndexCommand(Int64, String, Boolean, Int32)
Gets the update index command, which updates the index property in a collection or dictionary for a specific property for a specific item.
The index will be updated to an index outside of the current list, to continue holding a reference to an existing object.
Declaration
protected override DbCommand GetUpdateIndexCommand(long id, string propertyName, bool isKey, int startIndex)
Parameters
Type |
Name |
Description |
System.Int64 |
id |
The identity of the item, which will have one of it's properties updated.
|
System.String |
propertyName |
Name of the property for which the index will be updated.
|
System.Boolean |
isKey |
If set to true , the property will update the key part of a dictionary. If set to false, the property will update the value part on a dictionary or collection.
|
System.Int32 |
startIndex |
The start index from where the index update should start. All items from the start index will be updated.
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
A database command containing the update SQL for the index of a collection or dictionary.
|
Overrides
GetUpdatePropertyNameInReferenceTableCommand(PropertyMap, StoreDefinition)
Get an System.Data.IDbCommand instance, containing update statement for the property name in the reference table
Declaration
protected override DbCommand GetUpdatePropertyNameInReferenceTableCommand(PropertyMap propertyMap, StoreDefinition storeDefinition)
Parameters
Type |
Name |
Description |
PropertyMap |
propertyMap |
Property map containing old property name and new property name
|
StoreDefinition |
storeDefinition |
The storeDefinition for the store
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
An System.Data.IDbCommand instance
|
Overrides
GetUpdateReferencesPropertyNameCommand(String, String, String, String)
Gets the command to update References' names.
Declaration
public override DbCommand GetUpdateReferencesPropertyNameCommand(string storeName, string tableName, string oldPropertyName, string newPropertyName)
Parameters
Type |
Name |
Description |
System.String |
storeName |
Name of the store.
|
System.String |
tableName |
Name of the CustomBigtable
|
System.String |
oldPropertyName |
The old Name of the Property
|
System.String |
newPropertyName |
The new Name of the Property
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
GetValueOverflowCountCommand(String, DbType, String, String, Type, Object, Object)
Declaration
protected override DbCommand GetValueOverflowCountCommand(string storeName, DbType dataType, string dbDeclarationType, string propertyName, Type dbType, object minValue, object maxValue)
Parameters
Type |
Name |
Description |
System.String |
storeName |
|
System.Data.DbType |
dataType |
|
System.String |
dbDeclarationType |
|
System.String |
propertyName |
|
System.Type |
dbType |
|
System.Object |
minValue |
|
System.Object |
maxValue |
|
Returns
Type |
Description |
System.Data.Common.DbCommand |
|
Overrides
IsProviderSpecificException(Exception)
Determines if an exception is specific to the data provider or a standard .NET exception
Declaration
public override bool IsProviderSpecificException(Exception exception)
Parameters
Type |
Name |
Description |
System.Exception |
exception |
The exception to check
|
Returns
Type |
Description |
System.Boolean |
true if the exception is data provider specific, otherwise false
|
Overrides
ProcessValueFromDb(Type, Object, String, ProviderCallContext, Type)
Declaration
protected override object ProcessValueFromDb(Type targetType, object value, string name, ProviderCallContext context, Type targetParentType)
Parameters
Type |
Name |
Description |
System.Type |
targetType |
|
System.Object |
value |
|
System.String |
name |
|
ProviderCallContext |
context |
|
System.Type |
targetParentType |
|
Returns
Type |
Description |
System.Object |
|
Overrides
ProcessValueToDb(DbType, String, Object, ProviderCallContext)
Declaration
protected override object ProcessValueToDb(DbType dataType, string name, object value, ProviderCallContext context)
Parameters
Type |
Name |
Description |
System.Data.DbType |
dataType |
|
System.String |
name |
|
System.Object |
value |
|
ProviderCallContext |
context |
|
Returns
Type |
Description |
System.Object |
|
Overrides
ReservedColNames()
Declaration
protected string[] ReservedColNames()
Returns
Type |
Description |
System.String[] |
|
SaveStoreDefinition(StoreDefinition)
Sql Server has it's own version of this as we need to drop the views and sp's first if they already exist
before re-creating them
Declaration
public override void SaveStoreDefinition(StoreDefinition storeDefinition)
Parameters
Overrides
Extension Methods