public override void WriteToStream(Stream outputStream)
{
if (NpgsqlEventLog.Level >= LogLevel.Debug)
{
// Log the string being sent.
PGUtil.LogStringWritten(BackendEncoding.UTF8Encoding.GetString(commandText));
}
// Send the query to server.
// Write the byte 'Q' to identify a query message.
outputStream.WriteByte((byte)FrontEndMessageCode.Query);
// Write message length. Int32 + string length + null terminator.
PGUtil.WriteInt32(outputStream, 4 + commandText.Length + 1);
outputStream.WriteBytesNullTerminated(commandText);
}
}