Transport no longer has a Stream member.
[versaplex.git] / versaplexd / vxcolumninfo.cs
blobcdde12aab390dc9128d639bcd59da8db9d0eb55b
1 using System;
2 using Wv;
4 public struct VxColumnInfo {
5 internal int size;
6 internal string colname;
7 internal VxColumnType coltype;
8 internal short precision;
9 internal short scale;
10 internal byte nullable;
12 public string ColumnName {
13 get { return colname; }
14 set { colname = value; }
17 public VxColumnType VxColumnType {
18 get { return coltype; }
19 set { coltype = value; }
22 public string ColumnType {
23 get { return coltype.ToString(); }
26 public bool Nullable {
27 get { return (nullable != 0); }
28 set { nullable = value ? (byte)1 : (byte)0; }
31 public int Size {
32 get { return size; }
33 set {
34 if (value < 0)
35 throw new ArgumentOutOfRangeException(
36 "Size must be nonnegative");
38 size = value;
42 public short Precision {
43 get { return precision; }
44 set {
45 if (value < 0)
46 throw new ArgumentOutOfRangeException(
47 "Precision must be nonnegative");
49 precision = value;
53 public short Scale {
54 get { return scale; }
55 set {
56 if (value < 0)
57 throw new ArgumentOutOfRangeException(
58 "Scale must be nonnegative");
60 scale = value;
64 public VxColumnInfo(string colname, VxColumnType vxcoltype, bool nullable,
65 int size, short precision, short scale)
67 ColumnName = colname;
68 VxColumnType = vxcoltype;
69 Nullable = nullable;
70 Size = size;
71 Precision = precision;
72 Scale = scale;
76 public enum VxColumnType {
77 Int64,
78 Int32,
79 Int16,
80 UInt8,
81 Bool,
82 Double,
83 Uuid,
84 Binary,
85 String,
86 DateTime,
87 Decimal