本文整理汇总了C#中IMySqlValue类的典型用法代码示例。如果您正苦于以下问题:C# IMySqlValue类的具体用法?C# IMySqlValue怎么用?C# IMySqlValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IMySqlValue类属于命名空间,在下文中一共展示了IMySqlValue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetValueObject
public void SetValueObject(int i, IMySqlValue valueObject)
{
Debug.Assert(values != null);
Debug.Assert(i < values.Length);
values[i] = valueObject;
}
示例2: ReadColumnValue
public IMySqlValue ReadColumnValue(int index, MySqlField field, IMySqlValue valObject)
{
long length = -1;
bool isNull;
if (nullMap != null)
isNull = nullMap[index + 2];
else
{
length = packet.ReadFieldLength();
isNull = length == -1;
}
packet.Encoding = field.Encoding;
packet.Version = version;
return valObject.ReadValue(packet, length, isNull);
}
示例3: SkipColumnValue
public void SkipColumnValue(IMySqlValue valObject)
{
int length = -1;
if (nullMap == null)
{
length = (int)packet.ReadFieldLength();
if (length == -1) return;
}
if (length > -1)
packet.Position += length;
else
valObject.SkipValue(packet);
}
示例4: ReadColumnValue
public IMySqlValue ReadColumnValue(int index, MySqlField field, IMySqlValue value)
{
return handler.ReadColumnValue(index, field, value);
}
示例5: SkipColumnValue
public void SkipColumnValue(IMySqlValue valObject)
{
handler.SkipColumnValue(valObject);
}
示例6: ReadColumnValue
public abstract IMySqlValue ReadColumnValue(int index, MySqlField field, IMySqlValue value);
示例7: ReadColumnValue
public IMySqlValue ReadColumnValue(int index, MySqlField field, IMySqlValue valObject)
{
packet.Encoding = field.Encoding;
packet.Version = version;
if (nullMap != null)
{
return valObject.ReadValue(packet, -1, nullMap[index + 2]);
}
else
{
long length = packet.ReadFieldLength();
return valObject.ReadValue(packet, length, length == -1);
}
}
示例8: ReadColumnValue
public override IMySqlValue ReadColumnValue(int index, MySqlField field, IMySqlValue valObject)
{
bool flag;
long length = -1L;
if (this.nullMap != null)
{
flag = this.nullMap[index + 2];
}
else
{
length = this.stream.ReadFieldLength();
flag = length == -1L;
}
this.stream.Encoding = field.Encoding;
return valObject.ReadValue(this.stream, length, flag);
}
示例9: SkipColumnValue
public override void SkipColumnValue(IMySqlValue valObject)
{
long num = -1L;
if (this.nullMap == null)
{
num = this.stream.ReadFieldLength();
if (num == -1L)
{
return;
}
}
if (num > -1L)
{
this.stream.SkipBytes((int) num);
}
else
{
valObject.SkipValue(this.stream);
}
}
示例10: ChangeType
private object ChangeType(IMySqlValue value, int fieldIndex, Type newType)
{
#if !CF
resultSet.Fields[fieldIndex].AddTypeConversion(newType);
#endif
return Convert.ChangeType(value.Value, newType, CultureInfo.InvariantCulture);
}
示例11: SkipColumnValue
public override void SkipColumnValue(IMySqlValue valObject)
{
long length = -1;
if (nullMap == null)
{
length = stream.ReadFieldLength();
if (length == -1) return;
}
if (length > -1)
stream.SkipBytes((int) length);
else
valObject.SkipValue(stream);
}
示例12: ReadColumnValue
public override IMySqlValue ReadColumnValue(int index, MySqlField field, IMySqlValue valObject)
{
long length = -1;
bool isNull;
if (nullMap != null)
isNull = nullMap[index + 2];
else
{
length = stream.ReadFieldLength();
isNull = length == -1;
}
stream.Encoding = field.Encoding;
return valObject.ReadValue(stream, length, isNull);
}
示例13: SetDbType
private void SetDbType(DbType db_type)
{
dbType = db_type;
switch (dbType)
{
case DbType.Guid:
mySqlDbType = MySqlDbType.Guid;
break;
case DbType.AnsiString:
case DbType.String:
mySqlDbType = MySqlDbType.VarChar;
break;
case DbType.AnsiStringFixedLength:
case DbType.StringFixedLength:
mySqlDbType = MySqlDbType.String;
break;
case DbType.Boolean:
case DbType.Byte:
mySqlDbType = MySqlDbType.UByte;
break;
case DbType.SByte:
mySqlDbType = MySqlDbType.Byte;
break;
case DbType.Date:
mySqlDbType = MySqlDbType.Date;
break;
case DbType.DateTime:
mySqlDbType = MySqlDbType.DateTime;
break;
case DbType.Time:
mySqlDbType = MySqlDbType.Time;
break;
case DbType.Single:
mySqlDbType = MySqlDbType.Float;
break;
case DbType.Double:
mySqlDbType = MySqlDbType.Double;
break;
case DbType.Int16:
mySqlDbType = MySqlDbType.Int16;
break;
case DbType.UInt16:
mySqlDbType = MySqlDbType.UInt16;
break;
case DbType.Int32:
mySqlDbType = MySqlDbType.Int32;
break;
case DbType.UInt32:
mySqlDbType = MySqlDbType.UInt32;
break;
case DbType.Int64:
mySqlDbType = MySqlDbType.Int64;
break;
case DbType.UInt64:
mySqlDbType = MySqlDbType.UInt64;
break;
case DbType.Decimal:
case DbType.Currency:
mySqlDbType = MySqlDbType.Decimal;
break;
case DbType.Object:
case DbType.VarNumeric:
case DbType.Binary:
default:
mySqlDbType = MySqlDbType.Blob;
break;
}
valueObject = MySqlField.GetIMySqlValue(mySqlDbType);
}
示例14: SkipColumnValue
public abstract void SkipColumnValue(IMySqlValue valObject);
示例15: SetMySqlDbType
private void SetMySqlDbType(MySqlDbType mysql_dbtype)
{
mySqlDbType = mysql_dbtype;
valueObject = MySqlField.GetIMySqlValue(mySqlDbType);
switch (mySqlDbType)
{
case MySqlDbType.NewDecimal:
case MySqlDbType.Decimal:
dbType = DbType.Decimal;
break;
case MySqlDbType.Byte:
dbType = DbType.SByte;
break;
case MySqlDbType.UByte:
dbType = DbType.Byte;
break;
case MySqlDbType.Int16:
dbType = DbType.Int16;
break;
case MySqlDbType.UInt16:
dbType = DbType.UInt16;
break;
case MySqlDbType.Int24:
case MySqlDbType.Int32:
dbType = DbType.Int32;
break;
case MySqlDbType.UInt24:
case MySqlDbType.UInt32:
dbType = DbType.UInt32;
break;
case MySqlDbType.Int64:
dbType = DbType.Int64;
break;
case MySqlDbType.UInt64:
dbType = DbType.UInt64;
break;
case MySqlDbType.Bit:
dbType = DbType.UInt64;
break;
case MySqlDbType.Float:
dbType = DbType.Single;
break;
case MySqlDbType.Double:
dbType = DbType.Double;
break;
case MySqlDbType.Timestamp:
case MySqlDbType.DateTime:
dbType = DbType.DateTime;
break;
case MySqlDbType.Date:
case MySqlDbType.Newdate:
case MySqlDbType.Year:
dbType = DbType.Date;
break;
case MySqlDbType.Time:
dbType = DbType.Time;
break;
case MySqlDbType.Enum:
case MySqlDbType.Set:
case MySqlDbType.VarChar:
dbType = DbType.String;
break;
case MySqlDbType.TinyBlob:
case MySqlDbType.MediumBlob:
case MySqlDbType.LongBlob:
case MySqlDbType.Blob:
dbType = DbType.Object;
break;
case MySqlDbType.String:
dbType = DbType.StringFixedLength;
break;
case MySqlDbType.Guid:
dbType = DbType.Guid;
break;
}
}