1 // created on 1/7/2003 at 20:03
2 // Npgsql.NpgsqlExecute.cs
5 // Francisco Jr. (fxjrlists@yahoo.com.br)
7 // Copyright (C) 2002 The Npgsql Development Team
8 // npgsql-general@gborg.postgresql.org
9 // http://gborg.postgresql.org/project/npgsql/projdisplay.php
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
21 // You should have received a copy of the GNU Lesser General Public
22 // License along with this library; if not, write to the Free Software
23 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 /// This class represents the Parse message sent to PostgreSQL
37 internal sealed class NpgsqlExecute
39 // Logging related values
40 private static readonly String CLASSNAME
= "NpgsqlExecute";
42 private String _portalName
;
43 private Int32 _maxRows
;
46 public NpgsqlExecute(String portalName
, Int32 maxRows
)
48 _portalName
= portalName
;
52 public String PortalName
60 public void WriteToStream(Stream outputStream
, Encoding encoding
)
62 outputStream
.WriteByte((Byte
)'E');
64 PGUtil
.WriteInt32(outputStream
, 4 +
65 encoding
.GetByteCount(_portalName
) + 1 +
68 PGUtil
.WriteString(_portalName
, outputStream
, encoding
);
69 PGUtil
.WriteInt32(outputStream
, _maxRows
);