public class ComStmtPrepare
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Protocol |
protocol |
private java.lang.String |
sql |
Constructor and Description |
---|
ComStmtPrepare(Protocol protocol,
java.lang.String sql) |
Modifier and Type | Method and Description |
---|---|
private java.sql.SQLException |
buildErrorException(Buffer buffer) |
ServerPrepareResult |
read(PacketInputStream reader,
boolean eofDeprecated)
Read COM_PREPARE_RESULT.
|
void |
send(PacketOutputStream pos)
Send directly to socket the sql data.
|
private final Protocol protocol
private final java.lang.String sql
public ComStmtPrepare(Protocol protocol, java.lang.String sql)
public void send(PacketOutputStream pos) throws java.io.IOException
pos
- the writerjava.io.IOException
- if connection error occurpublic ServerPrepareResult read(PacketInputStream reader, boolean eofDeprecated) throws java.io.IOException, java.sql.SQLException
reader
- inputStreameofDeprecated
- are EOF_packet deprecatedjava.io.IOException
- if connection has errorjava.sql.SQLException
- if server answer with error.private java.sql.SQLException buildErrorException(Buffer buffer)