Class Table
Represents a server Table or View.
Namespace: MySqlX.XDevAPI.Relational
Assembly: MySql.Data.dll
Version: 9.1.0
Syntax
public class Table : DatabaseObject
Properties
IsView
Gets a value indicating whether the object is a View (True) or a Table (False).
Declaration
public bool IsView { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Count()
Returns the number of rows in the table on the server.
Declaration
public long Count()
Returns
Type | Description |
---|---|
System.Int64 | The number of rows. |
Delete()
Creates a TableDeleteStatement. This method is intended to delete rows from a table.
Declaration
public TableDeleteStatement Delete()
Returns
Type | Description |
---|---|
TableDeleteStatement | A TableDeleteStatement object for delete chain operations. |
ExistsInDatabase()
Verifies if the table exists in the database.
Declaration
public override bool ExistsInDatabase()
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Insert(String[])
Creates a TableInsertStatement set with the fileds to insert to. The table insert statement can be further modified before exeuction. This method is intended to insert one or multiple rows into a table.
Declaration
public TableInsertStatement Insert(params string[] fields)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | fields | The list of fields to insert. |
Returns
Type | Description |
---|---|
TableInsertStatement | A TableInsertStatement object for insert chain operations. |
Select(String[])
Creates a TableSelectStatement set with the columns to select. The table select statement can be further modified before execution. This method is intended to select a set of table rows.
Declaration
public TableSelectStatement Select(params string[] columns)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | columns | The optional column names to select. |
Returns
Type | Description |
---|---|
TableSelectStatement | A TableSelectStatement object for select chain operations. |
Update()
Creates a TableUpdateStatement. This method is intended to update table rows values.
Declaration
public TableUpdateStatement Update()
Returns
Type | Description |
---|---|
TableUpdateStatement | A TableUpdateStatement object for update chain operations. |