StrictQueryServices 类
- 程序集
- ShadowSql.dll
按列查询服务
public static class StrictQueryServices
- 继承
-
objectStrictQueryServices
方法
StrictBetweenValue<TQuery, TValue>(TQuery, string, TValue, TValue)
列在两值之前
public static TQuery StrictBetweenValue<TQuery, TValue>(this TQuery query, string columnName, TValue begin, TValue end) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
begin
TValue范围开始
end
TValue范围结束
返回
- TQuery
类型参数
TQuery
TValue
示例
[Id] BETWEEN 11 AND 19
var q = new TableSqlQuery("Users")
.StrictBetween("Id", 11, 19);
异常
StrictBetween<TQuery>(TQuery, string, string, string)
列在两参数之前
public static TQuery StrictBetween<TQuery>(this TQuery query, string columnName, string begin = "", string end = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Id] BETWEEN @IdBegin AND @IdEnd
var q = new TableSqlQuery("Users")
.StrictBetween("Id", "IdBegin", "IdEnd");
异常
StrictEqualValue<TQuery, TValue>(TQuery, string, TValue)
列等于值
public static TQuery StrictEqualValue<TQuery, TValue>(this TQuery query, string columnName, TValue value) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
value
TValue值
返回
- TQuery
类型参数
TQuery
TValue
示例
[Id]=100
var q = new TableSqlQuery("Users")
.StrictEqualValue("Id", 100);
异常
StrictEqual<TQuery>(TQuery, string, string)
列等于参数
public static TQuery StrictEqual<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Id]=@ParentId
var q = new TableSqlQuery("Users")
.StrictEqual("Id", "ParentId");
异常
StrictGreaterEqualValue<TQuery, TValue>(TQuery, string, TValue)
列大于值
public static TQuery StrictGreaterEqualValue<TQuery, TValue>(this TQuery query, string columnName, TValue value) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
value
TValue值
返回
- TQuery
类型参数
TQuery
TValue
示例
[Score]>=60
var q = new TableSqlQuery("Users")
.StrictGreaterOrValue("Score", 60);
异常
StrictGreaterEqual<TQuery>(TQuery, string, string)
列大于等于参数
public static TQuery StrictGreaterEqual<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Score]>=@AvgScore
var q = new TableSqlQuery("Users")
.StrictGreaterOrEqual("Score", "AvgScore");
异常
StrictGreaterValue<TQuery, TValue>(TQuery, string, TValue)
列大于值
public static TQuery StrictGreaterValue<TQuery, TValue>(this TQuery query, string columnName, TValue value) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
value
TValue值
返回
- TQuery
类型参数
TQuery
TValue
示例
[Score]>60
var q = new TableSqlQuery("Users")
.StrictGreaterValue("Score", 60);
异常
StrictGreater<TQuery>(TQuery, string, string)
列大于参数
public static TQuery StrictGreater<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Score]>@AvgScore
var q = new TableSqlQuery("Users")
.StrictGreater("Score", "AvgScore");
异常
StrictInValue<TQuery, TValue>(TQuery, string, params IEnumerable<TValue>)
列包含于值列表
public static TQuery StrictInValue<TQuery, TValue>(this TQuery query, string columnName, params IEnumerable<TValue> values) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
values
IEnumerable<TValue>值
返回
- TQuery
类型参数
TQuery
TValue
示例
[Id] IN (1,3,5)
var q = new TableSqlQuery("Users")
.StrictInValue("Id", 1, 3, 5);
异常
StrictIn<TQuery>(TQuery, string, string)
列包含于参数
public static TQuery StrictIn<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Id] IN @Ids
var q = new TableSqlQuery("Users")
.StrictIn("Id", "Ids");
异常
StrictIsNull<TQuery>(TQuery, string)
列是null
public static TQuery StrictIsNull<TQuery>(this TQuery query, string columnName) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
返回
- TQuery
类型参数
TQuery
示例
[Score] IS NULL
var q = new TableSqlQuery("Users")
.StrictIsNull("Score");
异常
StrictLessEqualValue<TQuery, TValue>(TQuery, string, TValue)
列小于等于值
public static TQuery StrictLessEqualValue<TQuery, TValue>(this TQuery query, string columnName, TValue value) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
value
TValue值
返回
- TQuery
类型参数
TQuery
TValue
示例
[Score]<=60
var q = new TableSqlQuery("Users")
.StrictLessOrEqualValue("Score", 60);
异常
StrictLessEqual<TQuery>(TQuery, string, string)
列小于等于参数
public static TQuery StrictLessEqual<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Score]<=@AvgScore
var q = new TableSqlQuery("Users")
.StrictLessOrEqual("Score", "AvgScore");
异常
StrictLessValue<TQuery, TValue>(TQuery, string, TValue)
列小于值
public static TQuery StrictLessValue<TQuery, TValue>(this TQuery query, string columnName, TValue value) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
value
TValue值
返回
- TQuery
类型参数
TQuery
TValue
示例
[Score]<60
var q = new TableSqlQuery("Users")
.StrictLessValue("Score", 60);
异常
StrictLess<TQuery>(TQuery, string, string)
列小于参数
public static TQuery StrictLess<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Score]<@AvgScore
var q = new TableSqlQuery("Users")
.StrictLess("Score", "AvgScore");
异常
StrictLikeValue<TQuery>(TQuery, string, string)
列匹配值模式
public static TQuery StrictLikeValue<TQuery>(this TQuery query, string columnName, string value) where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Name] LIKE '张%'
var q = new TableSqlQuery("Users")
.StrictLikeValue("Name", "张%");
异常
StrictLike<TQuery>(TQuery, string, string)
列匹配参数模式
public static TQuery StrictLike<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Title] LIKE @KeyWord
var q = new TableSqlQuery("Users")
.StrictLike("Title", "KeyWord");
异常
StrictNotBetweenValue<TQuery, TValue>(TQuery, string, TValue, TValue)
列不在两值之前
public static TQuery StrictNotBetweenValue<TQuery, TValue>(this TQuery query, string columnName, TValue begin, TValue end) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
begin
TValue范围开始
end
TValue范围结束
返回
- TQuery
类型参数
TQuery
TValue
示例
[Id] NOT BETWEEN 11 AND 19
var q = new TableSqlQuery("Users")
.StrictNotBetweenValue("Id", 11, 19);
异常
StrictNotBetween<TQuery>(TQuery, string, string, string)
列不在两参数之前
public static TQuery StrictNotBetween<TQuery>(this TQuery query, string columnName, string begin = "", string end = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Id] NOT BETWEEN @IdBegin AND @IdEnd
var q = new TableSqlQuery("Users")
.StrictNotBetween("Id", "IdBegin", "IdEnd");
异常
StrictNotEqualValue<TQuery, TValue>(TQuery, string, TValue)
列不等于值
public static TQuery StrictNotEqualValue<TQuery, TValue>(this TQuery query, string columnName, TValue value) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
value
TValue值
返回
- TQuery
类型参数
TQuery
TValue
示例
[Status]<>0
var q = new TableSqlQuery("Users")
.StrictNotEqualValue("Status", false);
异常
StrictNotEqual<TQuery>(TQuery, string, string)
列不等于参数
public static TQuery StrictNotEqual<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Status]<>@FailStatus
var q = new TableSqlQuery("Users")
.StrictNotEqual("Status", "FailStatus");
异常
StrictNotInValue<TQuery, TValue>(TQuery, string, params IEnumerable<TValue>)
列不包含于值列表
public static TQuery StrictNotInValue<TQuery, TValue>(this TQuery query, string columnName, params IEnumerable<TValue> values) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
values
IEnumerable<TValue>值
返回
- TQuery
类型参数
TQuery
TValue
示例
[Id] NOT IN (1,3,5)
var q = new TableSqlQuery("Users")
.StrictNotInValue("Id", 1, 3, 5);
异常
StrictNotIn<TQuery>(TQuery, string, string)
列不包含于参数
public static TQuery StrictNotIn<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Id] NOT IN @Ids
var q = new TableSqlQuery("Users")
.StrictNotIn("Id", "Ids");
异常
StrictNotLikeValue<TQuery>(TQuery, string, string)
列不匹配值模式
public static TQuery StrictNotLikeValue<TQuery>(this TQuery query, string columnName, string value) where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Name] NOT LIKE '张%'
var q = new TableSqlQuery("Users")
.StrictNotLikeValue("Name", "张%");
异常
StrictNotLike<TQuery>(TQuery, string, string)
列不匹配参数模式
public static TQuery StrictNotLike<TQuery>(this TQuery query, string columnName, string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Title] NOT LIKE @KeyWord
var q = new TableSqlQuery("Users")
.StrictNotLike("Title", "KeyWord");
异常
StrictNotNull<TQuery>(TQuery, string)
列不是null
public static TQuery StrictNotNull<TQuery>(this TQuery query, string columnName) where TQuery : IDataSqlQuery
参数
query
TQuery查询
columnName
string列名
返回
- TQuery
类型参数
TQuery
示例
[Score] IS NOT NULL
var q = new TableSqlQuery("Users")
.StrictNotNull("Score");
异常
StrictParameter<TQuery>(TQuery, string, string, string)
对列进行参数化查询
public static TQuery StrictParameter<TQuery>(this TQuery query, string columnName, string op = "=", string parameter = "") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
示例
[Id]=@LastId
var q = new TableSqlQuery("Users")
.StrictParameter("Id", "=" , "LastId");
异常
StrictValue<TQuery, TValue>(TQuery, string, TValue, string)
对列按值查询
public static TQuery StrictValue<TQuery, TValue>(this TQuery query, string columnName, TValue value, string op = "=") where TQuery : IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
示例
[Id]>100
var q = new TableSqlQuery("Users")
.StrictValue("Id", 100, ">");
异常
TableStrictBetweenValue<TQuery, TValue>(TQuery, string, string, TValue, TValue)
列在两值之前
public static TQuery TableStrictBetweenValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue begin, TValue end) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictBetween<TQuery>(TQuery, string, string, string, string)
列在两参数之前
public static TQuery TableStrictBetween<TQuery>(this TQuery query, string tableName, string columnName, string begin = "", string end = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictEqualValue<TQuery, TValue>(TQuery, string, string, TValue)
列等于值
public static TQuery TableStrictEqualValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue value) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictEqual<TQuery>(TQuery, string, string, string)
列等于参数
public static TQuery TableStrictEqual<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictGreaterEqualValue<TQuery, TValue>(TQuery, string, string, TValue)
列大于值
public static TQuery TableStrictGreaterEqualValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue value) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictGreaterEqual<TQuery>(TQuery, string, string, string)
列大于等于参数
public static TQuery TableStrictGreaterEqual<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictGreaterValue<TQuery, TValue>(TQuery, string, string, TValue)
列大于值
public static TQuery TableStrictGreaterValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue value) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictGreater<TQuery>(TQuery, string, string, string)
列大于参数
public static TQuery TableStrictGreater<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictInValue<TQuery, TValue>(TQuery, string, string, params IEnumerable<TValue>)
列包含于值列表
public static TQuery TableStrictInValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, params IEnumerable<TValue> values) where TQuery : MultiTableBase, IDataSqlQuery
参数
query
TQuery查询
tableName
string表名
columnName
string列名
values
IEnumerable<TValue>值
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictIn<TQuery>(TQuery, string, string, string)
列包含于参数
public static TQuery TableStrictIn<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictIsNull<TQuery>(TQuery, string, string)
列是null
public static TQuery TableStrictIsNull<TQuery>(this TQuery query, string tableName, string columnName) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictLessEqualValue<TQuery, TValue>(TQuery, string, string, TValue)
列小于等于值
public static TQuery TableStrictLessEqualValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue value) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictLessEqual<TQuery>(TQuery, string, string, string)
列小于等于参数
public static TQuery TableStrictLessEqual<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictLessValue<TQuery, TValue>(TQuery, string, string, TValue)
列小于值
public static TQuery TableStrictLessValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue value) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictLess<TQuery>(TQuery, string, string, string)
列小于参数
public static TQuery TableStrictLess<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictLikeValue<TQuery>(TQuery, string, string, string)
列匹配值模式
public static TQuery TableStrictLikeValue<TQuery>(this TQuery query, string tableName, string columnName, string value) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictLike<TQuery>(TQuery, string, string, string)
列匹配参数模式
public static TQuery TableStrictLike<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictNotBetweenValue<TQuery, TValue>(TQuery, string, string, TValue, TValue)
列不在两值之前
public static TQuery TableStrictNotBetweenValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue begin, TValue end) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictNotBetween<TQuery>(TQuery, string, string, string, string)
列不在两参数之前
public static TQuery TableStrictNotBetween<TQuery>(this TQuery query, string tableName, string columnName, string begin = "", string end = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictNotEqualValue<TQuery, TValue>(TQuery, string, string, TValue)
列不等于值
public static TQuery TableStrictNotEqualValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue value) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictNotEqual<TQuery>(TQuery, string, string, string)
列不等于参数
public static TQuery TableStrictNotEqual<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictNotInValue<TQuery, TValue>(TQuery, string, string, params IEnumerable<TValue>)
列不包含于值列表
public static TQuery TableStrictNotInValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, params IEnumerable<TValue> values) where TQuery : MultiTableBase, IDataSqlQuery
参数
query
TQuery查询
tableName
string表名
columnName
string列名
values
IEnumerable<TValue>值
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrictNotIn<TQuery>(TQuery, string, string, string)
列不包含于参数
public static TQuery TableStrictNotIn<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictNotLikeValue<TQuery>(TQuery, string, string, string)
列不匹配值模式
public static TQuery TableStrictNotLikeValue<TQuery>(this TQuery query, string tableName, string columnName, string value) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictNotLike<TQuery>(TQuery, string, string, string)
列不匹配参数模式
public static TQuery TableStrictNotLike<TQuery>(this TQuery query, string tableName, string columnName, string parameter = "") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictNotNull<TQuery>(TQuery, string, string)
列不是null
public static TQuery TableStrictNotNull<TQuery>(this TQuery query, string tableName, string columnName) where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictParameter<TQuery>(TQuery, string, string, string, string)
对列进行参数化查询
public static TQuery TableStrictParameter<TQuery>(this TQuery query, string tableName, string columnName, string op = "=", string parameter = "") where TQuery : IMultiView, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
异常
TableStrictValue<TQuery, TValue>(TQuery, string, string, TValue, string)
对列按值查询
public static TQuery TableStrictValue<TQuery, TValue>(this TQuery query, string tableName, string columnName, TValue value, string op = "=") where TQuery : MultiTableBase, IDataSqlQuery
参数
返回
- TQuery
类型参数
TQuery
TValue
异常
TableStrict<Query>(Query, string, string, Func<IField, AtomicLogic>)
按列查询
public static Query TableStrict<Query>(this Query query, string tableName, string columnName, Func<IField, AtomicLogic> logic) where Query : MultiTableBase, IDataSqlQuery
参数
query
Query查询
tableName
string表名
columnName
string列名
logic
Func<IField, AtomicLogic>查询逻辑
返回
- Query
类型参数
Query