Package org.mariadb.jdbc.internal.com.send

## Class ComStmtPrepare

- java.lang.Object
- - org.mariadb.jdbc.internal.com.send.ComStmtPrepare

    public class ComStmtPrepare
    extends Object

### Constructor Summary

Constructors
`ComStmtPrepare​(Protocol protocol, String sql)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ServerPrepareResult` `read​(PacketInputStream reader, boolean eofDeprecated)` Read COM_PREPARE_RESULT.
`ComStmtPrepare` `send​(PacketOutputStream pos)` Send directly to socket the sql data.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ComStmtPrepare

    public ComStmtPrepare​(Protocol protocol,
                          String sql)

### Method Detail

#### send

    public ComStmtPrepare send​(PacketOutputStream pos)
                        throws IOException

Send directly to socket the sql data.

Parameters:
  `pos` - the writer
Returns:
  ComStmtPrepare this object
Throws:
  `IOException` - if connection error occur

#### read

    public ServerPrepareResult read​(PacketInputStream reader,
                                    boolean eofDeprecated)
                             throws IOException,
                                    SQLException

Read COM_PREPARE_RESULT.

Parameters:
  `reader` - inputStream
  `eofDeprecated` - are EOF_packet deprecated
Returns:
  ServerPrepareResult prepare result
Throws:
  `IOException` - if connection has error
  `SQLException` - if server answer with error.