SqlHelper Class

Namespace:
Weavy.Core.Repos
Assembly:
Weavy.Core.dll

Various helper methods for database access.

public static class SqlHelper
Inheritance:
System.Object → SqlHelper

Properties

ConnectionString Gets the connection string to the database.
Error Gets the database error message, null if no errors were detected during initialization.
Status Gets the database status.

Methods

ForSelect(String) Rewrites a list of columns so that the can be used in the SELECT clause of a common table expression (CTE).
ForWith(String) Rewrites a list of columns so that the can be used in the WITH clause of a common table expression (CTE).
GenerateComb() Generate a new System.Guid using a strategy suggested by Jimmy Nilsson on http://www.informit.com/articles/article.asp?p=25862. The comb algorithm is designed to make the use of GUIDs as Primary Keys, Foreign Keys, and Indexes nearly as efficient as ints.
GetConnection() Gets an open connection.
GetConnectionAsync() Gets an open connection.
GetOrderByForContent(SortBy) Gets sql for ordering by the specified sort property.
GetSize() Gets the size, in bytes, of the database.
GetTimestamp(NullableType>) Gets the value of the current timestamp from the database.
Initialize() Initializes the database.
Single(IDbConnection, String, Object)
Single(IDbConnection, String, Func, Object, String)
Single(IDbConnection, String, Func, Object, String)
Single(IDbConnection, String, Func, Object, String)
Single(IDbConnection, String, Func, Object, String)
TableName(EntityType) Gets the table name where the reference should be stored.
TableName(IEntity) Gets the table name where the reference should be stored.
Upgrade(TextWriter) Update the repository to the latest version.