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
Constructor and Description
`ComStmtPrepare(Protocol protocol, String sql)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ServerPrepareResult` `read(PacketInputStream reader, boolean eofDeprecated)` Read COM_PREPARE_RESULT.
`void` `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 void send(PacketOutputStream pos)
              throws IOException,
                     SQLException

Send directly to socket the sql data.

Parameters:
  `pos` - the writer
Throws:
  `IOException` - if connection error occur
  `SQLException` - if packet max size is to big.

#### 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.