Package org.mariadb.jdbc.export

## Interface Prepare

    public interface Prepare

Prepare packet COM_STMT_PREPARE (see https://mariadb.com/kb/en/com_stmt_prepare/)

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `close​(org.mariadb.jdbc.client.Client con)` Close Prepared command
`void` `decrementUse​(org.mariadb.jdbc.client.Client con, BasePreparedStatement preparedStatement)` Decrement use of prepare.
`org.mariadb.jdbc.client.ColumnDecoder[]` `getColumns()` Prepare result-set columns
`org.mariadb.jdbc.client.ColumnDecoder[]` `getParameters()` Prepare parameters
`int` `getStatementId()` Get current prepare statement id
`void` `setColumns​(org.mariadb.jdbc.client.ColumnDecoder[] columns)` set prepare result-set columns

### Method Detail

#### close

    void close​(org.mariadb.jdbc.client.Client con)
        throws SQLException

Close Prepared command

Parameters:
  `con` - current connection
Throws:
  `SQLException` - if prepare close fails

#### decrementUse

    void decrementUse​(org.mariadb.jdbc.client.Client con,
                      BasePreparedStatement preparedStatement)
               throws SQLException

Decrement use of prepare. In case not used anymore, and not in cache, will be close.

Parameters:
  `con` - connection
  `preparedStatement` - current prepared statement that was using prepare object
Throws:
  `SQLException` - if close fails

#### getStatementId

    int getStatementId()

Get current prepare statement id

Returns:
  statement id

#### getParameters

    org.mariadb.jdbc.client.ColumnDecoder[] getParameters()

Prepare parameters

Returns:
  parameters metadata

#### getColumns

    org.mariadb.jdbc.client.ColumnDecoder[] getColumns()

Prepare result-set columns

Returns:
  result-set columns metadata

#### setColumns

    void setColumns​(org.mariadb.jdbc.client.ColumnDecoder[] columns)

set prepare result-set columns

Parameters:
  `columns` - set result-set columns metadata