23 namespace Deveel.Data.Client {
31 dbType = DbType.Boolean;
35 dbType = DbType.Int16;
37 dbType = DbType.Int32;
39 dbType = DbType.Int64;
42 dbType = DbType.Single;
44 dbType = DbType.Double;
46 dbType = DbType.Decimal;
48 dbType = DbType.VarNumeric;
50 throw new NotSupportedException(
String.Format(
"The SQL Type '{0}' cannot be converted to DbType.", typeCode));
55 if (dbType == DbType.String ||
56 dbType == DbType.AnsiString) {
58 }
else if (dbType == DbType.StringFixedLength ||
59 dbType == DbType.AnsiStringFixedLength) {
61 }
else if (dbType == DbType.Binary) {
63 }
else if (dbType == DbType.Boolean) {
65 }
else if (dbType == DbType.Byte) {
67 }
else if (dbType == DbType.Int16) {
69 }
else if (dbType == DbType.Int32) {
71 }
else if (dbType == DbType.Int64) {
73 }
else if (dbType == DbType.Single) {
75 }
else if (dbType == DbType.Double) {
77 }
else if (dbType == DbType.VarNumeric ||
78 dbType == DbType.Decimal ||
79 dbType == DbType.Currency) {
81 }
else if (dbType == DbType.Date ||
82 dbType == DbType.DateTime2) {
84 }
else if (dbType == DbType.DateTime ||
85 dbType == DbType.DateTimeOffset) {
87 }
else if (dbType == DbType.Time) {
89 }
else if (dbType == DbType.Object ||
90 dbType == DbType.Xml) {
93 throw new NotSupportedException(
String.Format(
"The DbType '{0}' is not supported by DeveelDB engine", dbType));
97 public override DbType DbType {
98 get {
return dbType; }
106 get {
return typeCode; }
113 public override System.Data.ParameterDirection Direction {
get; set; }
115 public override bool IsNullable {
get; set; }
117 public override string ParameterName {
get; set; }
119 public override string SourceColumn {
get; set; }
121 public override DataRowVersion SourceVersion {
get; set; }
123 public override object Value {
get; set; }
125 public override bool SourceColumnNullMapping {
get; set; }
127 public override int Size {
get; set; }
129 byte IDbDataParameter.Precision {
130 get {
return Precision; }
131 set { Precision = value; }
134 byte IDbDataParameter.Scale {
135 get {
return Scale; }
136 set { Scale = value; }
139 public byte Precision {
get; set; }
141 public byte Scale {
get; set; }
143 public string Locale {
get; set; }
A long string in the system.
override void ResetDbType()
Defines the properties of a specific SQL Type and handles the values compatible.
SqlTypeCode
Enumerates the codes of all SQL types handled by the system.