zoukankan
html css js c++ java
获取最根级EDT类型名称
有时候需要修改某个扩展数据类型的属性,比如字段的长度等,这些属性只能在最根级的EDT类型上修改,所以需要找到最根级的EDT类型,这个小例子演示了如何根据当前表的字段获取其对应的最根级EDT类型。
//
Return the top extendtypeid,If error,return ''
static
ExtendedDataTypeName GetFinalExtendedType(TableId _tableId,FieldId _fieldId)
{
SysDictField dictField;
SysDictType dictType;
ExtendedTypeId tmpExtendTypeId;
ExtendedTypeId finalExtendTypeId;
ExtendedTypeId getNextExtendedTypeId(DictType _dictType)
{
;
if
(_dictType.extend())
return
_dictType.extend();
else
return
0
;
}
;
if
(_tableId
&&
_fieldId)
dictField
=
new
SysDictField(_tableId,_fieldId);
else
return
''
;
dictType
=
new
SysDictType(dictField.typeId());
if
(
!
dictType)
return
''
;
finalExtendTypeId
=
dictType.id();
while
(
true
)
{
tmpExtendTypeId
=
getNextExtendedTypeId(dictType);
//
if not '',find next extendTypeId
if
(tmpExtendTypeId)
{
finalExtendTypeId
=
tmpExtendTypeId;
dictType
=
new
DictType(finalExtendTypeId);
}
else
break
;
}
if
(finalExtendTypeId)
return
new
dictType(finalExtendTypeId).Name();
else
return
''
;
}
附件
是测试用例。
查看全文
相关阅读:
模板复习
[BZOJ4016][FJOI2014]最短路径树问题(dijkstra+点分治)
Stirling数,Bell数,Catalan数,Bernoulli数
[BZOJ2820]YY的GCD
[BZOJ2154]Crash的数字表格
[HAOI2011]Problem b&&[POI2007]Zap
[BZOJ2588][SPOJ10628]Count on a tree
[ONTAK2010]Peaks
[HNOI2010]弹飞绵羊
[HNOI2004]宠物收养所
原文地址:https://www.cnblogs.com/Farseer1215/p/885454.html
最新文章
自动化接口测试在饿了么的实践之路
360搜索招聘-高级测试、测试开发、大数据测试
360搜索招聘-高级测试、测试开发、大数据测试
济南day1
luogu P1704 寻找最优美做题曲线
51nod 1087 1 10 100 1000
luogu P1536 村村通
T9270 mjt树
10.26水题盛宴模拟赛
51nod 1003 阶乘后面0的数量
热门文章
51nod 1004 n^n的末位数字
51nod 1009 数字1的数量
51nod 1001 数组中和等于K的数对
[BZOJ4892][TJOI2017]DNA(后缀数组)
[BZOJ4887][TJOI2017]可乐(DP+矩阵快速幂)
[BZOJ4888][TJOI2017]异或和(树状数组)
[BZOJ4890][TJOI2017]城市(DP)
半平面交
斯坦纳树
[BZOJ3583]杰杰的女性朋友(矩阵快速幂)
Copyright © 2011-2022 走看看