C# Class SenseNet.ContentRepository.Storage.Data.SqlClient.SqlProvider

Inheritance: DataProvider
Mostra file Open project: maxpavlov/FlexNet

Public Methods

Method Description
AssertSchemaTimestampAndWriteModificationDate ( long timestamp ) : void
GetLastActivityId ( ) : int
GetNameOfLastNodeWithNameBase ( int parentId, string namebase, string extension ) : string
GetScriptsForDatabaseBackup ( ) : IEnumerable
GetTimestampDataForOneNodeIntegrityCheck ( string path ) : IDataProcedure
GetTimestampDataForRecursiveIntegrityCheck ( string path ) : IDataProcedure
SecureSqlStringValue ( string value ) : string

SQL injection prevention.

SqlProvider ( ) : System

Protected Methods

Method Description
BreakInheritance ( int nodeId ) : void
CheckScriptInternal ( string commandText ) : void
CopyStagingToBinaryData ( int versionId, int propertyTypeId, int stagingBinaryDataId, string checksum ) : void
CreateBackup ( int backupNumber ) : IndexBackup
CreateDataProcedureInternal ( string commandText ) : IDataProcedure
CreateLoadIndexDocumentCollectionByPathProcedure ( string path ) : IDataProcedure
CreateNodeWriter ( ) : INodeWriter
CreateParameterInternal ( ) : IDbDataParameter
CreateSchemaWriter ( ) : SchemaWriter
CreateTransaction ( ) : ITransactionProvider
DeleteNodeTree ( int nodeId ) : DataOperationResult
DeleteNodeTreePsychical ( int nodeId ) : DataOperationResult
DeleteStagingBinaryData ( int stagingBinaryDataId ) : void
DeleteVersion ( int versionId, NodeData nodeData, int &lastMajorVersionId, int &lastMinorVersionId ) : void
ExplicateGroupMemberships ( ) : void
ExplicateOrganizationUnitMemberships ( IUser user ) : void
GetAppModelScriptPrivate ( IEnumerable paths, bool resolveAll, bool resolveChildren ) : string
GetChildrenIdentfiers ( int nodeId ) : IEnumerable
GetContentListTypesInTree ( string path ) : List
GetIdsOfNodesThatDoNotHaveIndexDocument ( ) : IEnumerable
GetIndexDocumentDataFromReader ( System reader ) : IndexDocumentData
GetLastIndexBackupNumber ( ) : System.Guid
GetNodeVersions ( int nodeId ) : NodeHead.NodeVersion[]
GetPropertyMappingInternal ( PropertyType propType ) : PropertyMapping
GetTreeSize ( string path, bool includeChildren ) : long
GetUserIdByUploadGuid ( System.Guid uploadGuid ) : int
GetVersionNumbers ( int nodeId ) : VersionNumber[]
GetVersionNumbers ( string path ) : VersionNumber[]
HasChild ( int nodeId ) : bool
InitializeStagingBinaryData ( int versionId, int propertyTypeId, string fileName, long fileSize ) : int
InstanceCount ( int nodeTypeIds ) : int
IsCacheableText ( string text ) : bool
KeepOnlyLastIndexBackup ( ) : void
LoadBinaryCacheEntity ( int nodeVersionId, int propertyTypeId ) : BinaryCacheEntity
LoadBinaryFragment ( int binaryPropertyId, long position, int count ) : byte[]
LoadBinaryPropertyValue ( int versionId, int propertyTypeId ) : Stream
LoadChildTypesToAllow ( int sourceNodeId ) : IEnumerable
LoadGroupMembership ( int groupId ) : List
LoadIndexDocumentByVersionId ( IEnumerable versionId ) : IEnumerable
LoadIndexDocumentByVersionId ( int versionId ) : IndexDocumentData
LoadLastBackup ( ) : IndexBackup
LoadMemberships ( ) : List>.Dictionary
LoadNodeHead ( int nodeId ) : NodeHead
LoadNodeHead ( string path ) : NodeHead
LoadNodeHeadByVersionId ( int versionId ) : NodeHead
LoadNodeHeads ( IEnumerable heads ) : IEnumerable
LoadNodes ( NodeBuilder>.Dictionary buildersByVersionId ) : void
LoadSchema ( ) : DataSet
LoadTextPropertyValue ( int versionId, int propertyTypeId ) : string
MoveNodeTree ( int sourceNodeId, int targetNodeId ) : DataOperationResult
NodeCount ( string path ) : int
NodeExistsInDatabase ( string path ) : bool
PersistUploadToken ( UploadToken value ) : void
QueryNodesByPath ( string pathStart, bool orderByPath ) : IEnumerable
QueryNodesByReferenceAndType ( string referenceName, int referredNodeId, int allowedTypeIds ) : IEnumerable
QueryNodesByType ( int nodeTypeIds ) : IEnumerable
QueryNodesByTypeAndPath ( int nodeTypeIds, string pathStart, bool orderByPath ) : IEnumerable
QueryNodesByTypeAndPathAndName ( int nodeTypeIds, string pathStart, bool orderByPath, string name ) : IEnumerable
QueryNodesByTypeAndPathAndProperty ( int nodeTypeIds, string pathStart, bool orderByPath, List properties ) : IEnumerable
RecoverIndexBackup ( string backupFilePath ) : IndexBackup
RemoveBreakInheritance ( int nodeId ) : void
Reset ( ) : void
SaveChunk ( int stagingBinaryDataId, byte bytes, int offset ) : void
SetActiveBackup ( IndexBackup backup, IndexBackup lastBackup ) : void
SetPermission ( SecurityEntry entry ) : void
SetPermission ( int principalId, int nodeId, PermissionType permissionType, bool isInheritable, PermissionValue permissionValue ) : void
StoreBackupStream ( string backupFilePath, IndexBackup backup, IndexBackupProgress progress ) : void
UpdateIndexDocument ( NodeData nodeData, byte indexDocumentBytes ) : void
VersionCount ( string path ) : int

