New to Telerik ReportingStart a free 30-day trial

Definition

Namespace:Telerik.Reporting.Cache

Assembly:Telerik.Reporting.dll

Syntax:

C#
public class MsSqlServerStorage : IStorage2, IStorage

Inheritance: objectMsSqlServerStorage

Implements: IStorageIStorage2

Constructors

Initializes a new instance of the MsSqlServerStorage class.

C#
public MsSqlServerStorage(string connectionString, int commandTimeout)
Parameters:connectionStringstring

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

commandTimeoutint

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

Initializes a new instance of the MsSqlServerStorage class.

C#
public MsSqlServerStorage(string connectionString)
Parameters:connectionStringstring

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

Methods

Acquires a lock on a named resource.

C#
public IDisposable AcquireLock(string key)
Parameters:keystringReturns:

IDisposable

Implements: IStorage.AcquireLock(string)

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

C#
public IDisposable AcquireReadLock(string key)
Parameters:keystringReturns:

IDisposable

Implements: IStorage.AcquireReadLock(string)

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

C#
public void AddInSet(string key, string value)
Parameters:keystringvaluestring

Implements: IStorage.AddInSet(string, string)

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

C#
public void ClearAllData()
C#
public void CreateObjects(string ddl)
Parameters:ddlstring

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

C#
public void CreateSchema(bool createTables = true, bool createProcedures = true)
Parameters:createTablesboolcreateProceduresbool

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

C#
public void Delete(string key)
Parameters:keystring

Implements: IStorage.Delete(string)

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

C#
public bool DeleteInSet(string key, string value)
Parameters:keystringvaluestringReturns:

bool

Implements: IStorage.DeleteInSet(string, string)

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

C#
public void DeleteMasterKey(string key)
Parameters:keystring

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

Implements: IStorage2.DeleteMasterKey(string)

Deletes a set of values denoted by the given key.

C#
public void DeleteSet(string key)
Parameters:keystring

Implements: IStorage.DeleteSet(string)

C#
public void EnsureDatabaseExists(bool createSchema)
Parameters:createSchemabool

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

C#
public bool Exists(string key)
Parameters:keystringReturns:

bool

Implements: IStorage.Exists(string)

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

C#
public bool ExistsInSet(string key, string value)
Parameters:keystringvaluestringReturns:

bool

Implements: IStorage.ExistsInSet(string, string)

GetAllMembersInSet(string)

IEnumerable<string>

Retrieves all members in a set of string values.

C#
public IEnumerable<string> GetAllMembersInSet(string key)
Parameters:keystringReturns:

IEnumerable<string>

Implements: IStorage.GetAllMembersInSet(string)

Retrieves a byte array value stored under particular key.

C#
public byte[] GetBytes(string key)
Parameters:keystringReturns:

byte[]

Implements: IStorage.GetBytes(string)

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

C#
public long GetCountInSet(string key)
Parameters:keystringReturns:

long

Implements: IStorage.GetCountInSet(string)

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

C#
public IEnumerable<string> GetInstancesByKey(string keyPropertyId, byte[] keyValue)
Parameters:keyPropertyIdstring

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

keyValuebyte[]

The value for the Key property.

Returns:

IEnumerable<string>

Collection with the complete Id keys.

Retrieves a string value stored under particular key.

C#
public string GetString(string key)
Parameters:keystringReturns:

string

Implements: IStorage.GetString(string)

Stores a byte array value under particular key.

C#
public void SetBytes(string key, byte[] value)
Parameters:keystringvaluebyte[]

Implements: IStorage.SetBytes(string, byte[])

Stores a string value under particular key.

C#
public void SetString(string key, string value)
Parameters:keystringvaluestring

Implements: IStorage.SetString(string, string)