Interface IDatabaseSchemaCache
Interface for classes which loads and caches database schema.
Namespace: Kros.Data.Schema
Assembly: Kros.Utils.dll
Syntax
public interface IDatabaseSchemaCache
Remarks
Loading of a database schema can take some time, so it is good to cache loaded schemas for later use.
Methods
ClearAllSchemas()
Clears the whole cache (removes all cached schemas).
Declaration
void ClearAllSchemas()
ClearSchema(Object)
Removes cached schema loaded for connection
.
Declaration
void ClearSchema(object connection)
Parameters
Type | Name | Description |
---|---|---|
System.Object | connection | Database connection. |
GetSchema(Object)
Returns database schema connection
.
Declaration
DatabaseSchema GetSchema(object connection)
Parameters
Type | Name | Description |
---|---|---|
System.Object | connection | database connection. |
Returns
Type | Description |
---|---|
DatabaseSchema | Loaded database schema. |
RefreshSchema(Object)
Loads database schema for connection
. The schema is loaded directly from database even when
it is already cached. New loaded schema is cached.
Declaration
DatabaseSchema RefreshSchema(object connection)
Parameters
Type | Name | Description |
---|---|---|
System.Object | connection | Database connection. |
Returns
Type | Description |
---|---|
DatabaseSchema | Loaded database schema. |