未验证 提交 7503ded0 编写于 作者: X xiaolei li 提交者: GitHub

[TD-13947]<fix>:csharp connector fix typo (#10701)

* [TD-13947]<fix>:csharp connector fix typo

* [TD-13947]<fix>:fix unmanaged type variable name
上级 8ba840ab
......@@ -14,11 +14,11 @@ namespace Sample.UtilsTools
static string db = "";
static short port = 0;
static string globalDbName = "csharp_example_db";
//get a tdengine connection
//get a TDengine connection
public static IntPtr TDConnection()
{
TDengine.Options((int)TDengineInitOption.TDDB_OPTION_CONFIGDIR, GetConfigPath());
TDengine.Options((int)TDengineInitOption.TDDB_OPTION_SHELL_ACTIVITY_TIMER, "60");
TDengine.Options((int)TDengineInitOption.TSDB_OPTION_CONFIGDIR, GetConfigPath());
TDengine.Options((int)TDengineInitOption.TSDB_OPTION_SHELL_ACTIVITY_TIMER, "60");
TDengine.Init();
IntPtr conn = TDengine.Connect(ip, user, password, db, port);
......@@ -100,18 +100,18 @@ namespace Sample.UtilsTools
ExitProgram();
}
List<TDengineMeta> metas = GetResField(res);
int fieldCount = metas.Count;
// metas.ForEach((item) => { Console.Write("{0} ({1}) \t|\t", item.name, item.size); });
List<TDengineMeta> metaList = GetResField(res);
int fieldCount = metaList.Count;
// metaList.ForEach((item) => { Console.Write("{0} ({1}) \t|\t", item.name, item.size); });
List<Object> datas = QueryRes(res, metas);
for (int index = 0; index < datas.Count; index++)
List<Object> dataList = QueryRes(res, metaList);
for (int index = 0; index < dataList.Count; index++)
{
if (index % fieldCount == 0 && index != 0)
{
Console.WriteLine("");
}
Console.Write("{0} \t|\t", datas[index].ToString());
Console.Write("{0} \t|\t", dataList[index].ToString());
}
Console.WriteLine("");
......@@ -127,10 +127,10 @@ namespace Sample.UtilsTools
ExitProgram();
}
List<TDengineMeta> metas = GetResField(res);
List<TDengineMeta> meta = GetResField(res);
result.Add(colName);
dataRaw = QueryRes(res, metas);
dataRaw = QueryRes(res, meta);
result.Add(dataRaw);
if (TDengine.ErrorNo(res) != 0)
......@@ -161,7 +161,7 @@ namespace Sample.UtilsTools
{
if (TDengine.Close(conn) == 0)
{
Console.WriteLine("close connection sucess");
Console.WriteLine("close connection success");
}
else
{
......@@ -171,8 +171,8 @@ namespace Sample.UtilsTools
}
public static List<TDengineMeta> GetResField(IntPtr res)
{
List<TDengineMeta> metas = TDengine.FetchFields(res);
return metas;
List<TDengineMeta> meta = TDengine.FetchFields(res);
return meta;
}
public static void ExitProgram()
{
......@@ -187,16 +187,16 @@ namespace Sample.UtilsTools
{
ExitProgram();
}
List<TDengineMeta> metas = GetResField(res);
dataRaw = QueryRes(res, metas);
List<TDengineMeta> meta = GetResField(res);
dataRaw = QueryRes(res, meta);
return dataRaw;
}
private static List<Object> QueryRes(IntPtr res, List<TDengineMeta> metas)
private static List<Object> QueryRes(IntPtr res, List<TDengineMeta> meta)
{
IntPtr taosRow;
List<Object> dataRaw = new List<Object>();
int fieldCount = metas.Count;
int fieldCount = meta.Count;
while ((taosRow = TDengine.FetchRows(res)) != IntPtr.Zero)
{
dataRaw.AddRange(FetchRow(taosRow,res));
......@@ -295,7 +295,7 @@ namespace Sample.UtilsTools
dataRaw.Add(v16);
break;
default:
dataRaw.Add("nonsupport data type value");
dataRaw.Add("nonsupport data type");
break;
}
......
......@@ -44,8 +44,8 @@ namespace TDengineDriver
TSDB_OPTION_LOCALE = 0,
TSDB_OPTION_CHARSET = 1,
TSDB_OPTION_TIMEZONE = 2,
TDDB_OPTION_CONFIGDIR = 3,
TDDB_OPTION_SHELL_ACTIVITY_TIMER = 4
TSDB_OPTION_CONFIGDIR = 3,
TSDB_OPTION_SHELL_ACTIVITY_TIMER = 4
}
enum TaosField
{
......@@ -147,7 +147,7 @@ namespace TDengineDriver
/// <summary>
/// User defined callback function for interface "QueryAsync()"
/// ,actually is a delegate in .Net.
/// This function aim to handel the taoRes which points to
/// This function aim to handle the taoRes which points to
/// the caller method's sql resultset.
/// </summary>
/// <param name="param"> This parameter will sent by caller method (QueryAsync()).</param>
......@@ -234,10 +234,10 @@ namespace TDengineDriver
{
// const int fieldSize = 68;
List<TDengineMeta> metas = new List<TDengineMeta>();
List<TDengineMeta> metaList = new List<TDengineMeta>();
if (res == IntPtr.Zero)
{
return metas;
return metaList;
}
int fieldCount = FieldCount(res);
......@@ -250,11 +250,11 @@ namespace TDengineDriver
meta.name = Marshal.PtrToStringAnsi(fieldsPtr + offset);
meta.type = Marshal.ReadByte(fieldsPtr + offset + (int)TaosField.TYPE_OFFSET);
meta.size = Marshal.ReadInt16(fieldsPtr + offset + (int)TaosField.BYTES_OFFSET);
metas.Add(meta);
metaList.Add(meta);
}
return metas;
return metaList;
}
[DllImport("taos", EntryPoint = "taos_fetch_row", CallingConvention = CallingConvention.Cdecl)]
......@@ -430,7 +430,7 @@ namespace TDengineDriver
/// returned in this API is unknown.
/// </summary>
/// <param name="stmt">could be the value returned by 'StmtInit', that may be a valid object or NULL.</param>
/// <returns>piont the error message</returns>
/// <returns>point the error message</returns>
[DllImport("taos", EntryPoint = "taos_stmt_errstr", CallingConvention = CallingConvention.Cdecl)]
static extern private IntPtr StmtErrPtr(IntPtr stmt);
......@@ -452,9 +452,9 @@ namespace TDengineDriver
// Async Query
/// <summary>
/// This API uses non-blocking call mode.
/// Application can open mutilple tables and manipulate(query or insert) opened table concurrently.
/// So applications must ensure that opetations on the same table is compeletly serialized.
/// Becuase that will cause some query and insert operations cannot be performed.
/// Application can open multiple tables and manipulate(query or insert) opened table concurrently.
/// So applications must ensure that opetations on the same table is completely serialized.
/// Because that will cause some query and insert operations cannot be performed.
/// </summary>
/// <param name="taos"> A taos connection return by Connect()</param>
/// <param name="sql">sql command need to execute</param>
......@@ -575,7 +575,7 @@ namespace TDengineDriver
/// </param>
/// <param name="param">First parameter provide by application for callback usage.
/// While callback,this parameter is provided to the application.</param>
/// <param name="callback2">The second callback function which will be caled when the continuous query
/// <param name="callback2">The second callback function which will be called when the continuous query
/// stop automatically.</param>
/// <returns> Return null indicate creation failed, not null for success.</returns>
[DllImport("taos", EntryPoint = "taos_open_stream", CallingConvention = CallingConvention.Cdecl)]
......
......@@ -17,17 +17,17 @@ namespace TDengineDriver
TAOS_BIND bind = new TAOS_BIND();
byte[] boolByteArr = BitConverter.GetBytes(val);
int boolByteArrSize = Marshal.SizeOf(boolByteArr[0]) * boolByteArr.Length;
IntPtr bo = Marshal.AllocHGlobal(1);
Marshal.Copy(boolByteArr, 0, bo, boolByteArr.Length);
IntPtr c_bool = Marshal.AllocHGlobal(1);
Marshal.Copy(boolByteArr, 0, c_bool, boolByteArr.Length);
int length = sizeof(Boolean);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_BOOL;
bind.buffer = bo;
bind.buffer = c_bool;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -38,17 +38,17 @@ namespace TDengineDriver
byte[] tinyIntByteArr = BitConverter.GetBytes(val);
int tinyIntByteArrSize = Marshal.SizeOf(tinyIntByteArr[0]) * tinyIntByteArr.Length;
IntPtr uManageTinyInt = Marshal.AllocHGlobal(tinyIntByteArrSize);
Marshal.Copy(tinyIntByteArr, 0, uManageTinyInt, tinyIntByteArr.Length);
IntPtr c_tinyint = Marshal.AllocHGlobal(tinyIntByteArrSize);
Marshal.Copy(tinyIntByteArr, 0, c_tinyint, tinyIntByteArr.Length);
int length = sizeof(sbyte);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_TINYINT;
bind.buffer = uManageTinyInt;
bind.buffer = c_tinyint;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -58,17 +58,17 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
IntPtr uManageSmallInt = Marshal.AllocHGlobal(sizeof(short));
Marshal.WriteInt16(uManageSmallInt, val);
IntPtr c_smallint = Marshal.AllocHGlobal(sizeof(short));
Marshal.WriteInt16(c_smallint, val);
int length = sizeof(short);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_SMALLINT;
bind.buffer = uManageSmallInt;
bind.buffer = c_smallint;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -77,17 +77,17 @@ namespace TDengineDriver
public static TAOS_BIND BindInt(int val)
{
TAOS_BIND bind = new TAOS_BIND();
IntPtr uManageInt = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(uManageInt, val);
IntPtr c_int = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(c_int, val);
int length = sizeof(int);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_INT;
bind.buffer = uManageInt;
bind.buffer = c_int;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -97,17 +97,17 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
IntPtr uManageBigInt = Marshal.AllocHGlobal(sizeof(long));
Marshal.WriteInt64(uManageBigInt, val);
IntPtr c_bigint = Marshal.AllocHGlobal(sizeof(long));
Marshal.WriteInt64(c_bigint, val);
int length = sizeof(long);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_BIGINT;
bind.buffer = uManageBigInt;
bind.buffer = c_bigint;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -117,17 +117,17 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
IntPtr uManageTinyInt = Marshal.AllocHGlobal(sizeof(byte));
Marshal.WriteByte(uManageTinyInt, val);
IntPtr c_unsigned_tinyint = Marshal.AllocHGlobal(sizeof(byte));
Marshal.WriteByte(c_unsigned_tinyint, val);
int length = sizeof(byte);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_UTINYINT;
bind.buffer = uManageTinyInt;
bind.buffer = c_unsigned_tinyint;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -139,17 +139,17 @@ namespace TDengineDriver
byte[] uSmallIntByteArr = BitConverter.GetBytes(val);
int usmallSize = Marshal.SizeOf(uSmallIntByteArr[0]) * uSmallIntByteArr.Length;
IntPtr uManageUnsignSmallInt = Marshal.AllocHGlobal(usmallSize);
Marshal.Copy(uSmallIntByteArr, 0, uManageUnsignSmallInt, uSmallIntByteArr.Length);
IntPtr c_unsigned_smallint = Marshal.AllocHGlobal(usmallSize);
Marshal.Copy(uSmallIntByteArr, 0, c_unsigned_smallint, uSmallIntByteArr.Length);
int length = sizeof(UInt16);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_USMALLINT;
bind.buffer = uManageUnsignSmallInt;
bind.buffer = c_unsigned_smallint;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -159,19 +159,19 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
byte[] uManageIntByteArr = BitConverter.GetBytes(val);
int usmallSize = Marshal.SizeOf(uManageIntByteArr[0]) * uManageIntByteArr.Length;
IntPtr uManageInt = Marshal.AllocHGlobal(usmallSize);
Marshal.Copy(uManageIntByteArr, 0, uManageInt, uManageIntByteArr.Length);
byte[] byteArr = BitConverter.GetBytes(val);
int usmallSize = Marshal.SizeOf(byteArr[0]) * byteArr.Length;
IntPtr c_unsigned_int = Marshal.AllocHGlobal(usmallSize);
Marshal.Copy(byteArr, 0, c_unsigned_int, byteArr.Length);
int length = sizeof(uint);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_UINT;
bind.buffer = uManageInt;
bind.buffer = c_unsigned_int;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -181,19 +181,19 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
byte[] uManageBigIntByteArr = BitConverter.GetBytes(val);
int usmallSize = Marshal.SizeOf(uManageBigIntByteArr[0]) * uManageBigIntByteArr.Length;
IntPtr uManageBigInt = Marshal.AllocHGlobal(usmallSize);
Marshal.Copy(uManageBigIntByteArr, 0, uManageBigInt, uManageBigIntByteArr.Length);
byte[] byteArr = BitConverter.GetBytes(val);
int usmallSize = Marshal.SizeOf(byteArr[0]) * byteArr.Length;
IntPtr c_unsigned_bigint = Marshal.AllocHGlobal(usmallSize);
Marshal.Copy(byteArr, 0, c_unsigned_bigint, byteArr.Length);
int length = sizeof(ulong);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_UBIGINT;
bind.buffer = uManageBigInt;
bind.buffer = c_unsigned_bigint;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -203,19 +203,19 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
byte[] floatByteArr = BitConverter.GetBytes(val);
int floatByteArrSize = Marshal.SizeOf(floatByteArr[0]) * floatByteArr.Length;
IntPtr uManageFloat = Marshal.AllocHGlobal(floatByteArrSize);
Marshal.Copy(floatByteArr, 0, uManageFloat, floatByteArr.Length);
byte[] byteArr = BitConverter.GetBytes(val);
int floatByteArrSize = Marshal.SizeOf(byteArr[0]) * byteArr.Length;
IntPtr c_float = Marshal.AllocHGlobal(floatByteArrSize);
Marshal.Copy(byteArr, 0, c_float, byteArr.Length);
int length = sizeof(float);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_FLOAT;
bind.buffer = uManageFloat;
bind.buffer = c_float;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -225,19 +225,19 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
byte[] doubleByteArr = BitConverter.GetBytes(val);
int doubleByteArrSize = Marshal.SizeOf(doubleByteArr[0]) * doubleByteArr.Length;
IntPtr uManageDouble = Marshal.AllocHGlobal(doubleByteArrSize);
Marshal.Copy(doubleByteArr, 0, uManageDouble, doubleByteArr.Length);
byte[] byteArr = BitConverter.GetBytes(val);
int doubleByteArrSize = Marshal.SizeOf(byteArr[0]) * byteArr.Length;
IntPtr c_double = Marshal.AllocHGlobal(doubleByteArrSize);
Marshal.Copy(byteArr, 0, c_double, byteArr.Length);
int length = sizeof(Double);
IntPtr lengPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(sizeof(int));
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_DOUBLE;
bind.buffer = uManageDouble;
bind.buffer = c_double;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......@@ -247,17 +247,17 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
// IntPtr umanageBinary = Marshal.StringToHGlobalAnsi(val);
IntPtr umanageBinary = Marshal.StringToCoTaskMemUTF8(val);
// IntPtr unmanagedBinary = Marshal.StringToHGlobalAnsi(val);
IntPtr c_str = Marshal.StringToCoTaskMemUTF8(val);
var strToBytes = System.Text.Encoding.UTF8.GetBytes(val);
int leng = strToBytes.Length;
int length = strToBytes.Length;
IntPtr lenPtr = Marshal.AllocHGlobal(sizeof(ulong));
Marshal.WriteInt64(lenPtr, leng);
Marshal.WriteInt64(lenPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_BINARY;
bind.buffer = umanageBinary;
bind.buffer_length = leng;
bind.buffer = c_str;
bind.buffer_length = length;
bind.length = lenPtr;
bind.is_null = IntPtr.Zero;
......@@ -267,17 +267,17 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
var strToBytes = System.Text.Encoding.UTF8.GetBytes(val);
// IntPtr umanageNchar = (IntPtr)Marshal.StringToHGlobalAnsi(val);
IntPtr umanageNchar = (IntPtr)Marshal.StringToCoTaskMemUTF8(val);
// IntPtr unmanagedNchar = (IntPtr)Marshal.StringToHGlobalAnsi(val);
IntPtr c_str = (IntPtr)Marshal.StringToCoTaskMemUTF8(val);
int leng = strToBytes.Length;
int length = strToBytes.Length;
IntPtr lenPtr = Marshal.AllocHGlobal(sizeof(ulong));
Marshal.WriteInt64(lenPtr, leng);
Marshal.WriteInt64(lenPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_NCHAR;
bind.buffer = umanageNchar;
bind.buffer_length = leng;
bind.buffer = c_str;
bind.buffer_length = length;
bind.length = lenPtr;
bind.is_null = IntPtr.Zero;
......@@ -301,17 +301,17 @@ namespace TDengineDriver
{
TAOS_BIND bind = new TAOS_BIND();
IntPtr uManageTs = Marshal.AllocHGlobal(sizeof(long));
Marshal.WriteInt64(uManageTs, ts);
IntPtr c_long = Marshal.AllocHGlobal(sizeof(long));
Marshal.WriteInt64(c_long, ts);
int length = sizeof(long);
IntPtr lengPtr = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(lengPtr, length);
IntPtr lengthPtr = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(lengthPtr, length);
bind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_TIMESTAMP;
bind.buffer = uManageTs;
bind.buffer = c_long;
bind.buffer_length = length;
bind.length = lengPtr;
bind.length = lengthPtr;
bind.is_null = IntPtr.Zero;
return bind;
......
......@@ -17,7 +17,7 @@ namespace TDengineDriver
int byteSize = sizeof(byte);
//TAOS_MULTI_BIND.buffer
IntPtr unmanagedBoolArr = Marshal.AllocHGlobal(elementCount * typeSize);
IntPtr c_bool_ptr = Marshal.AllocHGlobal(elementCount * typeSize);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -26,7 +26,7 @@ namespace TDengineDriver
for (int i = 0; i < elementCount; i++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteByte(unmanagedBoolArr, typeSize * i, Convert.ToByte(arr[i] ?? false));
Marshal.WriteByte(c_bool_ptr, typeSize * i, Convert.ToByte(arr[i] ?? false));
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
//set TAOS_MULTI_BIND.is_null
......@@ -34,7 +34,7 @@ namespace TDengineDriver
}
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_BOOL;
multiBind.buffer = unmanagedBoolArr;
multiBind.buffer = c_bool_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -53,7 +53,7 @@ namespace TDengineDriver
int intSize = sizeof(int);
//TAOS_MULTI_BIND.buffer
IntPtr unmanagedTintIntArr = Marshal.AllocHGlobal(elementCount);
IntPtr c_tinyint_ptr = Marshal.AllocHGlobal(elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -64,7 +64,7 @@ namespace TDengineDriver
Byte[] toByteArr = BitConverter.GetBytes(arr[i] ?? sbyte.MinValue);
//set TAOS_MULTI_BIND.buffer
Marshal.WriteByte(unmanagedTintIntArr, typeSize * i, toByteArr[0]);
Marshal.WriteByte(c_tinyint_ptr, typeSize * i, toByteArr[0]);
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
//set TAOS_MULTI_BIND.is_null
......@@ -73,7 +73,7 @@ namespace TDengineDriver
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_TINYINT;
multiBind.buffer = unmanagedTintIntArr;
multiBind.buffer = c_tinyint_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -92,7 +92,7 @@ namespace TDengineDriver
int byteSize = sizeof(byte);
//TAOS_MULTI_BIND.buffer
IntPtr unmanagedSmallIntArr = Marshal.AllocHGlobal(elementCount * typeSize);
IntPtr c_smallint_ptr = Marshal.AllocHGlobal(elementCount * typeSize);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -101,7 +101,7 @@ namespace TDengineDriver
for (int i = 0; i < elementCount; i++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteInt16(unmanagedSmallIntArr, typeSize * i, arr[i] ?? short.MinValue);
Marshal.WriteInt16(c_smallint_ptr, typeSize * i, arr[i] ?? short.MinValue);
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
//set TAOS_MULTI_BIND.is_null
......@@ -110,7 +110,7 @@ namespace TDengineDriver
}
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_SMALLINT;
multiBind.buffer = unmanagedSmallIntArr;
multiBind.buffer = c_smallint_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -127,7 +127,7 @@ namespace TDengineDriver
int byteSize = sizeof(byte);
//TAOS_MULTI_BIND.buffer
IntPtr intBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_int_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -136,7 +136,7 @@ namespace TDengineDriver
for (int i = 0; i < elementCount; i++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteInt32(intBuff, typeSize * i, arr[i] ?? int.MinValue);
Marshal.WriteInt32(c_int_ptr, typeSize * i, arr[i] ?? int.MinValue);
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
//set TAOS_MULTI_BIND.is_null
......@@ -145,7 +145,7 @@ namespace TDengineDriver
}
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_INT;
multiBind.buffer = intBuff;
multiBind.buffer = c_int_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -162,7 +162,7 @@ namespace TDengineDriver
int byteSize = sizeof(byte);
//TAOS_MULTI_BIND.buffer
IntPtr intBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_long_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -171,7 +171,7 @@ namespace TDengineDriver
for (int i = 0; i < elementCount; i++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteInt64(intBuff, typeSize * i, arr[i] ?? long.MinValue);
Marshal.WriteInt64(c_long_ptr, typeSize * i, arr[i] ?? long.MinValue);
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
//set TAOS_MULTI_BIND.is_null
......@@ -181,7 +181,7 @@ namespace TDengineDriver
}
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_BIGINT;
multiBind.buffer = intBuff;
multiBind.buffer = c_long_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -200,7 +200,7 @@ namespace TDengineDriver
float[] arrTmp = new float[elementCount];
//TAOS_MULTI_BIND.buffer
IntPtr floatBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_float_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -216,11 +216,11 @@ namespace TDengineDriver
Marshal.WriteByte(nullArr, byteSize * i, Convert.ToByte(arr[i].Equals(null) ? 1 : 0));
}
//set TAOS_MULTI_BIND.buffer
Marshal.Copy(arrTmp, 0, floatBuff, elementCount);
Marshal.Copy(arrTmp, 0, c_float_ptr, elementCount);
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_FLOAT;
multiBind.buffer = floatBuff;
multiBind.buffer = c_float_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -239,7 +239,7 @@ namespace TDengineDriver
double[] arrTmp = new double[elementCount];
//TAOS_MULTI_BIND.buffer
IntPtr doubleBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_double_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -255,11 +255,11 @@ namespace TDengineDriver
Marshal.WriteByte(nullArr, byteSize * i, Convert.ToByte(arr[i].Equals(null) ? 1 : 0));
}
//set TAOS_MULTI_BIND.buffer
Marshal.Copy(arrTmp, 0, doubleBuff, elementCount);
Marshal.Copy(arrTmp, 0, c_double_ptr, elementCount);
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_DOUBLE;
multiBind.buffer = doubleBuff;
multiBind.buffer = c_double_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -277,7 +277,7 @@ namespace TDengineDriver
//used to replace null
//TAOS_MULTI_BIND.buffer
IntPtr uTinyIntBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_unsigned_tinyint_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -287,7 +287,7 @@ namespace TDengineDriver
for (int i = 0; i < elementCount; i++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteByte(uTinyIntBuff, typeSize * i, arr[i] ?? byte.MaxValue);
Marshal.WriteByte(c_unsigned_tinyint_ptr, typeSize * i, arr[i] ?? byte.MaxValue);
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
//set TAOS_MULTI_BIND.is_null
......@@ -297,7 +297,7 @@ namespace TDengineDriver
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_UTINYINT;
multiBind.buffer = uTinyIntBuff;
multiBind.buffer = c_unsigned_tinyint_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -315,7 +315,7 @@ namespace TDengineDriver
//used to replace null
//TAOS_MULTI_BIND.buffer
IntPtr uSmallIntBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_unsigned_smallint_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -328,7 +328,7 @@ namespace TDengineDriver
for (int j = 0; j < byteArr.Length; j++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteByte(uSmallIntBuff, typeSize * i + j * byteSize, byteArr[j]);
Marshal.WriteByte(c_unsigned_smallint_ptr, typeSize * i + j * byteSize, byteArr[j]);
}
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
......@@ -339,7 +339,7 @@ namespace TDengineDriver
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_USMALLINT;
multiBind.buffer = uSmallIntBuff;
multiBind.buffer = c_unsigned_smallint_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -357,7 +357,7 @@ namespace TDengineDriver
//used to replace null
//TAOS_MULTI_BIND.buffer
IntPtr uIntBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_unsigned_int_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -370,7 +370,7 @@ namespace TDengineDriver
for (int j = 0; j < byteArr.Length; j++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteByte(uIntBuff, typeSize * i + j * byteSize, byteArr[j]);
Marshal.WriteByte(c_unsigned_int_ptr, typeSize * i + j * byteSize, byteArr[j]);
}
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
......@@ -381,7 +381,7 @@ namespace TDengineDriver
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_UINT;
multiBind.buffer = uIntBuff;
multiBind.buffer = c_unsigned_int_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -399,7 +399,7 @@ namespace TDengineDriver
//used to replace null
//TAOS_MULTI_BIND.buffer
IntPtr uBigIntBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_unsigned_bigint_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -412,7 +412,7 @@ namespace TDengineDriver
for (int j = 0; j < byteArr.Length; j++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteByte(uBigIntBuff, typeSize * i + j * byteSize, byteArr[j]);
Marshal.WriteByte(c_unsigned_bigint_ptr, typeSize * i + j * byteSize, byteArr[j]);
}
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
......@@ -423,7 +423,7 @@ namespace TDengineDriver
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_UBIGINT;
multiBind.buffer = uBigIntBuff;
multiBind.buffer = c_unsigned_bigint_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -439,7 +439,7 @@ namespace TDengineDriver
//The size of the buffer is typeSize * elementCount
//This buffer is used to store TAOS_MULTI_BIND.buffer
int typeSize = MaxElementLength(arr);
//This intSize is used to calcuate buffer size of the struct TAOS_MULTI_BIND's
//This intSize is used to calculate buffer size of the struct TAOS_MULTI_BIND's
//length. The buffer is intSize * elementCount,which is used to store TAOS_MULTI_BIND.length
int intSize = sizeof(int);
//This byteSize is used to calculate the buffer size of the struct TAOS_MULTI_BIND.is_null
......@@ -452,7 +452,7 @@ namespace TDengineDriver
//TAOS_MULTI_BIND.is_null
IntPtr nullArr = Marshal.AllocHGlobal(byteSize * elementCount);
//TAOS_MULTI_BIND.buffer
IntPtr uNcharBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_char_prt = Marshal.AllocHGlobal(typeSize * elementCount);
for (int i = 0; i < elementCount; i++)
{
......@@ -464,7 +464,7 @@ namespace TDengineDriver
for (int j = 0; j < itemLength; j++)
{
//Read byte after byte
Marshal.WriteByte(uNcharBuff, i * typeSize + j, decodeByte[j]);
Marshal.WriteByte(c_char_prt, i * typeSize + j, decodeByte[j]);
}
}
//Set TAOS_MULTI_BIND.length
......@@ -474,7 +474,7 @@ namespace TDengineDriver
}
//Config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_BINARY;
multiBind.buffer = uNcharBuff;
multiBind.buffer = c_char_prt;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -491,7 +491,7 @@ namespace TDengineDriver
//The size of the buffer is typeSize * elementCount
//This buffer is used to store TAOS_MULTI_BIND.buffer
int typeSize = MaxElementLength(arr);
//This intSize is used to calcuate buffer size of the struct TAOS_MULTI_BIND's
//This intSize is used to calculate buffer size of the struct TAOS_MULTI_BIND's
//length. The buffer is intSize * elementCount,which is used to store TAOS_MULTI_BIND.length
int intSize = sizeof(int);
//This byteSize is used to calculate the buffer size of the struct TAOS_MULTI_BIND.is_null
......@@ -503,7 +503,7 @@ namespace TDengineDriver
//TAOS_MULTI_BIND.is_null
IntPtr nullArr = Marshal.AllocHGlobal(byteSize * elementCount);
//TAOS_MULTI_BIND.buffer
IntPtr uNcharBuff = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_char_prt = Marshal.AllocHGlobal(typeSize * elementCount);
for (int i = 0; i < elementCount; i++)
{
......@@ -515,7 +515,7 @@ namespace TDengineDriver
for (int j = 0; j < itemLength; j++)
{
//Read byte after byte
Marshal.WriteByte(uNcharBuff, i * typeSize + j, decodeByte[j]);
Marshal.WriteByte(c_char_prt, i * typeSize + j, decodeByte[j]);
}
}
//Set TAOS_MULTI_BIND.length
......@@ -525,7 +525,7 @@ namespace TDengineDriver
}
//Config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_NCHAR;
multiBind.buffer = uNcharBuff;
multiBind.buffer = c_char_prt;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......@@ -542,7 +542,7 @@ namespace TDengineDriver
int intSize = sizeof(int);
int byteSize = sizeof(byte);
//TAOS_MULTI_BIND.buffer
IntPtr unmanagedTsArr = Marshal.AllocHGlobal(typeSize * elementCount);
IntPtr c_long_ptr = Marshal.AllocHGlobal(typeSize * elementCount);
//TAOS_MULTI_BIND.length
IntPtr lengthArr = Marshal.AllocHGlobal(intSize * elementCount);
//TAOS_MULTI_BIND.is_null
......@@ -551,7 +551,7 @@ namespace TDengineDriver
for (int i = 0; i < elementCount; i++)
{
//set TAOS_MULTI_BIND.buffer
Marshal.WriteInt64(unmanagedTsArr, typeSize * i, arr[i]);
Marshal.WriteInt64(c_long_ptr, typeSize * i, arr[i]);
//set TAOS_MULTI_BIND.length
Marshal.WriteInt32(lengthArr, intSize * i, typeSize);
//set TAOS_MULTI_BIND.is_null
......@@ -560,7 +560,7 @@ namespace TDengineDriver
//config TAOS_MULTI_BIND
multiBind.buffer_type = (int)TDengineDataType.TSDB_DATA_TYPE_TIMESTAMP;
multiBind.buffer = unmanagedTsArr;
multiBind.buffer = c_long_ptr;
multiBind.buffer_length = (ulong)typeSize;
multiBind.length = lengthArr;
multiBind.is_null = nullArr;
......
......@@ -116,7 +116,7 @@ namespace Test.UtilsTools.DataSource
}
// Get the tag data within and string list
// Which will be retrieved as a string List
private static List<String> GetTagCnData()
private static List<String> GetTagCNData()
{
List<String> tagData = new List<String>();
tagData.Add(true.ToString());
......@@ -136,7 +136,7 @@ namespace Test.UtilsTools.DataSource
}
// A line of data that's without CN character.
// Which is construct as an TAOS_BIND array
public static TAOS_BIND[] GetNtableCNRow()
public static TAOS_BIND[] GetNTableCNRow()
{
TAOS_BIND[] binds = new TAOS_BIND[15];
binds[0] = TaosBind.BindTimestamp(1637064040000);
......@@ -157,7 +157,7 @@ namespace Test.UtilsTools.DataSource
return binds;
}
//Get and list data that will be insert into table
public static List<String> GetNtableCNRowData()
public static List<String> GetNTableCNRowData()
{
var data = new List<string>{
"1637064040000",
......@@ -180,16 +180,16 @@ namespace Test.UtilsTools.DataSource
}
// Get the data value and tag values which have chinese characters
// And retrieved as a string list.This is single Line.
public static List<String> GetStableCNRowData()
public static List<String> GetSTableCNRowData()
{
List<String> columnData = GetNtableCNRowData();
List<String> tagData = GetTagCnData();
List<String> columnData = GetNTableCNRowData();
List<String> tagData = GetTagCNData();
columnData.AddRange(tagData);
return columnData;
}
// A line of data that's without CN character
public static TAOS_BIND[] GetNtableRow()
public static TAOS_BIND[] GetNTableRow()
{
TAOS_BIND[] binds = new TAOS_BIND[15];
binds[0] = TaosBind.BindTimestamp(1637064040000);
......@@ -209,8 +209,8 @@ namespace Test.UtilsTools.DataSource
binds[14] = TaosBind.BindNil();
return binds;
}
// A List of data ,use as expectResData. The value is equal to getNtableRow()
public static List<String> GetNtableRowData()
// A List of data ,use as expectResData. The value is equal to getNTableRow()
public static List<String> GetNTableRowData()
{
var data = new List<string>{
"1637064040000",
......@@ -232,7 +232,7 @@ namespace Test.UtilsTools.DataSource
return data;
}
// Five lines of data, that is construct as taos_mutli_bind array.
// Five lines of data, that is construct as taos_multi_bind array.
// There aren't any CN character
public static TAOS_MULTI_BIND[] GetMultiBindArr()
{
......@@ -280,8 +280,8 @@ namespace Test.UtilsTools.DataSource
}
return rowData;
}
// Five lines of data, that is construct as taos_mutli_bind array.
// There aren some CN characters and letters.
// Five lines of data, that is construct as taos_multi_bind array.
// There are some CN characters and letters.
public static TAOS_MULTI_BIND[] GetMultiBindCNArr()
{
TAOS_MULTI_BIND[] mBinds = new TAOS_MULTI_BIND[14];
......@@ -332,7 +332,7 @@ namespace Test.UtilsTools.DataSource
public static List<String> GetMultiBindStableCNRowData()
{
List<String> columnData = new List<string>();
List<String> tagData = GetTagCnData();
List<String> tagData = GetTagCNData();
for (int i = 0; i < tsArr.Length; i++)
{
columnData.Add(tsArr[i].ToString());
......@@ -371,18 +371,18 @@ namespace Test.UtilsTools.DataSource
TaosBind.FreeTaosBind(binds);
}
public static void FreeTaosMBind(TAOS_MULTI_BIND[] mbinds)
public static void FreeTaosMBind(TAOS_MULTI_BIND[] mBinds)
{
TaosMultiBind.FreeTaosBind(mbinds);
TaosMultiBind.FreeTaosBind(mBinds);
}
//Get the TDengineMeta list from the ddl either normal table or stable
public static List<TDengineMeta> GetMetaFromDLL(string dllStr)
public static List<TDengineMeta> GetMetaFromDDL(string dllStr)
{
var expectResMeta = new List<TDengineMeta>();
//"CREATE TABLE meters(ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS(location BINARY(30), groupId INT);";
int bracetInd = dllStr.IndexOf("(");
int bracketInd = dllStr.IndexOf("(");
//(ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT) TAGS(location BINARY(30), groupId INT);
string subDllStr = dllStr.Substring(bracetInd);
string subDllStr = dllStr.Substring(bracketInd);
String[] stableSeparators = new String[] { "tags", "TAGS" };
//(ts TIMESTAMP, current FLOAT, voltage INT, phase FLOAT)
......
......@@ -6,19 +6,19 @@ using Xunit;
using Test.UtilsTools.ResultSet;
namespace Cases
{
public class FetchFieldCases
public class FetchFieldsCases
{
/// <author>xiaolei</author>
/// <Name>FetchFieldCases.TestFetchFieldJsonTag</Name>
/// <Name>FetchFieldsCases.TestFetchFieldsJsonTag</Name>
/// <describe>test taos_fetch_fields(), check the meta data</describe>
/// <filename>TaosFeild.cs</filename>
/// <filename>FetchFields.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "FetchFieldCases.TestFetchFieldJsonTag()")]
public void TestFetchFieldJsonTag()
[Fact(DisplayName = "FetchFieldsCases.TestFetchFieldsJsonTag()")]
public void TestFetchFieldsJsonTag()
{
IntPtr conn = UtilsTools.TDConnection();
IntPtr _res = IntPtr.Zero;
string tableName = "fetchfeilds";
string tableName = "fetch_fields";
var expectResMeta = new List<TDengineMeta> {
UtilsTools.ConstructTDengineMeta("ts", "timestamp"),
UtilsTools.ConstructTDengineMeta("b", "bool"),
......
......@@ -7,15 +7,15 @@ using System.Collections.Generic;
using Test.UtilsTools.ResultSet;
namespace Cases
{
public class InsertCnCharacterCases
public class InsertCNCases
{
/// <author>xiaolei</author>
/// <Name>InsertCnCharacterCases.TestInsertCnToNtable</Name>
/// <describe>test insert Chinese character into normal table's nchar column</describe>
/// <Name>InsertCNCases.TestNTable</Name>
/// <describe>Test insert Chinese characters into normal table's nchar column</describe>
/// <filename>InsertCn.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "InsertCnCharacterCases.TestInsertCnToNtable()")]
public void TestInsertCnToNtable()
[Fact(DisplayName = "InsertCNCases.TestNTable()")]
public void TestNTable()
{
IntPtr conn = UtilsTools.TDConnection();
IntPtr _res = IntPtr.Zero;
......@@ -37,7 +37,7 @@ namespace Cases
String insertSql = UtilsTools.ConstructInsertSql(tableName, "", colData, null, 9);
String selectSql = "select * from " + tableName;
String dropSql = "drop table " + tableName;
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
UtilsTools.ExecuteUpdate(conn, dropTb);
UtilsTools.ExecuteUpdate(conn, createTb);
......@@ -64,12 +64,12 @@ namespace Cases
}
/// <author>xiaolei</author>
/// <Name>InsertCnCharacterCases.TestInsertCnToStable</Name>
/// <Name>InsertCNCases.TestSTable</Name>
/// <describe>test insert Chinese character into stable's nchar column,both tag and column</describe>
/// <filename>InsertCn.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "InsertCnCharacterCases.TestInsertCnToStable()")]
public void TestInsertCnToStable()
[Fact(DisplayName = "InsertCNCases.TestSTable()")]
public void TestSTable()
{
IntPtr conn = UtilsTools.TDConnection();
IntPtr _res = IntPtr.Zero;
......@@ -84,15 +84,15 @@ namespace Cases
1637064047000,8,"8&涛思数据taos",
1637064048000,9,"&涛思数据taos9"
};
var tagData = new List<Object>{1,"涛思数据",};
var tagData = new List<Object> { 1, "涛思数据", };
String dropTb = "drop table if exists " + tableName;
String createTb = $"create table {tableName} (ts timestamp,v4 int,blob nchar(200))tags(id int,name nchar(50));";
String insertSql = UtilsTools.ConstructInsertSql(tableName+"_sub1", tableName, colData, tagData, 9);
String insertSql = UtilsTools.ConstructInsertSql(tableName + "_sub1", tableName, colData, tagData, 9);
String selectSql = "select * from " + tableName;
String dropSql = "drop table " + tableName;
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
List<Object> expectResData = UtilsTools.CombineColAndTagData(colData,tagData,9);
List<Object> expectResData = UtilsTools.CombineColAndTagData(colData, tagData, 9);
UtilsTools.ExecuteUpdate(conn, dropTb);
UtilsTools.ExecuteUpdate(conn, createTb);
......@@ -118,12 +118,12 @@ namespace Cases
}
/// <author>xiaolei</author>
/// <Name>InsertCnCharacterCases.TestInsertMutilCnToNtable</Name>
/// <Name>InsertCNCases.TestInsertMultiNTable</Name>
/// <describe>test insert Chinese character into normal table's multiple nchar columns</describe>
/// <filename>InsertCn.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "InsertCnCharacterCases.TestInsertMutilCnToNtable()")]
public void TestInsertMutilCnToNtable()
[Fact(DisplayName = "InsertCNCases.TestInsertMultiNTable()")]
public void TestInsertMultiNTable()
{
IntPtr conn = UtilsTools.TDConnection();
IntPtr _res = IntPtr.Zero;
......@@ -140,11 +140,11 @@ namespace Cases
};
String dropTb = "drop table if exists " + tableName;
String createTb = $"create table if not exists {tableName} (ts timestamp,v4 int,blob nchar(200),location nchar(200),city binary(100),coutry binary(200));";
String createTb = $"create table if not exists {tableName} (ts timestamp,v4 int,blob nchar(200),location nchar(200),city binary(100),country binary(200));";
String insertSql = UtilsTools.ConstructInsertSql(tableName, "", colData, null, 9);
String selectSql = "select * from " + tableName;
String dropSql = "drop table " + tableName;
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
UtilsTools.ExecuteUpdate(conn, dropTb);
UtilsTools.ExecuteUpdate(conn, createTb);
......@@ -168,16 +168,16 @@ namespace Cases
Assert.Equal(colData[i].ToString(), actualResData[i]);
}
}
/// <author>xiaolei</author>
/// <Name>InsertCnCharacterCases.TestInsertMutilCnToStable</Name>
/// <Name>InsertCNCases.TestInsertMultiSTable</Name>
/// <describe>test insert Chinese character into stable's multiple nchar columns</describe>
/// <filename>InsertCn.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "InsertCnCharacterCases.TestInsertMutilCnToStable()")]
public void TestInsertMutilCnToStable()
[Fact(DisplayName = "InsertCNCases.TestInsertMultiSTable()")]
public void TestInsertMultiSTable()
{
IntPtr conn = UtilsTools.TDConnection();
IntPtr conn = UtilsTools.TDConnection();
IntPtr _res = IntPtr.Zero;
string tableName = "cn_multi_insert_nchar_stable";
var colData = new List<Object>{1637064040000,1,"涛思数据","保利广场","Beijing","China",
......@@ -190,7 +190,7 @@ namespace Cases
1637064047000,8,"8&涛思数据taos","incluse阿斯顿发","NewYork","US",
1637064048000,9,"&涛思数据taos9","123黑化肥werq会挥……&¥%发!afsdfa","NewYork","US",
};
var tagData = new List<Object>{1,"涛思数据","中国北方&南方长江黄河!49wq","tdengine"};
var tagData = new List<Object> { 1, "涛思数据", "中国北方&南方长江黄河!49wq", "tdengine" };
String dropTb = "drop table if exists " + tableName;
String createTb = $"create table if not exists {tableName} (ts timestamp," +
$"v4 int," +
......@@ -203,12 +203,12 @@ namespace Cases
$"name nchar(50)," +
$"addr nchar(200)," +
$"en_name binary(200));";
String insertSql = UtilsTools.ConstructInsertSql(tableName+"_sub1", tableName, colData, tagData, 9);
String insertSql = UtilsTools.ConstructInsertSql(tableName + "_sub1", tableName, colData, tagData, 9);
String selectSql = "select * from " + tableName;
String dropSql = "drop table " + tableName;
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
List<Object> expectResData = UtilsTools.CombineColAndTagData(colData,tagData,9);
List<Object> expectResData = UtilsTools.CombineColAndTagData(colData, tagData, 9);
UtilsTools.ExecuteUpdate(conn, dropTb);
UtilsTools.ExecuteUpdate(conn, createTb);
......
using TDengineDriver;
using Test.UtilsTools;
using System;
using System.Runtime.InteropServices;
using Xunit;
using System.Collections.Generic;
using Test.UtilsTools.DataSource;
......@@ -47,7 +46,7 @@ namespace Cases
};
var tagData = new List<Object> { 1, "tag_one", "标签壹" };
String insertSql = UtilsTools.ConstructInsertSql(tableName + "_s01", tableName, colData, tagData, 3);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createSql);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<Object> expectResData = UtilsTools.CombineColAndTagData(colData, tagData, 3);
var querySql = $"select * from {tableName}";
......@@ -133,7 +132,7 @@ namespace Cases
var colDataActual = colData.GetRange(8, 8);
var tagData = new List<Object> { 1, "tag_one", "标签壹" };
String insertSql = UtilsTools.ConstructInsertSql(tableName + "_s01", tableName, colData, tagData, 3);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createSql);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<Object> expectResData = UtilsTools.CombineColAndTagData(colDataActual, tagData, 1);
colDataActual.ForEach((item) => { Console.Write("{0}\t", item); });
......@@ -228,7 +227,7 @@ namespace Cases
String insertSql1 = UtilsTools.ConstructInsertSql(tableName + "_s01", tableName, colData1, tagData1, 3);
String insertSql2 = UtilsTools.ConstructInsertSql(tableName + "_s02", tableName, colData1, tagData2, 3);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createSql);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<Object> expectResData = UtilsTools.CombineColAndTagData(colData1, tagData1, 3);
UtilsTools.ExecuteUpdate(conn, dropSql);
......
......@@ -10,14 +10,14 @@ namespace Cases
public class NormalTableStmtCases
{
/// <author>xiaolei</author>
/// <Name>NormalTableStmtCases.TestBindSingleLineCn</Name>
/// <Name>NormalTableStmtCases.TestBindSingleLineCN</Name>
/// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe>
/// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindSingleLineCn()")]
public void TestBindSingleLineCn()
[Fact(DisplayName = "NormalTableStmtCases.TestBindSingleLineCN()")]
public void TestBindSingleLineCN()
{
string tableName = "normal_tablestmt_cases_test_bind_single_line_cn";
string tableName = "ntb_stmt_cases_test_bind_single_line_cn";
String createTb = $"create table if not exists {tableName} (" +
"ts timestamp," +
"tt tinyint," +
......@@ -38,9 +38,9 @@ namespace Cases
string insertSql = "insert into ? values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
string dropSql = $"drop table if exists {tableName}";
string querySql = "select * from " + tableName;
TAOS_BIND[] _valuesRow = DataSource.GetNtableCNRow();
List<string> expectResData = DataSource.GetNtableCNRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
TAOS_BIND[] _valuesRow = DataSource.GetNTableCNRow();
List<string> expectResData = DataSource.GetNTableCNRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection();
UtilsTools.ExecuteUpdate(conn, dropSql);
......@@ -76,14 +76,14 @@ namespace Cases
}
/// <author>xiaolei</author>
/// <Name>NormalTableStmtCases.TestBindColumnCn</Name>
/// <Name>NormalTableStmtCases.TestBindColumnCN</Name>
/// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe>
/// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindColumnCn()")]
public void TestBindColumnCn()
[Fact(DisplayName = "NormalTableStmtCases.TestBindColumnCN()")]
public void TestBindColumnCN()
{
string tableName = "normal_tablestmt_cases_test_bind_column_cn";
string tableName = "ntb_stmt_cases_test_bind_column_cn";
String createTb = $"create table if not exists {tableName} " +
" (" +
"ts timestamp," +
......@@ -104,8 +104,8 @@ namespace Cases
String insertSql = "insert into ? values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName} ";
List<string> expectResData = DataSource.GetMultiBindCNRowData();
TAOS_MULTI_BIND[] mbind = DataSource.GetMultiBindCNArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
TAOS_MULTI_BIND[] mBind = DataSource.GetMultiBindCNArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection();
UtilsTools.ExecuteUpdate(conn, dropSql);
......@@ -115,26 +115,26 @@ namespace Cases
StmtUtilTools.StmtPrepare(stmt, insertSql);
StmtUtilTools.SetTableName(stmt, tableName);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[0], 0);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[1], 1);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[2], 2);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[3], 3);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[4], 4);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[5], 5);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[6], 6);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[7], 7);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[8], 8);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[9], 9);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[10], 10);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[11], 11);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[12], 12);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[13], 13);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[0], 0);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[1], 1);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[2], 2);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[3], 3);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[4], 4);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[5], 5);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[6], 6);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[7], 7);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[8], 8);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[9], 9);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[10], 10);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[11], 11);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[12], 12);
StmtUtilTools.BindSingleParamBatch(stmt, mBind[13], 13);
StmtUtilTools.AddBatch(stmt);
StmtUtilTools.StmtExecute(stmt);
StmtUtilTools.StmtClose(stmt);
DataSource.FreeTaosMBind(mbind);
DataSource.FreeTaosMBind(mBind);
string querySql = "select * from " + tableName;
IntPtr res = UtilsTools.ExecuteQuery(conn, querySql);
......@@ -158,15 +158,15 @@ namespace Cases
}
/// <author>xiaolei</author>
/// <Name>NormalTableStmtCases.TestBindMultiLineCn</Name>
/// <Name>NormalTableStmtCases.TestBindMultiLineCN</Name>
/// <describe>Test stmt insert single line of chinese character into normal table by column after column </describe>
/// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindMultiLineCn()")]
public void TestBindMultiLineCn()
[Fact(DisplayName = "NormalTableStmtCases.TestBindMultiLineCN()")]
public void TestBindMultiLineCN()
{
string tableName = "normal_tablestmt_cases_test_bind_multi_lines_cn";
TAOS_MULTI_BIND[] mbind = DataSource.GetMultiBindCNArr();
string tableName = "ntb_stmt_cases_test_bind_multi_lines_cn";
TAOS_MULTI_BIND[] mBind = DataSource.GetMultiBindCNArr();
String createTb = $"create table if not exists {tableName} " +
" (" +
"ts timestamp," +
......@@ -187,7 +187,7 @@ namespace Cases
String insertSql = "insert into ? values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName} ";
List<string> expectResData = DataSource.GetMultiBindCNRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection(); ;
UtilsTools.ExecuteUpdate(conn, dropSql);
......@@ -196,12 +196,12 @@ namespace Cases
IntPtr stmt = StmtUtilTools.StmtInit(conn);
StmtUtilTools.StmtPrepare(stmt, insertSql);
StmtUtilTools.SetTableName(stmt, tableName);
StmtUtilTools.BindParamBatch(stmt, mbind);
StmtUtilTools.BindParamBatch(stmt, mBind);
StmtUtilTools.AddBatch(stmt);
StmtUtilTools.StmtExecute(stmt);
StmtUtilTools.StmtClose(stmt);
DataSource.FreeTaosMBind(mbind);
DataSource.FreeTaosMBind(mBind);
string querySql = "select * from " + tableName;
IntPtr res = UtilsTools.ExecuteQuery(conn, querySql);
......@@ -228,13 +228,13 @@ namespace Cases
/// <author>xiaolei</author>
/// <Name>NormalTableStmtCases.TestBindSingleLine</Name>
/// <describe>Test stmt insert sinle line data into normal table</describe>
/// <describe>Test stmt insert single line data into normal table</describe>
/// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindSingleLine")]
public void TestBindSingleLine()
{
string tableName = "normal_tablestmt_cases_test_bind_single_line";
string tableName = "ntb_stmt_cases_test_bind_single_line";
String createTb = $"create table if not exists {tableName} (" +
"ts timestamp," +
"tt tinyint," +
......@@ -255,9 +255,9 @@ namespace Cases
string insertSql = "insert into ? values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
string dropSql = $"drop table if exists {tableName}";
string querySql = "select * from " + tableName;
TAOS_BIND[] valuesRow = DataSource.GetNtableRow();
List<string> expectResData = DataSource.GetNtableRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
TAOS_BIND[] valuesRow = DataSource.GetNTableRow();
List<string> expectResData = DataSource.GetNTableRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection();
UtilsTools.ExecuteQuery(conn, dropSql);
......@@ -296,7 +296,7 @@ namespace Cases
}
/// <author>xiaolei</author>
/// <Name>NtableMutipleLine.TestBindMultiLine</Name>
/// <Name>NTableMultipleLine.TestBindMultiLine</Name>
/// <describe>Test stmt insert multiple rows of data into normal table</describe>
/// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result>
......@@ -324,8 +324,8 @@ namespace Cases
String insertSql = "insert into ? values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName} ";
List<string> expectResData = DataSource.GetMultiBindResData();
TAOS_MULTI_BIND[] mbind = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
TAOS_MULTI_BIND[] mBind = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection();
UtilsTools.ExecuteUpdate(conn, dropSql);
......@@ -335,11 +335,11 @@ namespace Cases
IntPtr stmt = StmtUtilTools.StmtInit(conn);
StmtUtilTools.StmtPrepare(stmt, insertSql);
StmtUtilTools.SetTableName(stmt, tableName);
StmtUtilTools.BindParamBatch(stmt, mbind);
StmtUtilTools.BindParamBatch(stmt, mBind);
StmtUtilTools.AddBatch(stmt);
StmtUtilTools.StmtExecute(stmt);
StmtUtilTools.StmtClose(stmt);
DataSource.FreeTaosMBind(mbind);
DataSource.FreeTaosMBind(mBind);
string querySql = "select * from " + tableName;
IntPtr res = UtilsTools.ExecuteQuery(conn, querySql);
......@@ -365,14 +365,14 @@ namespace Cases
}
/// <author>xiaolei</author>
/// <Name>NtableColumnByColumn.TestBindColumnCn</Name>
/// <Name>NormalTableStmtCases.TestBindColumnCn</Name>
/// <describe>Test stmt insert multiple rows of data into normal table by column after column </describe>
/// <filename>StmtNormalTable.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "NormalTableStmtCases.TestBindColumn()")]
public void TestBindColumn()
{
string tableName = "normal_tablestmt_cases_test_bind_column_cn";
string tableName = "ntb_stmt_cases_test_bind_column_cn";
DataSource data = new DataSource();
String createTb = $"create table if not exists {tableName} " +
" (" +
......@@ -394,8 +394,8 @@ namespace Cases
String insertSql = "insert into ? values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName} ";
List<string> expectResData = DataSource.GetMultiBindResData();
TAOS_MULTI_BIND[] mbind = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createTb);
TAOS_MULTI_BIND[] mBinds = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createTb);
IntPtr conn = UtilsTools.TDConnection();
......@@ -406,26 +406,26 @@ namespace Cases
StmtUtilTools.StmtPrepare(stmt, insertSql);
StmtUtilTools.SetTableName(stmt, tableName);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[0], 0);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[1], 1);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[2], 2);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[3], 3);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[4], 4);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[5], 5);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[6], 6);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[7], 7);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[8], 8);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[9], 9);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[10], 10);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[11], 11);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[12], 12);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[13], 13);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[0], 0);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[1], 1);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[2], 2);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[3], 3);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[4], 4);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[5], 5);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[6], 6);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[7], 7);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[8], 8);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[9], 9);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[10], 10);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[11], 11);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[12], 12);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[13], 13);
StmtUtilTools.AddBatch(stmt);
StmtUtilTools.StmtExecute(stmt);
StmtUtilTools.StmtClose(stmt);
DataSource.FreeTaosMBind(mbind);
DataSource.FreeTaosMBind(mBinds);
string querySql = "select * from " + tableName;
IntPtr res = UtilsTools.ExecuteQuery(conn, querySql);
......
......@@ -5,7 +5,7 @@ using Test.UtilsTools.DataSource;
namespace Cases
{
public class StmtStableQuery
public class StmtSTableQuery
{
public void Test(IntPtr conn, string tableName)
{
......@@ -26,7 +26,7 @@ namespace Cases
}
}
public class StmtNtableQuery
public class StmtNTableQuery
{
public void Test(IntPtr conn, string tableName)
{
......
......@@ -11,14 +11,14 @@ namespace Cases
public class StableStmtCases
{
/// <author>xiaolei</author>
/// <Name>StableStmtCases.TestBindSingleLineCn</Name>
/// <Name>StableStmtCases.TestBindSingleLineCN</Name>
/// <describe>Test stmt insert single line of chinese character into stable by column after column </describe>
/// <filename>StmtSTable.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "StableStmtCases.TestBindSingleLineCn()")]
public void TestBindSingleLineCn()
[Fact(DisplayName = "StableStmtCases.TestBindSingleLineCN()")]
public void TestBindSingleLineCN()
{
string tableName = "stable_stmt_cases_test_bind_single_line_cn";
string tableName = "stb_stmt_cases_test_bind_single_line_cn";
String createSql = $"create stable if not exists {tableName} " +
" (ts timestamp," +
"v1 tinyint," +
......@@ -52,10 +52,10 @@ namespace Cases
");";
String insertSql = $"insert into ? using {tableName} tags(?,?,?,?,?,?,?,?,?,?,?,?,?) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName} ;";
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createSql);
List<String> expectResData = DataSource.GetStableCNRowData();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetSTableCNRowData();
TAOS_BIND[] tags = DataSource.GetCNTags();
TAOS_BIND[] binds = DataSource.GetNtableCNRow();
TAOS_BIND[] binds = DataSource.GetNTableCNRow();
IntPtr conn = UtilsTools.TDConnection();
UtilsTools.ExecuteUpdate(conn, dropSql);
......@@ -95,14 +95,14 @@ namespace Cases
}
/// <author>xiaolei</author>
/// <Name>StableStmtCases.TestBindColumnCn</Name>
/// <Name>StableStmtCases.TestBindColumnCN</Name>
/// <describe>Test stmt insert single line of chinese character into stable by column after column </describe>
/// <filename>StmtSTable.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "StableStmtCases.TestBindColumnCn()")]
public void TestBindColumnCn()
[Fact(DisplayName = "StableStmtCases.TestBindColumnCN()")]
public void TestBindColumnCN()
{
string tableName = "stable_stmt_cases_test_bindcolumn_cn";
string tableName = "stb_stmt_cases_test_bindcolumn_cn";
String createSql = $"create stable if not exists {tableName} " +
"(ts timestamp," +
"b bool," +
......@@ -137,8 +137,8 @@ namespace Cases
String insertSql = "insert into ? using " + tableName + " tags(?,?,?,?,?,?,?,?,?,?,?,?,?) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName};";
TAOS_BIND[] tags = DataSource.GetCNTags();
TAOS_MULTI_BIND[] mbind = DataSource.GetMultiBindCNArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createSql);
TAOS_MULTI_BIND[] mBinds = DataSource.GetMultiBindCNArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetMultiBindStableCNRowData();
IntPtr conn = UtilsTools.TDConnection();
......@@ -149,27 +149,27 @@ namespace Cases
StmtUtilTools.StmtPrepare(stmt, insertSql);
StmtUtilTools.SetTableNameTags(stmt, tableName + "_t1", tags);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[0], 0);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[1], 1);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[2], 2);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[3], 3);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[4], 4);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[5], 5);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[6], 6);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[7], 7);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[8], 8);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[9], 9);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[10], 10);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[11], 11);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[12], 12);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[13], 13);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[0], 0);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[1], 1);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[2], 2);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[3], 3);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[4], 4);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[5], 5);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[6], 6);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[7], 7);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[8], 8);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[9], 9);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[10], 10);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[11], 11);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[12], 12);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[13], 13);
StmtUtilTools.AddBatch(stmt);
StmtUtilTools.StmtExecute(stmt);
StmtUtilTools.StmtClose(stmt);
DataSource.FreeTaosBind(tags);
DataSource.FreeTaosMBind(mbind);
DataSource.FreeTaosMBind(mBinds);
string querySql = "select * from " + tableName;
IntPtr res = UtilsTools.ExecuteQuery(conn, querySql);
......@@ -195,14 +195,14 @@ namespace Cases
}
/// <author>xiaolei</author>
/// <Name>StableStmtCases.TestBindMultiLineCn</Name>
/// <Name>StableStmtCases.TestBindMultiLineCN</Name>
/// <describe>Test stmt insert single line of chinese character into stable by column after column </describe>
/// <filename>StmtSTable.cs</filename>
/// <result>pass or failed </result>
[Fact(DisplayName = "StableStmtCases.TestBindMultiLineCn()")]
public void TestBindMultiLineCn()
[Fact(DisplayName = "StableStmtCases.TestBindMultiLineCN()")]
public void TestBindMultiLineCN()
{
string tableName = "stable_stmt_cases_test_bind_multi_line_cn";
string tableName = "stb_stmt_cases_test_bind_multi_line_cn";
String createSql = $"create stable if not exists {tableName} " +
"(ts timestamp," +
"b bool," +
......@@ -237,8 +237,8 @@ namespace Cases
String insertSql = "insert into ? using " + tableName + " tags(?,?,?,?,?,?,?,?,?,?,?,?,?) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName};";
TAOS_BIND[] tags = DataSource.GetCNTags();
TAOS_MULTI_BIND[] mbind = DataSource.GetMultiBindCNArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createSql);
TAOS_MULTI_BIND[] mBinds = DataSource.GetMultiBindCNArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetMultiBindStableCNRowData();
IntPtr conn = UtilsTools.TDConnection();
......@@ -248,13 +248,13 @@ namespace Cases
IntPtr stmt = StmtUtilTools.StmtInit(conn);
StmtUtilTools.StmtPrepare(stmt, insertSql);
StmtUtilTools.SetTableNameTags(stmt, tableName + "_t1", tags);
StmtUtilTools.BindParamBatch(stmt, mbind);
StmtUtilTools.BindParamBatch(stmt, mBinds);
StmtUtilTools.AddBatch(stmt);
StmtUtilTools.StmtExecute(stmt);
StmtUtilTools.StmtClose(stmt);
DataSource.FreeTaosBind(tags);
DataSource.FreeTaosMBind(mbind);
DataSource.FreeTaosMBind(mBinds);
string querySql = "select * from " + tableName;
IntPtr res = UtilsTools.ExecuteQuery(conn, querySql);
......@@ -285,7 +285,7 @@ namespace Cases
[Fact(DisplayName = "StableStmtCases.TestBindMultiLine()")]
public void TestBindMultiLine()
{
string tableName = "stable_stmt_cases_test_bind_multi_line";
string tableName = "stb_stmt_cases_test_bind_multi_line";
string createSql = $"create stable if not exists {tableName} " +
"(ts timestamp," +
"b bool," +
......@@ -320,8 +320,8 @@ namespace Cases
String insertSql = "insert into ? using " + tableName + " tags(?,?,?,?,?,?,?,?,?,?,?,?,?) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName};";
TAOS_BIND[] tags = DataSource.GetTags();
TAOS_MULTI_BIND[] mbind = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createSql);
TAOS_MULTI_BIND[] mBinds = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetMultiBindStableRowData();
IntPtr conn = UtilsTools.TDConnection();
......@@ -331,13 +331,13 @@ namespace Cases
IntPtr stmt = StmtUtilTools.StmtInit(conn);
StmtUtilTools.StmtPrepare(stmt, insertSql);
StmtUtilTools.SetTableNameTags(stmt, tableName + "_t1", tags);
StmtUtilTools.BindParamBatch(stmt, mbind);
StmtUtilTools.BindParamBatch(stmt, mBinds);
StmtUtilTools.AddBatch(stmt);
StmtUtilTools.StmtExecute(stmt);
StmtUtilTools.StmtClose(stmt);
DataSource.FreeTaosBind(tags);
DataSource.FreeTaosMBind(mbind);
DataSource.FreeTaosMBind(mBinds);
string querySql = "select * from " + tableName;
IntPtr res = UtilsTools.ExecuteQuery(conn, querySql);
......@@ -373,7 +373,7 @@ namespace Cases
[Fact(DisplayName = "StableStmtCases.TestBindColumn()")]
public void TestBindColumn()
{
string tableName = "stable_stmt_cases_test_bindcolumn";
string tableName = "stb_stmt_cases_test_bindcolumn";
string createSql = $"create stable if not exists {tableName} " +
"(ts timestamp," +
"b bool," +
......@@ -408,8 +408,8 @@ namespace Cases
String insertSql = "insert into ? using " + tableName + " tags(?,?,?,?,?,?,?,?,?,?,?,?,?) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
String dropSql = $"drop table if exists {tableName};";
TAOS_BIND[] tags = DataSource.GetTags();
TAOS_MULTI_BIND[] mbind = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDLL(createSql);
TAOS_MULTI_BIND[] mBinds = DataSource.GetMultiBindArr();
List<TDengineMeta> expectResMeta = DataSource.GetMetaFromDDL(createSql);
List<String> expectResData = DataSource.GetMultiBindStableRowData();
IntPtr conn = UtilsTools.TDConnection();
......@@ -420,27 +420,27 @@ namespace Cases
StmtUtilTools.StmtPrepare(stmt, insertSql);
StmtUtilTools.SetTableNameTags(stmt, tableName + "_t1", tags);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[0], 0);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[1], 1);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[2], 2);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[3], 3);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[4], 4);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[5], 5);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[6], 6);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[7], 7);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[8], 8);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[9], 9);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[10], 10);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[11], 11);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[12], 12);
StmtUtilTools.BindSingleParamBatch(stmt, mbind[13], 13);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[0], 0);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[1], 1);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[2], 2);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[3], 3);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[4], 4);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[5], 5);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[6], 6);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[7], 7);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[8], 8);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[9], 9);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[10], 10);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[11], 11);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[12], 12);
StmtUtilTools.BindSingleParamBatch(stmt, mBinds[13], 13);
StmtUtilTools.AddBatch(stmt);
StmtUtilTools.StmtExecute(stmt);
StmtUtilTools.StmtClose(stmt);
DataSource.FreeTaosBind(tags);
DataSource.FreeTaosMBind(mbind);
DataSource.FreeTaosMBind(mBinds);
string querySql = "select * from " + tableName;
IntPtr res = UtilsTools.ExecuteQuery(conn, querySql);
......
using System;
using TDengineDriver;
using System.Runtime.InteropServices;
using System.Text;
using System.Collections.Generic;
namespace Test.UtilsTools.ResultSet
{
......@@ -17,10 +15,10 @@ namespace Test.UtilsTools.ResultSet
resultData = UtilsTools.GetResData(res);
}
public ResultSet(List<TDengineMeta> metas, List<String> datas)
public ResultSet(List<TDengineMeta> meta, List<String> data)
{
resultMeta = metas;
resultData = datas;
resultMeta = meta;
resultData = data;
}
public List<String> GetResultData()
......@@ -35,5 +33,4 @@ namespace Test.UtilsTools.ResultSet
}
}
\ No newline at end of file
......@@ -31,12 +31,12 @@ namespace XUnit.Case.Orderers
yield return testCase;
}
}
private static TValue GetOrCreate<TKey, TValue>(
IDictionary<TKey, TValue> dictionary, TKey key)
where TKey : struct
where TValue : new() =>
dictionary.TryGetValue(key, out TValue? result)
dictionary.TryGetValue(key, out TValue result)
? result
: (dictionary[key] = new TValue());
}
......
......@@ -14,11 +14,11 @@ namespace Test.UtilsTools
static string password = "taosdata";
static string db = "";
static short port = 0;
//get a tdengine connection
//get a TDengine connection
public static IntPtr TDConnection()
{
TDengine.Options((int)TDengineInitOption.TDDB_OPTION_CONFIGDIR, GetConfigPath());
TDengine.Options((int)TDengineInitOption.TDDB_OPTION_SHELL_ACTIVITY_TIMER, "60");
TDengine.Options((int)TDengineInitOption.TSDB_OPTION_CONFIGDIR, GetConfigPath());
TDengine.Options((int)TDengineInitOption.TSDB_OPTION_SHELL_ACTIVITY_TIMER, "60");
TDengine.Init();
IntPtr conn = TDengine.Connect(ip, user, password, db, port);
// UtilsTools.ExecuteUpdate(conn, "drop database if exists csharp");
......@@ -99,16 +99,16 @@ namespace Test.UtilsTools
ExitProgram();
}
List<TDengineMeta> metas = GetResField(res);
int fieldCount = metas.Count;
List<TDengineMeta> metaList = GetResField(res);
int fieldCount = metaList.Count;
IntPtr rowdata;
List<string> datas = QueryRes(res, metas);
for (int i = 0; i < metas.Count; i++)
List<string> dataList = QueryRes(res, metaList);
for (int i = 0; i < metaList.Count; i++)
{
for (int j = 0; j < datas.Count; j++)
for (int j = 0; j < dataList.Count; j++)
{
Console.Write(" {0} \t|", datas[j]);
Console.Write(" {0} \t|", dataList[j]);
}
Console.WriteLine("");
}
......@@ -125,10 +125,10 @@ namespace Test.UtilsTools
ExitProgram();
}
List<TDengineMeta> metas = GetResField(res);
List<TDengineMeta> metaList = GetResField(res);
result.Add(colName);
dataRaw = QueryRes(res, metas);
dataRaw = QueryRes(res, metaList);
result.Add(dataRaw);
if (TDengine.ErrorNo(res) != 0)
......@@ -159,7 +159,7 @@ namespace Test.UtilsTools
{
if (TDengine.Close(conn) == 0)
{
Console.WriteLine("close connection sucess");
Console.WriteLine("close connection success");
}
else
{
......@@ -169,8 +169,8 @@ namespace Test.UtilsTools
}
public static List<TDengineMeta> GetResField(IntPtr res)
{
List<TDengineMeta> metas = TDengine.FetchFields(res);
return metas;
List<TDengineMeta> metaList = TDengine.FetchFields(res);
return metaList;
}
public static void AssertEqual(string expectVal, string actualVal)
{
......@@ -274,11 +274,11 @@ namespace Test.UtilsTools
return _meta;
}
private static List<string> QueryRes(IntPtr res, List<TDengineMeta> metas)
private static List<string> QueryRes(IntPtr res, List<TDengineMeta> meta)
{
IntPtr taosRow;
List<string> dataRaw = new List<string>();
int fieldCount = metas.Count;
int fieldCount = meta.Count;
while ((taosRow = TDengine.FetchRows(res)) != IntPtr.Zero)
{
dataRaw.AddRange(FetchRow(taosRow, res));
......@@ -294,7 +294,7 @@ namespace Test.UtilsTools
// Generate insert sql for the with the coldata and tag data
public static string ConstructInsertSql(string table, string stable, List<Object> colData, List<Object> tagData, int numOfRows)
{
int numofFileds = colData.Count / numOfRows;
int numOfFields = colData.Count / numOfRows;
StringBuilder insertSql;
if (stable == "")
......@@ -339,7 +339,7 @@ namespace Test.UtilsTools
insertSql.Append(colData[i]);
}
if ((i + 1) % numofFileds == 0 && (i + 1) != colData.Count)
if ((i + 1) % numOfFields == 0 && (i + 1) != colData.Count)
{
insertSql.Append(")(");
}
......@@ -500,8 +500,8 @@ namespace Test.UtilsTools
{
ExitProgram();
}
List<TDengineMeta> metas = GetResField(res);
dataRaw = QueryRes(res, metas);
List<TDengineMeta> meta = GetResField(res);
dataRaw = QueryRes(res, meta);
return dataRaw;
}
}
......
......@@ -8,7 +8,7 @@ namespace TDengineDriver.Test
{
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameBool</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's bool meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's bool meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -24,7 +24,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameTINYINT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's TinnyInt's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's TinnyInt's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -40,7 +40,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameSMALLINT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's SMALLINT's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's SMALLINT's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -56,7 +56,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameINT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's INT's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's INT's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -72,7 +72,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameBIGINT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's BIGINT's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's BIGINT's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -88,7 +88,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameUTINYINT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's TINYINT UNSIGNED's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's TINYINT UNSIGNED's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -104,7 +104,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameUSMALLINT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's SMALLINT UNSIGNED's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's SMALLINT UNSIGNED's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -120,7 +120,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameUINT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's INT UNSIGNED's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's INT UNSIGNED's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -136,7 +136,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameUBIGINT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's BIGINT UNSIGNED's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's BIGINT UNSIGNED's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -152,7 +152,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameFLOAT</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's FLOAT's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's FLOAT's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -168,7 +168,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameDOUBLE</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's DOUBLE's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's DOUBLE's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -184,7 +184,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameSTRING</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's BINARY's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's BINARY's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -200,7 +200,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameTIMESTAMP</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's TIMESTAMP's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's TIMESTAMP's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -216,7 +216,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameNCHAR</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's NCHAR's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's NCHAR's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......@@ -232,7 +232,7 @@ namespace TDengineDriver.Test
}
/// <author>xiaolei</author>
/// <Name>TestTDengineMeta.TestTypeNameUndefined</Name>
/// <describe>Unit test for oject TDengineDriver.TDengineMeta's undefine's meta info</describe>
/// <describe>Unit test for object TDengineDriver.TDengineMeta's undefine's meta info</describe>
/// <filename>TestTDengineMeta.cs</filename>
/// <result>pass or failed </result>
[Fact]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册