Private Methods

Method Description
CreateIdXmlForNodeInfoBatchLoad ( NodeBuilder>.Dictionary builders ) : string
CreateIdXmlForReferencePropertyUpdate ( IEnumerable values ) : string
CreateReadCommand ( IndexBackup backup ) : IDataProcedure
CreateWriteCommand ( IndexBackup backup ) : SqlProcedure
GetBackupFromReader ( System.Data.SqlClient.SqlDataReader reader ) : IndexBackup
GetColumnIndex ( DataType dataType, int mapping, int &page ) : int
GetNoBackupException ( ) : Exception
GetNodeAttributeName ( string propertyName ) : string
GetNodeAttributeType ( string propertyName ) : DataType
GetPermissionCacheKey ( int principalID, int nodeID, PermissionType type ) : string
InitializeNewStream ( IndexBackup backup ) : void
LoadLastModifiersGroupId ( ) : int
LoadNodeHead ( int nodeId, string path, int versionId ) : NodeHead
SetBreakInheritanceFlag ( int nodeId, bool @break ) : void

Method Details

AssertSchemaTimestampAndWriteModificationDate() public method

public AssertSchemaTimestampAndWriteModificationDate ( long timestamp ) : void
timestamp long
return void

BreakInheritance() protected method

protected BreakInheritance ( int nodeId ) : void
nodeId int
return void

CheckScriptInternal() protected method

protected CheckScriptInternal ( string commandText ) : void
commandText string
return void

CopyStagingToBinaryData() protected method

protected CopyStagingToBinaryData ( int versionId, int propertyTypeId, int stagingBinaryDataId, string checksum ) : void
versionId int
propertyTypeId int
stagingBinaryDataId int
checksum string
return void

CreateBackup() protected method

protected CreateBackup ( int backupNumber ) : IndexBackup
backupNumber int
return IndexBackup

