Package com.mysql.cj.xdevapi
Interface Table
- All Superinterfaces:
DatabaseObject
- All Known Implementing Classes:
TableImpl
public interface Table extends DatabaseObject
A client-side representation of a database table. Provides access to the table through standard INSERT/SELECT/UPDATE/DELETE statements.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mysql.cj.xdevapi.DatabaseObject
DatabaseObject.DbObjectStatus, DatabaseObject.DbObjectType
-
Method Summary
Modifier and Type Method Description long
count()
Query the number of rows in this table.DeleteStatement
delete()
Create a new delete statement.InsertStatement
insert()
Create an insert statement using the list of all columns in the table.InsertStatement
insert(java.lang.String... projection)
Create an insert statement using the given list columns.InsertStatement
insert(java.util.Map<java.lang.String,java.lang.Object> fieldsAndValues)
Create an insert statement using the given key/value pairs.boolean
isView()
Check if the underlying object is a view or not.SelectStatement
select(java.lang.String... projections)
Create a new select statement using the given projections.UpdateStatement
update()
Create a new update statement.Methods inherited from interface com.mysql.cj.xdevapi.DatabaseObject
existsInDatabase, getName, getSchema, getSession
-
Method Details
-
insert
InsertStatement insert()Create an insert statement using the list of all columns in the table.- Returns:
InsertStatement
-
insert
Create an insert statement using the given list columns.- Parameters:
projection
- one or more projection expressions- Returns:
InsertStatement
-
insert
Create an insert statement using the given key/value pairs.- Parameters:
fieldsAndValues
- table name-value pairs- Returns:
InsertStatement
-
select
Create a new select statement using the given projections.- Parameters:
projections
- one or more projection expressions- Returns:
SelectStatement
-
update
UpdateStatement update()Create a new update statement.- Returns:
UpdateStatement
-
delete
DeleteStatement delete()Create a new delete statement.- Returns:
DeleteStatement
-
count
long count()Query the number of rows in this table.- Returns:
- Number of rows in this table
-
isView
boolean isView()Check if the underlying object is a view or not.- Returns:
- true if this Table is a View
-