New test.
[mono.git] / mcs / class / Npgsql / Npgsql / NpgsqlResultSet.cs
1
2 // Npgsql.NpgsqlResultSet.cs
3 //
4 // Author:
5 //      Francisco Jr. (fxjrlists@yahoo.com.br)
6 //
7 //      Copyright (C) 2002 The Npgsql Development Team
8 //      npgsql-general@gborg.postgresql.org
9 //      http://gborg.postgresql.org/project/npgsql/projdisplay.php
10 //
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.
15 //
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.
20 //
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
24
25 using System;
26 using System.Data;
27 using System.Collections;
28
29 namespace Npgsql
30 {
31     internal sealed class NpgsqlResultSet
32     {
33         private NpgsqlRowDescription    row_desc;
34         private ArrayList                                                       data;
35
36
37         public NpgsqlResultSet(NpgsqlRowDescription rowDesc, ArrayList data)
38         {
39             this.row_desc = rowDesc;
40             this.data = data;
41         }
42
43         public NpgsqlRowDescription RowDescription
44         {
45             get
46             {
47                 return row_desc;
48             }
49         }
50
51         public Object this[Int32 index]
52         {
53             get
54             {
55                 return data[index];
56             }
57         }
58
59         public Int32 Count
60         {
61             get
62             {
63                 return data.Count;
64             }
65         }
66     }
67 }