CreateDataProcedureInternal() protected method

protected CreateDataProcedureInternal ( string commandText ) : IDataProcedure
commandText string
return IDataProcedure

CreateLoadIndexDocumentCollectionByPathProcedure() protected method

protected CreateLoadIndexDocumentCollectionByPathProcedure ( string path ) : IDataProcedure
path string
return IDataProcedure

CreateNodeWriter() protected method

protected CreateNodeWriter ( ) : INodeWriter
return INodeWriter

CreateParameterInternal() protected method

protected CreateParameterInternal ( ) : IDbDataParameter
return IDbDataParameter

CreateSchemaWriter() protected method

protected CreateSchemaWriter ( ) : SchemaWriter
return SenseNet.ContentRepository.Storage.Schema.SchemaWriter

CreateTransaction() protected method

protected CreateTransaction ( ) : ITransactionProvider
return ITransactionProvider

DeleteNodeTree() protected method

protected DeleteNodeTree ( int nodeId ) : DataOperationResult
nodeId int
return DataOperationResult

DeleteNodeTreePsychical() protected method

protected DeleteNodeTreePsychical ( int nodeId ) : DataOperationResult
nodeId int
return DataOperationResult

DeleteStagingBinaryData() protected method

protected DeleteStagingBinaryData ( int stagingBinaryDataId ) : void
stagingBinaryDataId int
return void

DeleteVersion() protected method

protected DeleteVersion ( int versionId, NodeData nodeData, int &lastMajorVersionId, int &lastMinorVersionId ) : void
versionId int
nodeData NodeData
lastMajorVersionId int
lastMinorVersionId int
return void

ExplicateGroupMemberships() protected method

protected ExplicateGroupMemberships ( ) : void
return void

ExplicateOrganizationUnitMemberships() protected method

protected ExplicateOrganizationUnitMemberships ( IUser user ) : void
user IUser
return void

GetAppModelScriptPrivate() protected method

protected GetAppModelScriptPrivate ( IEnumerable paths, bool resolveAll, bool resolveChildren ) : string
paths IEnumerable
resolveAll bool
resolveChildren bool
return string

GetChildrenIdentfiers() protected method

protected GetChildrenIdentfiers ( int nodeId ) : IEnumerable
nodeId int
return IEnumerable

GetContentListTypesInTree() protected method

protected GetContentListTypesInTree ( string path ) : List
path string
return List

GetIdsOfNodesThatDoNotHaveIndexDocument() protected method

protected GetIdsOfNodesThatDoNotHaveIndexDocument ( ) : IEnumerable
return IEnumerable

GetIndexDocumentDataFromReader() protected method

protected GetIndexDocumentDataFromReader ( System reader ) : IndexDocumentData
reader System
return IndexDocumentData

GetLastActivityId() public method

public GetLastActivityId ( ) : int
return int

GetLastIndexBackupNumber() protected method

protected GetLastIndexBackupNumber ( ) : System.Guid
return System.Guid

GetNameOfLastNodeWithNameBase() public method

public GetNameOfLastNodeWithNameBase ( int parentId, string namebase, string extension ) : string
parentId int
namebase string
extension string
return string

GetNodeVersions() protected method

protected GetNodeVersions ( int nodeId ) : NodeHead.NodeVersion[]
nodeId int
return NodeHead.NodeVersion[]

GetPropertyMappingInternal() protected method

protected GetPropertyMappingInternal ( PropertyType propType ) : PropertyMapping
propType SenseNet.ContentRepository.Storage.Schema.PropertyType
return PropertyMapping

GetScriptsForDatabaseBackup() public method

public GetScriptsForDatabaseBackup ( ) : IEnumerable
return IEnumerable

GetTimestampDataForOneNodeIntegrityCheck() public method

public GetTimestampDataForOneNodeIntegrityCheck ( string path ) : IDataProcedure
path string
return IDataProcedure

