Class TableSelectStatement
Represents a chaining table select statement.
Inheritance
Namespace: MySqlX.XDevAPI.Relational
Assembly: MySql.Data.dll
Version: 9.2.0
Syntax
public class TableSelectStatement : FilterableStatement<TableSelectStatement, Table, RowResult, string>
Methods
Execute()
Executes the select statement.
Declaration
public override RowResult Execute()
Returns
Overrides
GroupBy(String[])
Sets the table aggregation.
Declaration
public TableSelectStatement GroupBy(params string[] groupBy)
Parameters
Type | Name | Description |
---|---|---|
System. |
groupBy | The column list for aggregation. |
Returns
Type | Description |
---|---|
Table |
This same Table |
Having(String)
Filters criteria for aggregated groups.
Declaration
public TableSelectStatement Having(string having)
Parameters
Type | Name | Description |
---|---|---|
System. |
having | The filter criteria for aggregated groups. |
Returns
Type | Description |
---|---|
Table |
This same Table |
LockExclusive(LockContention)
Locks matching rows so no other transaction can read or write to it.
Declaration
public TableSelectStatement LockExclusive(LockContention lockOption = LockContention.Default)
Parameters
Type | Name | Description |
---|---|---|
Lock |
lockOption | Optional row lock option to use. |
Returns
Type | Description |
---|---|
Table |
This same Table |
Exceptions
Type | Condition |
---|---|
My |
The server version is lower than 8.0.3. |
LockShared(LockContention)
Locks matching rows against updates.
Declaration
public TableSelectStatement LockShared(LockContention lockOption = LockContention.Default)
Parameters
Type | Name | Description |
---|---|---|
Lock |
lockOption | Optional row lock option to use. |
Returns
Type | Description |
---|---|
Table |
This same Table |
Exceptions
Type | Condition |
---|---|
My |
The server version is lower than 8.0.3. |
OrderBy(String[])
Sets user-defined sorting criteria for the operation. The strings use normal SQL syntax like "order ASC" or "pages DESC, age ASC".
Declaration
public TableSelectStatement OrderBy(params string[] order)
Parameters
Type | Name | Description |
---|---|---|
System. |
order | The order criteria. |
Returns
Type | Description |
---|---|
Table |
A generic object that represents the implementing statement type. |