Class Query
SQL query
Inherited Members
Namespace: XData.Database.Adapter
Assembly: XData.docfx.dll
Syntax
public sealed class Query : IEnumerable<QueryParam>, IEnumerable
Constructors
| Improve this Doc View SourceQuery(String, CommandType, QueryParam[])
Query constructor
Declaration
public Query(string sql, CommandType type = CommandType.Text, params QueryParam[] par)
Parameters
| Type | Name | Description |
|---|---|---|
| String | sql | Sql expression |
| CommandType | type | Command type |
| QueryParam[] | par | Parameters |
Properties
| Improve this Doc View SourceItem[Int32]
Query parameters by index
Declaration
public QueryParam this[int i] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | i | Parameter index |
Property Value
| Type | Description |
|---|---|
| QueryParam | Query parameter |
Item[String]
Query parameters by name
Declaration
public QueryParam this[string name] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | Parameter name |
Property Value
| Type | Description |
|---|---|
| QueryParam | Query parameter |
Sql
Query SQL expression
Declaration
public string Sql { get; }
Property Value
| Type | Description |
|---|---|
| String |
Type
Query command type
Declaration
public CommandType Type { get; }
Property Value
| Type | Description |
|---|---|
| CommandType |
Methods
| Improve this Doc View SourceGetEnumerator()
Query parameters enumeration
Declaration
public IEnumerator<QueryParam> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<QueryParam> | Query parameters enumeration |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String |
Overrides
Operators
| Improve this Doc View SourceImplicit(String to Query)
Query SQL expression
Declaration
public static implicit operator Query(string s)
Parameters
| Type | Name | Description |
|---|---|---|
| String | s | Sql expression |
Returns
| Type | Description |
|---|---|
| Query | Query |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Query parameters enumeration
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator | Query parameters enumeration |