GetTimestampDataForRecursiveIntegrityCheck() public method

public GetTimestampDataForRecursiveIntegrityCheck ( string path ) : IDataProcedure
path string
return IDataProcedure

GetTreeSize() protected method

protected GetTreeSize ( string path, bool includeChildren ) : long
path string
includeChildren bool
return long

GetUserIdByUploadGuid() protected method

protected GetUserIdByUploadGuid ( System.Guid uploadGuid ) : int
uploadGuid System.Guid
return int

GetVersionNumbers() protected method

protected GetVersionNumbers ( int nodeId ) : VersionNumber[]
nodeId int
return VersionNumber[]

GetVersionNumbers() protected method

protected GetVersionNumbers ( string path ) : VersionNumber[]
path string
return VersionNumber[]

HasChild() protected method

protected HasChild ( int nodeId ) : bool
nodeId int
return bool

InitializeStagingBinaryData() protected method

protected InitializeStagingBinaryData ( int versionId, int propertyTypeId, string fileName, long fileSize ) : int
versionId int
propertyTypeId int
fileName string
fileSize long
return int

InstanceCount() protected method

protected InstanceCount ( int nodeTypeIds ) : int
nodeTypeIds int
return int

IsCacheableText() protected method

protected IsCacheableText ( string text ) : bool
text string
return bool

KeepOnlyLastIndexBackup() protected method

protected KeepOnlyLastIndexBackup ( ) : void
return void

LoadBinaryCacheEntity() protected method

protected LoadBinaryCacheEntity ( int nodeVersionId, int propertyTypeId ) : BinaryCacheEntity
nodeVersionId int
propertyTypeId int
return BinaryCacheEntity

LoadBinaryFragment() protected method

protected LoadBinaryFragment ( int binaryPropertyId, long position, int count ) : byte[]
binaryPropertyId int
position long
count int
return byte[]

LoadBinaryPropertyValue() protected method

protected LoadBinaryPropertyValue ( int versionId, int propertyTypeId ) : Stream
versionId int
propertyTypeId int
return Stream

LoadChildTypesToAllow() protected method

protected LoadChildTypesToAllow ( int sourceNodeId ) : IEnumerable
sourceNodeId int
return IEnumerable

LoadGroupMembership() protected method

protected LoadGroupMembership ( int groupId ) : List
groupId int
return List

LoadIndexDocumentByVersionId() protected method

protected LoadIndexDocumentByVersionId ( IEnumerable versionId ) : IEnumerable
versionId IEnumerable
return IEnumerable

LoadIndexDocumentByVersionId() protected method

protected LoadIndexDocumentByVersionId ( int versionId ) : IndexDocumentData
versionId int
return IndexDocumentData

LoadLastBackup() protected method

protected LoadLastBackup ( ) : IndexBackup
return IndexBackup

LoadMemberships() protected method

protected LoadMemberships ( ) : List>.Dictionary
return List>.Dictionary

LoadNodeHead() protected method

protected LoadNodeHead ( int nodeId ) : NodeHead
nodeId int
return NodeHead

LoadNodeHead() protected method

protected LoadNodeHead ( string path ) : NodeHead
path string
return NodeHead

LoadNodeHeadByVersionId() protected method

protected LoadNodeHeadByVersionId ( int versionId ) : NodeHead
versionId int
return NodeHead

LoadNodeHeads() protected method

protected LoadNodeHeads ( IEnumerable heads ) : IEnumerable
heads IEnumerable
return IEnumerable

LoadNodes() protected method

protected LoadNodes ( NodeBuilder>.Dictionary buildersByVersionId ) : void
buildersByVersionId NodeBuilder>.Dictionary
return void

LoadSchema() protected method

protected LoadSchema ( ) : DataSet
return System.Data.DataSet

LoadTextPropertyValue() protected method

protected LoadTextPropertyValue ( int versionId, int propertyTypeId ) : string
versionId int
propertyTypeId int
return string

