Top Description Methods
com.mysql.cj.xdevapi

public Interface Table

extends DatabaseObject
Known Direct Implementers
com.mysql.cj.xdevapi.TableImpl
Imports
java.util.Map

A client-side representation of a database table. Provides access to the table through standard INSERT/SELECT/UPDATE/DELETE statements.

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

Number of rows in this table
count
()

Query the number of rows in this table.

public DeleteStatement
delete()

Create a new delete statement.

public InsertStatement
insert()

Create an insert statement using the list of all columns in the table.

public InsertStatement
insert(String...
one or more projection expressions
projection
)

Create an insert statement using the given list columns.

public InsertStatement
insert(Map<String, Object>
table name-value pairs
fieldsAndValues
)

Create an insert statement using the given key/value pairs.

public boolean

Returns:

true if this Table is a View
isView
()

Check if the underlying object is a view or not.

public SelectStatement
select(String...
one or more projection expressions
projections
)

Create a new select statement using the given projections.

public UpdateStatement
update()

Create a new update statement.

Inherited from com.mysql.cj.xdevapi.DatabaseObject:
existsInDatabasegetNamegetSchemagetSession

Method Detail

countback to summary
public long count()

Query the number of rows in this table.

Returns:long

Number of rows in this table

deleteback to summary
public DeleteStatement delete()

Create a new delete statement.

Returns:DeleteStatement

DeleteStatement

insertback to summary
public InsertStatement insert()

Create an insert statement using the list of all columns in the table.

Returns:InsertStatement

InsertStatement

insertback to summary
public InsertStatement insert(String... projection)

Create an insert statement using the given list columns.

Parameters
projection:String[]

one or more projection expressions

Returns:InsertStatement

InsertStatement

insertback to summary
public InsertStatement insert(Map<String, Object> fieldsAndValues)

Create an insert statement using the given key/value pairs.

Parameters
fieldsAndValues:Map<String, Object>

table name-value pairs

Returns:InsertStatement

InsertStatement

isViewback to summary
public boolean isView()

Check if the underlying object is a view or not.

Returns:boolean

true if this Table is a View

selectback to summary
public SelectStatement select(String... projections)

Create a new select statement using the given projections.

Parameters
projections:String[]

one or more projection expressions

Returns:SelectStatement

SelectStatement

updateback to summary
public UpdateStatement update()

Create a new update statement.

Returns:UpdateStatement

UpdateStatement