Show / Hide Table of Contents

Interface ISqlGenerator

SQL生成器接口

Namespace: DapperDal.Sql
Assembly: DapperDal.dll
Syntax
public interface ISqlGenerator

Properties

| Improve this Doc View Source

Configuration

数据访问配置类实例

Declaration
IDalConfiguration Configuration { get; }
Property Value
Type Description
IDalConfiguration

Methods

| Improve this Doc View Source

Count(IClassMapper, IPredicate, IDictionary<String, Object>)

生成条数获取语句

Declaration
string Count(IClassMapper classMap, IPredicate predicate, IDictionary<string, object> parameters)
Parameters
Type Name Description
IClassMapper classMap

实体类型映射

IPredicate predicate

查询条件谓词

IDictionary<System.String, System.Object> parameters

查询参数

Returns
Type Description
System.String

条数获取语句

| Improve this Doc View Source

Delete(IClassMapper, IPredicate, IDictionary<String, Object>)

生成删除语句

Declaration
string Delete(IClassMapper classMap, IPredicate predicate, IDictionary<string, object> parameters)
Parameters
Type Name Description
IClassMapper classMap

实体类型映射

IPredicate predicate

删除条件谓词

IDictionary<System.String, System.Object> parameters

删除参数

Returns
Type Description
System.String

删除语句

| Improve this Doc View Source

GetColumnName(IClassMapper, IPropertyMap, Boolean)

生成字段名

Declaration
string GetColumnName(IClassMapper map, IPropertyMap property, bool includeAlias)
Parameters
Type Name Description
IClassMapper map

实体类型映射

IPropertyMap property

属性映射

System.Boolean includeAlias

是否包含别名

Returns
Type Description
System.String

字段名

| Improve this Doc View Source

GetColumnName(IClassMapper, String, Boolean)

生成字段名

Declaration
string GetColumnName(IClassMapper map, string propertyName, bool includeAlias)
Parameters
Type Name Description
IClassMapper map

实体类型映射

System.String propertyName

属性名

System.Boolean includeAlias

是否包含别名

Returns
Type Description
System.String

字段名

| Improve this Doc View Source

GetTableName(IClassMapper)

生成表名

Declaration
string GetTableName(IClassMapper map)
Parameters
Type Name Description
IClassMapper map

实体类型映射

Returns
Type Description
System.String
| Improve this Doc View Source

IdentitySql(IClassMapper)

生成包含主键条件的获取语句

Declaration
string IdentitySql(IClassMapper classMap)
Parameters
Type Name Description
IClassMapper classMap

实体类型映射

Returns
Type Description
System.String

包含主键条件的获取语句

| Improve this Doc View Source

Insert(IClassMapper)

生成插入语句

Declaration
string Insert(IClassMapper classMap)
Parameters
Type Name Description
IClassMapper classMap

实体类型映射

Returns
Type Description
System.String

条数获取语句

| Improve this Doc View Source

Select(IClassMapper, IPredicate, IList<ISort>, IDictionary<String, Object>, Int32)

生成获取语句

Declaration
string Select(IClassMapper classMap, IPredicate predicate, IList<ISort> sort, IDictionary<string, object> parameters, int limit = 0)
Parameters
Type Name Description
IClassMapper classMap

实体类型映射

IPredicate predicate

查询条件谓词

IList<ISort> sort

排序条件

IDictionary<System.String, System.Object> parameters

查询参数

System.Int32 limit

前几条

Returns
Type Description
System.String

生成获取语句

| Improve this Doc View Source

SelectPaged(IClassMapper, IPredicate, IList<ISort>, Int32, Int32, IDictionary<String, Object>)

生成分页获取语句

Declaration
string SelectPaged(IClassMapper classMap, IPredicate predicate, IList<ISort> sort, int page, int resultsPerPage, IDictionary<string, object> parameters)
Parameters
Type Name Description
IClassMapper classMap

实体类型映射

IPredicate predicate

查询条件谓词

IList<ISort> sort

排序条件

System.Int32 page

页索引

System.Int32 resultsPerPage

每页条数

IDictionary<System.String, System.Object> parameters

查询参数

Returns
Type Description
System.String

分页获取语句

| Improve this Doc View Source

SelectSet(IClassMapper, IPredicate, IList<ISort>, Int32, Int32, IDictionary<String, Object>)

生成区间获取语句

Declaration
string SelectSet(IClassMapper classMap, IPredicate predicate, IList<ISort> sort, int firstResult, int maxResults, IDictionary<string, object> parameters)
Parameters
Type Name Description
IClassMapper classMap

实体类型映射

IPredicate predicate

查询条件谓词

IList<ISort> sort

排序条件

System.Int32 firstResult

起始行数

System.Int32 maxResults

最大条数

IDictionary<System.String, System.Object> parameters

查询参数

Returns
Type Description
System.String

区间获取语句

| Improve this Doc View Source

SupportsMultipleStatements()

是否支持多语句执行

Declaration
bool SupportsMultipleStatements()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Update(IClassMapper, IPredicate, IDictionary<String, Object>, IList<String>)

生成更新语句

Declaration
string Update(IClassMapper classMap, IPredicate predicate, IDictionary<string, object> parameters, IList<string> props = null)
Parameters
Type Name Description
IClassMapper classMap

实体类型映射

IPredicate predicate

更新条件谓词

IDictionary<System.String, System.Object> parameters

更新参数

IList<System.String> props

更新属性列表

Returns
Type Description
System.String

更新语句

Extension Methods

SortingExtensions.ToSortable(Object)
  • Improve this Doc
  • View Source
Back to top Copyright © 2015-2017 Microsoft
Generated by DocFX