MoveNodeTree() protected method

protected MoveNodeTree ( int sourceNodeId, int targetNodeId ) : DataOperationResult
sourceNodeId int
targetNodeId int
return DataOperationResult

NodeCount() protected method

protected NodeCount ( string path ) : int
path string
return int

NodeExistsInDatabase() protected method

protected NodeExistsInDatabase ( string path ) : bool
path string
return bool

PersistUploadToken() protected method

protected PersistUploadToken ( UploadToken value ) : void
value SenseNet.ContentRepository.Storage.ApplicationMessaging.UploadToken
return void

QueryNodesByPath() protected method

protected QueryNodesByPath ( string pathStart, bool orderByPath ) : IEnumerable
pathStart string
orderByPath bool
return IEnumerable

QueryNodesByReferenceAndType() protected method

protected QueryNodesByReferenceAndType ( string referenceName, int referredNodeId, int allowedTypeIds ) : IEnumerable
referenceName string
referredNodeId int
allowedTypeIds int
return IEnumerable

QueryNodesByType() protected method

protected QueryNodesByType ( int nodeTypeIds ) : IEnumerable
nodeTypeIds int
return IEnumerable

QueryNodesByTypeAndPath() protected method

protected QueryNodesByTypeAndPath ( int nodeTypeIds, string pathStart, bool orderByPath ) : IEnumerable
nodeTypeIds int
pathStart string
orderByPath bool
return IEnumerable

QueryNodesByTypeAndPathAndName() protected method

protected QueryNodesByTypeAndPathAndName ( int nodeTypeIds, string pathStart, bool orderByPath, string name ) : IEnumerable
nodeTypeIds int
pathStart string
orderByPath bool
name string
return IEnumerable

QueryNodesByTypeAndPathAndProperty() protected method

protected QueryNodesByTypeAndPathAndProperty ( int nodeTypeIds, string pathStart, bool orderByPath, List properties ) : IEnumerable
nodeTypeIds int
pathStart string
orderByPath bool
properties List
return IEnumerable

RecoverIndexBackup() protected method

protected RecoverIndexBackup ( string backupFilePath ) : IndexBackup
backupFilePath string
return IndexBackup

RemoveBreakInheritance() protected method

protected RemoveBreakInheritance ( int nodeId ) : void
nodeId int
return void

Reset() protected method

protected Reset ( ) : void
return void

SaveChunk() protected method

protected SaveChunk ( int stagingBinaryDataId, byte bytes, int offset ) : void
stagingBinaryDataId int
bytes byte
offset int
return void

SecureSqlStringValue() public static method

SQL injection prevention.
public static SecureSqlStringValue ( string value ) : string
value string String value that will changed to.
return string

SetActiveBackup() protected method

protected SetActiveBackup ( IndexBackup backup, IndexBackup lastBackup ) : void
backup IndexBackup
lastBackup IndexBackup
return void

SetPermission() protected method

protected SetPermission ( SecurityEntry entry ) : void
entry SenseNet.ContentRepository.Storage.Security.SecurityEntry
return void

SetPermission() protected method

protected SetPermission ( int principalId, int nodeId, PermissionType permissionType, bool isInheritable, PermissionValue permissionValue ) : void
principalId int
nodeId int
permissionType SenseNet.ContentRepository.Storage.Schema.PermissionType
isInheritable bool
permissionValue PermissionValue
return void

SqlProvider() public method

public SqlProvider ( ) : System
return System

StoreBackupStream() protected method

protected StoreBackupStream ( string backupFilePath, IndexBackup backup, IndexBackupProgress progress ) : void
backupFilePath string
backup IndexBackup
progress IndexBackupProgress
return void

UpdateIndexDocument() protected method

protected UpdateIndexDocument ( NodeData nodeData, byte indexDocumentBytes ) : void
nodeData NodeData
indexDocumentBytes byte
return void

VersionCount() protected method

protected VersionCount ( string path ) : int
path string
return int