Class
MsSqlServerStorage

Definition

Namespace:Telerik.Reporting.Cache

Assembly:Telerik.Reporting.dll

Syntax:

cs-api-definition
public class MsSqlServerStorage : IStorage2, IStorage

Inheritance: objectMsSqlServerStorage

Implements: IStorageIStorage2

Constructors

MsSqlServerStorage(string)

Initializes a new instance of the MsSqlServerStorage class.

Declaration

cs-api-definition
public MsSqlServerStorage(string connectionString)

Parameters

connectionString

string

The connection string to the backend storage. Connection Strings in ADO.NET

MsSqlServerStorage(string, int)

Initializes a new instance of the MsSqlServerStorage class.

Declaration

cs-api-definition
public MsSqlServerStorage(string connectionString, int commandTimeout)

Parameters

connectionString

string

The connection string to the backend storage. Connection Strings in ADO.NET

commandTimeout

int

Determines the CommandTimeout that will be used when executing database commands, in seconds. The default value is 30. SqlCommand.CommandTimeout

Methods

AcquireLock(string)

Acquires a lock on a named resource.

Declaration

cs-api-definition
public IDisposable AcquireLock(string key)

Parameters

key

string

Returns

IDisposable

Implements IStorage.AcquireLock(string)

AcquireReadLock(string)

Acquires a lock on a named resource for reading. Uses Transaction with lower isolation level.

Declaration

cs-api-definition
public IDisposable AcquireReadLock(string key)

Parameters

key

string

Returns

IDisposable

Implements IStorage.AcquireReadLock(string)

AddInSet(string, string)

Adds a single string value to a set of values denoted from the given key.

Declaration

cs-api-definition
public void AddInSet(string key, string value)

Parameters

key

string

value

string

Implements IStorage.AddInSet(string, string)

ClearAllData()

Utility method. Clears all data from the storage data tables.

Declaration

cs-api-definition
public void ClearAllData()

CreateObjects(string)

Declaration

cs-api-definition
public void CreateObjects(string ddl)

Parameters

ddl

string

CreateSchema(bool, bool)

Utility method. Creates the data schema (tables and stored procedures) needed from the storage.

Declaration

cs-api-definition
public void CreateSchema(bool createTables = true, bool createProcedures = true)

Parameters

createTables

bool

createProcedures

bool

Delete(string)

Deletes a key with its value (string or byte array) from the storage.

Declaration

cs-api-definition
public void Delete(string key)

Parameters

key

string

Implements IStorage.Delete(string)

DeleteInSet(string, string)

Deletes a single string value from a set of values denoted from the given key.

Declaration

cs-api-definition
public bool DeleteInSet(string key, string value)

Parameters

key

string

value

string

Returns

bool

Implements IStorage.DeleteInSet(string, string)

DeleteMasterKey(string)

Deletes all keys starting with the key parameter along with their values (string or byte array) from the storage.

Declaration

cs-api-definition
public void DeleteMasterKey(string key)

Parameters

key

string

The key that denotes the stored values that should be removed.

Implements IStorage2.DeleteMasterKey(string)

DeleteSet(string)

Deletes a set of values denoted by the given key.

Declaration

cs-api-definition
public void DeleteSet(string key)

Parameters

key

string

Implements IStorage.DeleteSet(string)

EnsureDatabaseExists(bool)

Declaration

cs-api-definition
public void EnsureDatabaseExists(bool createSchema)

Parameters

createSchema

bool

Exists(string)

Retrieves a value indicating if a single value (string or byte array) exists in the storage.

Declaration

cs-api-definition
public bool Exists(string key)

Parameters

key

string

Returns

bool

Implements IStorage.Exists(string)

ExistsInSet(string, string)

Retrieves a value indicating if a set of values exists in the storage.

Declaration

cs-api-definition
public bool ExistsInSet(string key, string value)

Parameters

key

string

value

string

Returns

bool

Implements IStorage.ExistsInSet(string, string)

GetAllMembersInSet(string)

Retrieves all members in a set of string values.

Declaration

cs-api-definition
public IEnumerable<string> GetAllMembersInSet(string key)

Parameters

key

string

Returns

IEnumerable<string>

Implements IStorage.GetAllMembersInSet(string)

GetBytes(string)

Retrieves a byte array value stored under particular key.

Declaration

cs-api-definition
public byte[] GetBytes(string key)

Parameters

key

string

Returns

byte[]

Implements IStorage.GetBytes(string)

GetCountInSet(string)

Retrieves the count of the values in a set value stored in the storage.

Declaration

cs-api-definition
public long GetCountInSet(string key)

Parameters

key

string

Returns

long

Implements IStorage.GetCountInSet(string)

GetInstancesByKey(string, byte[])

Gets all the instances having the specified value for their Key property.

Declaration

cs-api-definition
public IEnumerable<string> GetInstancesByKey(string keyPropertyId, byte[] keyValue)

Parameters

keyPropertyId

string

The value for the Instance Id field, containing a wildcard or '%' (Like) operator.

keyValue

byte[]

The value for the Key property.

Returns

IEnumerable<string>

Collection with the complete Id keys.

GetString(string)

Retrieves a string value stored under particular key.

Declaration

cs-api-definition
public string GetString(string key)

Parameters

key

string

Returns

string

Implements IStorage.GetString(string)

SetBytes(string, byte[])

Stores a byte array value under particular key.

Declaration

cs-api-definition
public void SetBytes(string key, byte[] value)

Parameters

key

string

value

byte[]

Implements IStorage.SetBytes(string, byte[])

SetString(string, string)

Stores a string value under particular key.

Declaration

cs-api-definition
public void SetString(string key, string value)

Parameters

key

string

value

string

Implements IStorage.SetString(string, string)