MySQLPacketOK class
Representa um pacote OK enviado pelo servidor MySQL.
Esse pacote é utilizado para indicar que uma operação (como INSERT, UPDATE, DELETE, etc.) foi executada com sucesso. Ele contém informações como:
- header: Um byte que identifica o pacote (geralmente 0x00).
- affectedRows: Número de linhas afetadas pela operação (valor codificado com length-encoded integer).
- lastInsertID: Último ID gerado (também codificado como length-encoded integer).
- Inheritance
-
- Object
- MySQLPacketPayload
- MySQLPacketOK
Constructors
- MySQLPacketOK.new({required int header, required BigInt affectedRows, required BigInt lastInsertID})
- Construtor da classe.
- MySQLPacketOK.decode(Uint8List buffer)
-
Decodifica um buffer Uint8List recebido do servidor e retorna uma instância de MySQLPacketOK.
factory
Properties
- affectedRows → BigInt
-
Número de linhas afetadas pela operação.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → int
-
Header do pacote (geralmente 0x00).
final
- lastInsertID → BigInt
-
Último ID inserido (last insert ID).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
encode(
) → Uint8List -
O método encode não está implementado, pois esse pacote geralmente é utilizado
apenas para leitura dos dados enviados pelo servidor.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited