public abstract class AbstractDoneToken extends AbstractDataToken implements Result.UpdateCount
| Modifier and Type | Field and Description |
|---|---|
static int |
LENGTH
Packet length in bytes.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDoneToken(byte type,
int status,
int currentCommand,
long rowCount)
Creates a new
AbstractDoneToken. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canDecode(io.netty.buffer.ByteBuf buffer)
Check whether the
ByteBuf can be decoded into an entire AbstractDoneToken. |
void |
encode(io.netty.buffer.ByteBuf buffer)
Encode this token.
|
boolean |
equals(Object o) |
int |
getCurrentCommand() |
long |
getRowCount() |
int |
getStatus() |
boolean |
hasCount() |
static boolean |
hasCount(io.r2dbc.mssql.message.Message message)
Check whether the the
Message has a count. |
int |
hashCode() |
boolean |
hasMore() |
boolean |
isAttentionAck() |
static boolean |
isAttentionAck(io.r2dbc.mssql.message.Message message)
Check whether the
Message represents a attention acknowledgement. |
boolean |
isDone() |
static boolean |
isDone(io.r2dbc.mssql.message.Message message)
Check whether the
Message represents a finished done token. |
boolean |
isError() |
String |
toString() |
long |
value() |
getName, getTypepublic static final int LENGTH
protected AbstractDoneToken(byte type,
int status,
int currentCommand,
long rowCount)
AbstractDoneToken.type - token type.status - status flags, see AbstractDoneToken constants.currentCommand - the current command counter.rowCount - number of columns if hasCount() is set.public static boolean isAttentionAck(io.r2dbc.mssql.message.Message message)
Message represents a attention acknowledgement.message - the message to inspect.Message represents a attention acknowledgement.public static boolean isDone(io.r2dbc.mssql.message.Message message)
Message represents a finished done token.message - the message to inspect.Message represents a finished done token.public static boolean hasCount(io.r2dbc.mssql.message.Message message)
Message has a count.message - the message to inspect.Message has a count.public static boolean canDecode(io.netty.buffer.ByteBuf buffer)
ByteBuf can be decoded into an entire AbstractDoneToken.buffer - the data buffer.true if the buffer contains sufficient data to entirely decode a AbstractDoneToken.IllegalArgumentException - when ByteBuf is null.public void encode(io.netty.buffer.ByteBuf buffer)
buffer - the data buffer.IllegalArgumentException - when ByteBuf is null.public int getStatus()
public boolean isAttentionAck()
true if this token indicates the response is acknowledging the attention request.public boolean isDone()
true if this token indicates the response is done and has no more rows.public boolean isError()
true if this token indicates the response is done with a preceding error.public boolean hasMore()
true if this token indicates the response is not done yet and the stream contains more data.public boolean hasCount()
true if this token contains a row count and getRowCount() has a valid value.public int getCurrentCommand()
public long getRowCount()
hasCount() is set.public long value()
value in interface Result.UpdateCountCopyright © 2023. All rights reserved.