public override byte[] Serialize()
        {
            var buffer = new PostgresProtocolStream();

            buffer.Write(PortalName);
            buffer.Write(PreparedStatementName);
            buffer.Write(ParameterFormatCodeCount);

            for (var i = 0; i < ParameterFormatCodeCount; i++)
            {
                buffer.Write(ParameterFormatCodes[i]);
            }

            buffer.Write(ParameterValueCount);

            for (var i = 0; i < ParameterValueCount; i++)
            {
                buffer.Write(ParameterValues[i].Length);
                buffer.Write(ParameterValues[i].Value);
            }

            buffer.Write(RowFormatCode);

            return(buffer.ToArray());
        }
        public override byte[] Serialize()
        {
            var buffer = new PostgresProtocolStream();

            buffer.Write(PreparedStatementName);
            buffer.Write(Query);
            buffer.Write(ParameterDataTypeOidsCount);

            for (var i = 0; i < ParameterDataTypeOidsCount; i++)
            {
                buffer.Write(ParameterDataTypeOids[i]);
            }

            return(buffer.ToArray());
        }
        public override byte[] Serialize()
        {
            var buffer = new PostgresProtocolStream();

            buffer.Write(ProtocolVersion);

            for (var i = 0; i < Parameters.Count; i++)
            {
                buffer.Write(Parameters[i].Name);
                buffer.Write(Parameters[i].Value);
            }

            buffer.WriteByte(EndMessage);

            return(buffer.ToArray());
        }