-
Notifications
You must be signed in to change notification settings - Fork 0
/
b.go
45 lines (34 loc) · 911 Bytes
/
b.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* Copyright (c) 2000-2018, 达梦数据库有限公司.
* All rights reserved.
*/
package dm
type ArrayDescriptor struct {
m_typeDesc *TypeDescriptor
}
func newArrayDescriptor(fulName string, conn *Connection) (*ArrayDescriptor, error) {
ad := new(ArrayDescriptor)
if fulName == "" {
return nil, ECGO_INVALID_COMPLEX_TYPE_NAME.throw()
}
ad.m_typeDesc = newTypeDescriptorWithFulName(fulName, conn)
err := ad.m_typeDesc.parseDescByName()
if err != nil {
return nil, err
}
return ad, nil
}
func newArrayDescriptorByTypeDescriptor(desc *TypeDescriptor) *ArrayDescriptor {
ad := new(ArrayDescriptor)
ad.m_typeDesc = desc
return ad
}
func (ad *ArrayDescriptor) getMDesc() *TypeDescriptor {
return ad.m_typeDesc
}
func (ad *ArrayDescriptor) getItemDesc() *TypeDescriptor {
return ad.m_typeDesc.m_arrObj
}
func (ad *ArrayDescriptor) getLength() int {
return ad.m_typeDesc.m_length
}