CommonProviderCheckExpressions
Namespace: MJCZone.DapperMatic.Models
Assembly: MJCZone.DapperMatic
Summary
Provides common provider-specific check expressions for database columns. These functions generate appropriate check constraint expressions based on the database provider type.
static public
Contents
Methods (8)
Methods
| Method | Summary |
|---|---|
| LengthGreaterThanCheck | Creates a check expression for string length greater than specified value. SQL Server uses LEN(), ot... |
| LengthGreaterThanOrEqualCheck | Creates a check expression for string length greater than or equal to specified value. SQL Server us... |
| LengthLessThanCheck | Creates a check expression for string length less than specified value. SQL Server uses LEN(), other... |
| LengthLessThanOrEqualCheck | Creates a check expression for string length less than or equal to specified value. SQL Server uses ... |
| GetType | |
| ToString | |
| Equals | |
| GetHashCode |
LengthGreaterThanCheck
Creates a check expression for string length greater than specified value. SQL Server uses LEN(), others use LENGTH().
Func<DbProviderType, string> LengthGreaterThanCheck(
string columnName,
int length)Parameters
- columnName (string) - The column name to check.
- length (int) - The minimum length (exclusive). Default is 0.
Returns
Type: Func<DbProviderType, string>
A function that generates provider-specific check expressions.
LengthGreaterThanOrEqualCheck
Creates a check expression for string length greater than or equal to specified value. SQL Server uses LEN(), others use LENGTH().
Func<DbProviderType, string> LengthGreaterThanOrEqualCheck(
string columnName,
int length)Parameters
- columnName (string) - The column name to check.
- length (int) - The minimum length (inclusive). Default is 0.
Returns
Type: Func<DbProviderType, string>
A function that generates provider-specific check expressions.
LengthLessThanCheck
Creates a check expression for string length less than specified value. SQL Server uses LEN(), others use LENGTH().
Func<DbProviderType, string> LengthLessThanCheck(string columnName, int length)Parameters
- columnName (string) - The column name to check.
- length (int) - The maximum length (exclusive).
Returns
Type: Func<DbProviderType, string>
A function that generates provider-specific check expressions.
LengthLessThanOrEqualCheck
Creates a check expression for string length less than or equal to specified value. SQL Server uses LEN(), others use LENGTH().
Func<DbProviderType, string> LengthLessThanOrEqualCheck(
string columnName,
int length)Parameters
- columnName (string) - The column name to check.
- length (int) - The maximum length (inclusive).
Returns
Type: Func<DbProviderType, string>
A function that generates provider-specific check expressions.
GetType
GetType()ToString
ToString()Equals
Equals()GetHashCode
GetHashCode()