2002-05-30 Daniel Morgan <danmorg@sc.rr.com>
[mono.git] / mcs / class / Mono.Data.MySql / Mono.Data.MySql / Field.cs
1 // 
2 // Field.cs
3 //
4 // Provide definition for the Field class
5 // Part of the C# bindings to MySQL library libMySQL.dll
6 //
7 // Author:
8 //    Brad Merrill <zbrad@cybercom.net>
9 //
10 // (C)Copyright 2002 Brad Merril
11 //
12 // http://www.cybercom.net/~zbrad/DotNet/MySql/
13 //
14 // Mono has gotten permission from Brad Merrill to include in 
15 // the Mono Class Library
16 // his C# bindings to MySQL under the X11 License
17 //
18 // Mono can be found at http://www.go-mono.com/
19 // The X11/MIT License can be found 
20 // at http://www.opensource.org/licenses/mit-license.html
21 //
22
23
24 namespace Mono.Data.MySql {
25         using System.Runtime.InteropServices;
26
27         ///<remarks>
28         ///<para>
29         /// MySql P/Invoke implementation test program
30         /// Brad Merrill
31         /// 3-Mar-2002
32         ///</para>
33         ///<para>
34         /// This structure contains information about a field, such as the
35         /// field's name, type, and size. Its members are described in more
36         /// detail below.  You may obtain the <see cref="Field"/> structures for
37         /// each field by calling
38         /// <see cref="MySql.FetchField"/>
39         /// repeatedly.
40         /// Field values are not part of this structure;
41         /// they are contained in a Row structure.
42         ///</para>
43         ///</remarks>
44         [StructLayout(LayoutKind.Sequential)]
45         public class Field {
46                 ///<value>name of column</value>
47                 [MarshalAs(UnmanagedType.LPStr)]
48                 public string Name;
49                 ///<value>table of column</value>
50                 [MarshalAs(UnmanagedType.LPStr)]
51                 public string Table;
52                 ///<value>default value</value>
53                 [MarshalAs(UnmanagedType.LPStr)]
54                 public string Def;
55                 ///<value>type of field</value>
56                 public int FieldTypes;
57                 ///<value>width of column</value>
58                 public uint Length;
59                 ///<value>max width of selected set</value>
60                 public uint MaxLength;
61                 ///<value>div flags</value>
62                 public uint Flags;
63                 ///<value>number of decimals in field</value>
64                 public uint Decimals;   
65         }
66 }