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 |
---|---|
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, java.sql.SQLException
pos
- the writerjava.io.IOException
- if connection error occurjava.sql.SQLException
- if packet max size is to big.public 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.