Class ComStmtPrepare
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.send.ComStmtPrepare
-
public class ComStmtPrepare extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ComStmtPrepare(Protocol protocol, java.lang.String sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
protocol
private final Protocol protocol
-
sql
private final java.lang.String sql
-
-
Constructor Detail
-
ComStmtPrepare
public ComStmtPrepare(Protocol protocol, java.lang.String sql)
-
-
Method Detail
-
send
public void send(PacketOutputStream pos) throws java.io.IOException
Send directly to socket the sql data.- Parameters:
pos
- the writer- Throws:
java.io.IOException
- if connection error occur
-
read
public ServerPrepareResult read(PacketInputStream reader, boolean eofDeprecated) throws java.io.IOException, java.sql.SQLException
Read COM_PREPARE_RESULT.- Parameters:
reader
- inputStreameofDeprecated
- are EOF_packet deprecated- Returns:
- ServerPrepareResult prepare result
- Throws:
java.io.IOException
- if connection has errorjava.sql.SQLException
- if server answer with error.
-
buildErrorException
private java.sql.SQLException buildErrorException(Buffer buffer)
-
-