From 697dab3e4e81466a8c7fa46b48a527523eb485b8 Mon Sep 17 00:00:00 2001 From: liutianqi Date: Sun, 28 Apr 2024 18:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=BE=BE=E6=A2=A6=E5=AE=98=E6=96=B9=E9=A9=B1=E5=8A=A8=E7=89=88?= =?UTF-8?q?=E6=9C=AC=20v20240326?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 支持在连接串上直接配置动态服务名,使用示例: dm://user:password@GroupName?GroupName=(host1:port1,host2:port2,...) Signed-off-by: liutianqi --- create.go | 6 +- dm.go | 33 +- dm8/CHANGELOG.md | 4 + dm8/VERSION | 6 +- dm8/a.go | 889 +++++++------- dm8/c.go | 536 ++++----- dm8/d.go | 260 ++-- dm8/e.go | 627 +++++----- dm8/f.go | 12 +- dm8/g.go | 25 +- dm8/h.go | 26 +- dm8/i.go | 148 +-- dm8/i18n/zm.go | 220 +++- dm8/j.go | 2 +- dm8/k.go | 42 +- dm8/l.go | 32 +- dm8/m.go | 548 +++++---- dm8/n.go | 120 +- dm8/o.go | 130 +- dm8/p.go | 50 +- dm8/parser/zu.go | 2 +- dm8/q.go | 636 +++++----- dm8/r.go | 16 +- dm8/security/zzi.go | 2 +- dm8/t.go | 6 +- dm8/u.go | 69 +- dm8/zc.go | 2 +- dm8/zi.go | 154 +-- dm8/zn.go | 28 +- dm8/zp.go | 16 +- dm8/zq.go | 2774 ++++++++++++++++++++++--------------------- dm8/zr.go | 54 +- dm8/zw.go | 89 +- dm8/zx.go | 12 +- dm8/zzk.go | 43 +- dm8/zzm.go | 161 +-- dm8/zzn.go | 14 +- dm8/zzo.go | 362 +++--- dm8/zzp.go | 146 +-- migrator.go | 259 +++- 40 files changed, 4587 insertions(+), 3974 deletions(-) diff --git a/create.go b/create.go index d3413c0..5705943 100644 --- a/create.go +++ b/create.go @@ -58,7 +58,7 @@ func Create(db *gorm.DB) { _, isZero := field.ValueOf(db.Statement.Context, db.Statement.ReflectValue) setIdentityInsert = !isZero case reflect.Slice, reflect.Array: - for i := 0; i < db.Statement.ReflectValue.Len(); i++ { + for i := 0; i < db.Statement.ReflectValue.Len(); { obj := db.Statement.ReflectValue.Index(i) if reflect.Indirect(obj).Kind() == reflect.Struct { _, isZero := field.ValueOf(db.Statement.Context, db.Statement.ReflectValue.Index(i)) @@ -66,6 +66,7 @@ func Create(db *gorm.DB) { } break } + default: } if setIdentityInsert && !db.DryRun && db.Error == nil { @@ -202,6 +203,7 @@ func Create(db *gorm.DB) { if isZero { _ = db.AddError(db.Statement.Schema.PrioritizedPrimaryField.Set(db.Statement.Context, db.Statement.ReflectValue, insertID)) } + default: } } } @@ -221,7 +223,7 @@ func MergeCreate(db *gorm.DB, onConflict clause.OnConflict, values clause.Values _, _ = db.Statement.WriteString(" FROM DUAL") } - _, _ = db.Statement.WriteString(`) AS"excluded" (`) + _, _ = db.Statement.WriteString(`) AS "excluded" (`) for idx, column := range values.Columns { if idx > 0 { _ = db.Statement.WriteByte(',') diff --git a/dm.go b/dm.go index a627d6f..825ffe6 100644 --- a/dm.go +++ b/dm.go @@ -1,8 +1,11 @@ +// 本方言包基于gorm v1.24.2开发,需要配合达梦数据库驱动使用 + package dameng import ( "database/sql" "fmt" + "strings" _ "github.com/godoes/gorm-dameng/dm8" // 引入dm数据库驱动包 "gorm.io/gorm" // 引入gorm v2包 @@ -35,6 +38,8 @@ var ( UpdateClauses = []string{"UPDATE", "SET", "WHERE", "ORDER BY", "LIMIT"} // DeleteClauses delete clauses DeleteClauses = []string{"DELETE", "FROM", "WHERE", "ORDER BY", "LIMIT"} + + defaultDatetimePrecision = 3 ) func Open(dsn string) gorm.Dialector { @@ -167,7 +172,7 @@ func (d Dialector) DataTypeOf(field *schema.Field) string { case schema.Bytes: return d.getSchemaBytesType(field) default: - return string(field.DataType) + return d.getSchemaCustomType(field) // what oracle do: //notNull, _ := field.TagSettings["NOT NULL"] //unique, _ := field.TagSettings["UNIQUE"] @@ -230,19 +235,19 @@ func (d Dialector) getSchemaStringType(field *schema.Field) string { } } - if size > 0 && size < 32768 { - // VARCHAR 可以指定一个不超过 32767 的正整数作为字节或字符长度 - if d.VarcharSizeIsCharLength { - return fmt.Sprintf("VARCHAR(%d CHAR)", size) // 字符长度(size * 4) - } - return fmt.Sprintf("VARCHAR(%d)", size) // 字节长度 - } else if size == 0 { + if size == 0 { if d.VarcharSizeIsCharLength { return "VARCHAR(8188 CHAR)" // 字符长度(8188 * 4) } return "VARCHAR" // 如果未指定长度,缺省为 8188 字节 - } else { + } else if size < 0 || size >= 32768 { return "CLOB" // 长度超过 32767,使用 CLOB(TEXT) + } else { + // VARCHAR 可以指定一个不超过 32767 的正整数作为字节或字符长度 + if d.VarcharSizeIsCharLength { + return fmt.Sprintf("VARCHAR(%d CHAR)", size) // 字符长度(size * 4) + } + return fmt.Sprintf("VARCHAR(%d)", size) // 字节长度 } } @@ -262,6 +267,16 @@ func (d Dialector) getSchemaBytesType(field *schema.Field) string { return "BLOB" } +func (d Dialector) getSchemaCustomType(field *schema.Field) string { + sqlType := string(field.DataType) + + if field.AutoIncrement && !strings.Contains(strings.ToLower(sqlType), " auto_increment") && !strings.Contains(strings.ToLower(sqlType), " identity") { + sqlType += " IDENTITY(1,1)" + } + + return sqlType +} + func (d Dialector) SavePoint(tx *gorm.DB, name string) error { return tx.Exec("SAVEPOINT " + name).Error } diff --git a/dm8/CHANGELOG.md b/dm8/CHANGELOG.md index 39d038b..5d9f822 100644 --- a/dm8/CHANGELOG.md +++ b/dm8/CHANGELOG.md @@ -2,6 +2,10 @@ *你可以在文件p.go中的发版标记里找到当前驱动的svn号 +## svn 16752 +支持在连接串上直接配置动态服务名,使用示例: +dm://user:password@GroupName?GroupName=(host1:port1,host2:port2,...) + ## svn 16505 新增连接串属性driverReconnect,配合doSwitch=1或2使用,表示连接重连是否使用驱动自身的重连机制,否则在连接失效时返回sql标准错误driver.ErrBadConn,由go来处理重连 diff --git a/dm8/VERSION b/dm8/VERSION index b9f0fae..8b408f0 100644 --- a/dm8/VERSION +++ b/dm8/VERSION @@ -1,3 +1,3 @@ -#8.1.3.12 -#2023.04.17 -#16532 +#8.1.3.140 +#2024.03.20 +#22766 diff --git a/dm8/a.go b/dm8/a.go index 3fd88cc..a546224 100644 --- a/dm8/a.go +++ b/dm8/a.go @@ -7,6 +7,7 @@ package dm8 import ( "bytes" + "context" "crypto/tls" "fmt" "net" @@ -18,94 +19,102 @@ import ( ) const ( - Dm_build_412 = 8192 - Dm_build_413 = 2 * time.Second + Dm_build_694 = 8192 + Dm_build_695 = 2 * time.Second ) -type dm_build_414 struct { - dm_build_415 *net.TCPConn - dm_build_416 *tls.Conn - dm_build_417 *Dm_build_78 - dm_build_418 *DmConnection - dm_build_419 security.Cipher - dm_build_420 bool - dm_build_421 bool - dm_build_422 *security.DhKey - - dm_build_423 bool - dm_build_424 string - dm_build_425 bool -} - -func dm_build_426(dm_build_427 *DmConnection) (*dm_build_414, error) { - dm_build_428, dm_build_429 := dm_build_431(dm_build_427.dmConnector.host+":"+strconv.Itoa(int(dm_build_427.dmConnector.port)), time.Duration(dm_build_427.dmConnector.socketTimeout)*time.Second) - if dm_build_429 != nil { - return nil, dm_build_429 +type dm_build_696 struct { + dm_build_697 net.Conn + dm_build_698 *tls.Conn + dm_build_699 *Dm_build_360 + dm_build_700 *DmConnection + dm_build_701 security.Cipher + dm_build_702 bool + dm_build_703 bool + dm_build_704 *security.DhKey + + dm_build_705 bool + dm_build_706 string + dm_build_707 bool +} + +func dm_build_708(dm_build_709 context.Context, dm_build_710 *DmConnection) (*dm_build_696, error) { + var dm_build_711 net.Conn + var dm_build_712 error + + dialsLock.RLock() + dm_build_713, dm_build_714 := dials[dm_build_710.dmConnector.dialName] + dialsLock.RUnlock() + if dm_build_714 { + dm_build_711, dm_build_712 = dm_build_713(dm_build_709, dm_build_710.dmConnector.host+":"+strconv.Itoa(int(dm_build_710.dmConnector.port))) + } else { + dm_build_711, dm_build_712 = dm_build_716(dm_build_710.dmConnector.host+":"+strconv.Itoa(int(dm_build_710.dmConnector.port)), time.Duration(dm_build_710.dmConnector.socketTimeout)*time.Second) + } + if dm_build_712 != nil { + return nil, dm_build_712 } - dm_build_430 := dm_build_414{} - dm_build_430.dm_build_415 = dm_build_428 - dm_build_430.dm_build_417 = Dm_build_81(Dm_build_696) - dm_build_430.dm_build_418 = dm_build_427 - dm_build_430.dm_build_420 = false - dm_build_430.dm_build_421 = false - dm_build_430.dm_build_423 = false - dm_build_430.dm_build_424 = "" - dm_build_430.dm_build_425 = false - dm_build_427.Access = &dm_build_430 + dm_build_715 := dm_build_696{} + dm_build_715.dm_build_697 = dm_build_711 + dm_build_715.dm_build_699 = Dm_build_363(Dm_build_981) + dm_build_715.dm_build_700 = dm_build_710 + dm_build_715.dm_build_702 = false + dm_build_715.dm_build_703 = false + dm_build_715.dm_build_705 = false + dm_build_715.dm_build_706 = "" + dm_build_715.dm_build_707 = false + dm_build_710.Access = &dm_build_715 - return &dm_build_430, nil + return &dm_build_715, nil } -func dm_build_431(dm_build_432 string, dm_build_433 time.Duration) (*net.TCPConn, error) { - dm_build_434, dm_build_435 := net.DialTimeout("tcp", dm_build_432, dm_build_433) - if dm_build_435 != nil { - return nil, ECGO_COMMUNITION_ERROR.addDetail("\tdial address: " + dm_build_432).throw() +func dm_build_716(dm_build_717 string, dm_build_718 time.Duration) (net.Conn, error) { + dm_build_719, dm_build_720 := net.DialTimeout("tcp", dm_build_717, dm_build_718) + if dm_build_720 != nil { + return &net.TCPConn{}, ECGO_COMMUNITION_ERROR.addDetail("\tdial address: " + dm_build_717).throw() } - if tcpConn, ok := dm_build_434.(*net.TCPConn); ok { + if tcpConn, ok := dm_build_719.(*net.TCPConn); ok { _ = tcpConn.SetKeepAlive(true) - _ = tcpConn.SetKeepAlivePeriod(Dm_build_413) + _ = tcpConn.SetKeepAlivePeriod(Dm_build_695) _ = tcpConn.SetNoDelay(true) - return tcpConn, nil } - - return nil, nil + return dm_build_719, nil } -func (dm_build_437 *dm_build_414) dm_build_436(dm_build_438 dm_build_817) bool { - var dm_build_439 = dm_build_437.dm_build_418.dmConnector.compress - if dm_build_438.dm_build_832() == Dm_build_724 || dm_build_439 == Dm_build_773 { +func (dm_build_722 *dm_build_696) dm_build_721(dm_build_723 dm_build_1102) bool { + var dm_build_724 = dm_build_722.dm_build_700.dmConnector.compress + if dm_build_723.dm_build_1117() == Dm_build_1009 || dm_build_724 == Dm_build_1058 { return false } - if dm_build_439 == Dm_build_771 { + if dm_build_724 == Dm_build_1056 { return true - } else if dm_build_439 == Dm_build_772 { - return !dm_build_437.dm_build_418.Local && dm_build_438.dm_build_830() > Dm_build_770 + } else if dm_build_724 == Dm_build_1057 { + return !dm_build_722.dm_build_700.Local && dm_build_723.dm_build_1115() > Dm_build_1055 } return false } -func (dm_build_441 *dm_build_414) dm_build_440(dm_build_442 dm_build_817) bool { - var dm_build_443 = dm_build_441.dm_build_418.dmConnector.compress - if dm_build_442.dm_build_832() == Dm_build_724 || dm_build_443 == Dm_build_773 { +func (dm_build_726 *dm_build_696) dm_build_725(dm_build_727 dm_build_1102) bool { + var dm_build_728 = dm_build_726.dm_build_700.dmConnector.compress + if dm_build_727.dm_build_1117() == Dm_build_1009 || dm_build_728 == Dm_build_1058 { return false } - if dm_build_443 == Dm_build_771 { + if dm_build_728 == Dm_build_1056 { return true - } else if dm_build_443 == Dm_build_772 { - return dm_build_441.dm_build_417.Dm_build_345(Dm_build_732) == 1 + } else if dm_build_728 == Dm_build_1057 { + return dm_build_726.dm_build_699.Dm_build_627(Dm_build_1017) == 1 } return false } -func (dm_build_445 *dm_build_414) dm_build_444(dm_build_446 dm_build_817) (err error) { +func (dm_build_730 *dm_build_696) dm_build_729(dm_build_731 dm_build_1102) (err error) { defer func() { if p := recover(); p != nil { if _, ok := p.(string); ok { @@ -116,61 +125,61 @@ func (dm_build_445 *dm_build_414) dm_build_444(dm_build_446 dm_build_817) (err e } }() - dm_build_448 := dm_build_446.dm_build_830() + dm_build_733 := dm_build_731.dm_build_1115() - if dm_build_448 > 0 { + if dm_build_733 > 0 { - if dm_build_445.dm_build_436(dm_build_446) { - var retBytes, err = Compress(dm_build_445.dm_build_417, Dm_build_725, int(dm_build_448), int(dm_build_445.dm_build_418.dmConnector.compressID)) + if dm_build_730.dm_build_721(dm_build_731) { + var retBytes, err = Compress(dm_build_730.dm_build_699, Dm_build_1010, int(dm_build_733), int(dm_build_730.dm_build_700.dmConnector.compressID)) if err != nil { return err } - dm_build_445.dm_build_417.Dm_build_92(Dm_build_725) + dm_build_730.dm_build_699.Dm_build_374(Dm_build_1010) - dm_build_445.dm_build_417.Dm_build_133(dm_build_448) + dm_build_730.dm_build_699.Dm_build_415(dm_build_733) - dm_build_445.dm_build_417.Dm_build_161(retBytes) + dm_build_730.dm_build_699.Dm_build_443(retBytes) - dm_build_446.dm_build_831(int32(len(retBytes)) + ULINT_SIZE) + dm_build_731.dm_build_1116(int32(len(retBytes)) + ULINT_SIZE) - dm_build_445.dm_build_417.Dm_build_265(Dm_build_732, 1) + dm_build_730.dm_build_699.Dm_build_547(Dm_build_1017, 1) } - if dm_build_445.dm_build_421 { - dm_build_448 = dm_build_446.dm_build_830() - var retBytes = dm_build_445.dm_build_419.Encrypt(dm_build_445.dm_build_417.Dm_build_372(Dm_build_725, int(dm_build_448)), true) + if dm_build_730.dm_build_703 { + dm_build_733 = dm_build_731.dm_build_1115() + var retBytes = dm_build_730.dm_build_701.Encrypt(dm_build_730.dm_build_699.Dm_build_654(Dm_build_1010, int(dm_build_733)), true) - dm_build_445.dm_build_417.Dm_build_92(Dm_build_725) + dm_build_730.dm_build_699.Dm_build_374(Dm_build_1010) - dm_build_445.dm_build_417.Dm_build_161(retBytes) + dm_build_730.dm_build_699.Dm_build_443(retBytes) - dm_build_446.dm_build_831(int32(len(retBytes))) + dm_build_731.dm_build_1116(int32(len(retBytes))) } } - if dm_build_445.dm_build_417.Dm_build_90() > Dm_build_697 { + if dm_build_730.dm_build_699.Dm_build_372() > Dm_build_982 { return ECGO_MSG_TOO_LONG.throw() } - dm_build_446.dm_build_826() - if dm_build_445.dm_build_679(dm_build_446) { - if dm_build_445.dm_build_416 != nil { - dm_build_445.dm_build_417.Dm_build_95(0) - if _, err := dm_build_445.dm_build_417.Dm_build_114(dm_build_445.dm_build_416); err != nil { + dm_build_731.dm_build_1111() + if dm_build_730.dm_build_964(dm_build_731) { + if dm_build_730.dm_build_698 != nil { + dm_build_730.dm_build_699.Dm_build_377(0) + if _, err := dm_build_730.dm_build_699.Dm_build_396(dm_build_730.dm_build_698); err != nil { return err } } } else { - dm_build_445.dm_build_417.Dm_build_95(0) - if _, err := dm_build_445.dm_build_417.Dm_build_114(dm_build_445.dm_build_415); err != nil { + dm_build_730.dm_build_699.Dm_build_377(0) + if _, err := dm_build_730.dm_build_699.Dm_build_396(dm_build_730.dm_build_697); err != nil { return err } } return nil } -func (dm_build_450 *dm_build_414) dm_build_449(dm_build_451 dm_build_817) (err error) { +func (dm_build_735 *dm_build_696) dm_build_734(dm_build_736 dm_build_1102) (err error) { defer func() { if p := recover(); p != nil { if _, ok := p.(string); ok { @@ -181,603 +190,603 @@ func (dm_build_450 *dm_build_414) dm_build_449(dm_build_451 dm_build_817) (err e } }() - dm_build_453 := int32(0) - if dm_build_450.dm_build_679(dm_build_451) { - if dm_build_450.dm_build_416 != nil { - dm_build_450.dm_build_417.Dm_build_92(0) - if _, err := dm_build_450.dm_build_417.Dm_build_108(dm_build_450.dm_build_416, Dm_build_725); err != nil { + dm_build_738 := int32(0) + if dm_build_735.dm_build_964(dm_build_736) { + if dm_build_735.dm_build_698 != nil { + dm_build_735.dm_build_699.Dm_build_374(0) + if _, err := dm_build_735.dm_build_699.Dm_build_390(dm_build_735.dm_build_698, Dm_build_1010); err != nil { return err } - dm_build_453 = dm_build_451.dm_build_830() - if dm_build_453 > 0 { - if _, err := dm_build_450.dm_build_417.Dm_build_108(dm_build_450.dm_build_416, int(dm_build_453)); err != nil { + dm_build_738 = dm_build_736.dm_build_1115() + if dm_build_738 > 0 { + if _, err := dm_build_735.dm_build_699.Dm_build_390(dm_build_735.dm_build_698, int(dm_build_738)); err != nil { return err } } } } else { - dm_build_450.dm_build_417.Dm_build_92(0) - if _, err := dm_build_450.dm_build_417.Dm_build_108(dm_build_450.dm_build_415, Dm_build_725); err != nil { + dm_build_735.dm_build_699.Dm_build_374(0) + if _, err := dm_build_735.dm_build_699.Dm_build_390(dm_build_735.dm_build_697, Dm_build_1010); err != nil { return err } - dm_build_453 = dm_build_451.dm_build_830() + dm_build_738 = dm_build_736.dm_build_1115() - if dm_build_453 > 0 { - if _, err := dm_build_450.dm_build_417.Dm_build_108(dm_build_450.dm_build_415, int(dm_build_453)); err != nil { + if dm_build_738 > 0 { + if _, err := dm_build_735.dm_build_699.Dm_build_390(dm_build_735.dm_build_697, int(dm_build_738)); err != nil { return err } } } - _ = dm_build_451.dm_build_827() + _ = dm_build_736.dm_build_1112() - dm_build_453 = dm_build_451.dm_build_830() - if dm_build_453 <= 0 { + dm_build_738 = dm_build_736.dm_build_1115() + if dm_build_738 <= 0 { return nil } - if dm_build_450.dm_build_421 { - eBytes := dm_build_450.dm_build_417.Dm_build_372(Dm_build_725, int(dm_build_453)) - dBytes, err := dm_build_450.dm_build_419.Decrypt(eBytes, true) + if dm_build_735.dm_build_703 { + eBytes := dm_build_735.dm_build_699.Dm_build_654(Dm_build_1010, int(dm_build_738)) + dBytes, err := dm_build_735.dm_build_701.Decrypt(eBytes, true) if err != nil { return err } - dm_build_450.dm_build_417.Dm_build_92(Dm_build_725) - dm_build_450.dm_build_417.Dm_build_161(dBytes) - dm_build_451.dm_build_831(int32(len(dBytes))) + dm_build_735.dm_build_699.Dm_build_374(Dm_build_1010) + dm_build_735.dm_build_699.Dm_build_443(dBytes) + dm_build_736.dm_build_1116(int32(len(dBytes))) } - if dm_build_450.dm_build_440(dm_build_451) { + if dm_build_735.dm_build_725(dm_build_736) { - dm_build_453 = dm_build_451.dm_build_830() - cBytes := dm_build_450.dm_build_417.Dm_build_372(Dm_build_725+ULINT_SIZE, int(dm_build_453-ULINT_SIZE)) - uBytes, err := UnCompress(cBytes, int(dm_build_450.dm_build_418.dmConnector.compressID)) + dm_build_738 = dm_build_736.dm_build_1115() + cBytes := dm_build_735.dm_build_699.Dm_build_654(Dm_build_1010+ULINT_SIZE, int(dm_build_738-ULINT_SIZE)) + uBytes, err := UnCompress(cBytes, int(dm_build_735.dm_build_700.dmConnector.compressID)) if err != nil { return err } - dm_build_450.dm_build_417.Dm_build_92(Dm_build_725) - dm_build_450.dm_build_417.Dm_build_161(uBytes) - dm_build_451.dm_build_831(int32(len(uBytes))) + dm_build_735.dm_build_699.Dm_build_374(Dm_build_1010) + dm_build_735.dm_build_699.Dm_build_443(uBytes) + dm_build_736.dm_build_1116(int32(len(uBytes))) } return nil } -func (dm_build_455 *dm_build_414) dm_build_454(dm_build_456 dm_build_817) (dm_build_457 interface{}, dm_build_458 error) { - if dm_build_455.dm_build_425 { +func (dm_build_740 *dm_build_696) dm_build_739(dm_build_741 dm_build_1102) (dm_build_742 interface{}, dm_build_743 error) { + if dm_build_740.dm_build_707 { return nil, ECGO_CONNECTION_CLOSED.throw() } - dm_build_459 := dm_build_455.dm_build_418 - dm_build_459.mu.Lock() - defer dm_build_459.mu.Unlock() - dm_build_458 = dm_build_456.dm_build_821(dm_build_456) - if dm_build_458 != nil { - return nil, dm_build_458 + dm_build_744 := dm_build_740.dm_build_700 + dm_build_744.mu.Lock() + defer dm_build_744.mu.Unlock() + dm_build_743 = dm_build_741.dm_build_1106(dm_build_741) + if dm_build_743 != nil { + return nil, dm_build_743 } - dm_build_458 = dm_build_455.dm_build_444(dm_build_456) - if dm_build_458 != nil { - return nil, dm_build_458 + dm_build_743 = dm_build_740.dm_build_729(dm_build_741) + if dm_build_743 != nil { + return nil, dm_build_743 } - dm_build_458 = dm_build_455.dm_build_449(dm_build_456) - if dm_build_458 != nil { - return nil, dm_build_458 + dm_build_743 = dm_build_740.dm_build_734(dm_build_741) + if dm_build_743 != nil { + return nil, dm_build_743 } - return dm_build_456.dm_build_825(dm_build_456) + return dm_build_741.dm_build_1110(dm_build_741) } -func (dm_build_461 *dm_build_414) dm_build_460() (*dm_build_1273, error) { +func (dm_build_746 *dm_build_696) dm_build_745() (*dm_build_1559, error) { - Dm_build_462 := dm_build_1279(dm_build_461) - _, dm_build_463 := dm_build_461.dm_build_454(Dm_build_462) - if dm_build_463 != nil { - return nil, dm_build_463 + Dm_build_747 := dm_build_1565(dm_build_746) + _, dm_build_748 := dm_build_746.dm_build_739(Dm_build_747) + if dm_build_748 != nil { + return nil, dm_build_748 } - return Dm_build_462, nil + return Dm_build_747, nil } -func (dm_build_465 *dm_build_414) dm_build_464() error { +func (dm_build_750 *dm_build_696) dm_build_749() error { - dm_build_466 := dm_build_1140(dm_build_465) - _, dm_build_467 := dm_build_465.dm_build_454(dm_build_466) - if dm_build_467 != nil { - return dm_build_467 + dm_build_751 := dm_build_1426(dm_build_750) + _, dm_build_752 := dm_build_750.dm_build_739(dm_build_751) + if dm_build_752 != nil { + return dm_build_752 } return nil } -func (dm_build_469 *dm_build_414) dm_build_468() error { +func (dm_build_754 *dm_build_696) dm_build_753() error { - var dm_build_470 *dm_build_1273 + var dm_build_755 *dm_build_1559 var err error - if dm_build_470, err = dm_build_469.dm_build_460(); err != nil { + if dm_build_755, err = dm_build_754.dm_build_745(); err != nil { return err } - if dm_build_469.dm_build_418.sslEncrypt == 2 { - if err = dm_build_469.dm_build_675(false); err != nil { + if dm_build_754.dm_build_700.sslEncrypt == 2 { + if err = dm_build_754.dm_build_960(false); err != nil { return ECGO_INIT_SSL_FAILED.addDetail("\n" + err.Error()).throw() } - } else if dm_build_469.dm_build_418.sslEncrypt == 1 { - if err = dm_build_469.dm_build_675(true); err != nil { + } else if dm_build_754.dm_build_700.sslEncrypt == 1 { + if err = dm_build_754.dm_build_960(true); err != nil { return ECGO_INIT_SSL_FAILED.addDetail("\n" + err.Error()).throw() } } - if dm_build_469.dm_build_421 || dm_build_469.dm_build_420 { - k, err := dm_build_469.dm_build_665() + if dm_build_754.dm_build_703 || dm_build_754.dm_build_702 { + k, err := dm_build_754.dm_build_950() if err != nil { return err } - sessionKey := security.ComputeSessionKey(k, dm_build_470.Dm_build_1277) - encryptType := dm_build_470.dm_build_1275 - hashType := int(dm_build_470.Dm_build_1276) + sessionKey := security.ComputeSessionKey(k, dm_build_755.Dm_build_1563) + encryptType := dm_build_755.dm_build_1561 + hashType := int(dm_build_755.Dm_build_1562) if encryptType == -1 { encryptType = security.DES_CFB } if hashType == -1 { hashType = security.MD5 } - err = dm_build_469.dm_build_668(encryptType, sessionKey, dm_build_469.dm_build_418.dmConnector.cipherPath, hashType) + err = dm_build_754.dm_build_953(encryptType, sessionKey, dm_build_754.dm_build_700.dmConnector.cipherPath, hashType) if err != nil { return err } } - if err := dm_build_469.dm_build_464(); err != nil { + if err := dm_build_754.dm_build_749(); err != nil { return err } return nil } -func (dm_build_473 *dm_build_414) Dm_build_472(dm_build_474 *DmStatement) error { - dm_build_475 := dm_build_1302(dm_build_473, dm_build_474) - _, dm_build_476 := dm_build_473.dm_build_454(dm_build_475) - if dm_build_476 != nil { - return dm_build_476 +func (dm_build_758 *dm_build_696) Dm_build_757(dm_build_759 *DmStatement) error { + dm_build_760 := dm_build_1588(dm_build_758, dm_build_759) + _, dm_build_761 := dm_build_758.dm_build_739(dm_build_760) + if dm_build_761 != nil { + return dm_build_761 } return nil } -func (dm_build_478 *dm_build_414) Dm_build_477(dm_build_479 int32) error { - dm_build_480 := dm_build_1312(dm_build_478, dm_build_479) - _, dm_build_481 := dm_build_478.dm_build_454(dm_build_480) - if dm_build_481 != nil { - return dm_build_481 +func (dm_build_763 *dm_build_696) Dm_build_762(dm_build_764 int32) error { + dm_build_765 := dm_build_1598(dm_build_763, dm_build_764) + _, dm_build_766 := dm_build_763.dm_build_739(dm_build_765) + if dm_build_766 != nil { + return dm_build_766 } return nil } -func (dm_build_483 *dm_build_414) Dm_build_482(dm_build_484 *DmStatement, dm_build_485 bool, dm_build_486 int16) (*execRetInfo, error) { - dm_build_487 := dm_build_1179(dm_build_483, dm_build_484, dm_build_485, dm_build_486) - dm_build_488, dm_build_489 := dm_build_483.dm_build_454(dm_build_487) - if dm_build_489 != nil { - return nil, dm_build_489 +func (dm_build_768 *dm_build_696) Dm_build_767(dm_build_769 *DmStatement, dm_build_770 bool, dm_build_771 int16) (*execRetInfo, error) { + dm_build_772 := dm_build_1465(dm_build_768, dm_build_769, dm_build_770, dm_build_771) + dm_build_773, dm_build_774 := dm_build_768.dm_build_739(dm_build_772) + if dm_build_774 != nil { + return nil, dm_build_774 } - return dm_build_488.(*execRetInfo), nil + return dm_build_773.(*execRetInfo), nil } -func (dm_build_491 *dm_build_414) Dm_build_490(dm_build_492 *DmStatement, dm_build_493 int16) (*execRetInfo, error) { - return dm_build_491.Dm_build_482(dm_build_492, false, Dm_build_777) +func (dm_build_776 *dm_build_696) Dm_build_775(dm_build_777 *DmStatement, _ int16) (*execRetInfo, error) { + return dm_build_776.Dm_build_767(dm_build_777, false, Dm_build_1062) } -func (dm_build_495 *dm_build_414) Dm_build_494(dm_build_496 *DmStatement, dm_build_497 []OptParameter) (*execRetInfo, error) { - dm_build_498, dm_build_499 := dm_build_495.dm_build_454(dm_build_920(dm_build_495, dm_build_496, dm_build_497)) - if dm_build_499 != nil { - return nil, dm_build_499 +func (dm_build_780 *dm_build_696) Dm_build_779(dm_build_781 *DmStatement, dm_build_782 []OptParameter) (*execRetInfo, error) { + dm_build_783, dm_build_784 := dm_build_780.dm_build_739(dm_build_1205(dm_build_780, dm_build_781, dm_build_782)) + if dm_build_784 != nil { + return nil, dm_build_784 } - return dm_build_498.(*execRetInfo), nil + return dm_build_783.(*execRetInfo), nil } -func (dm_build_501 *dm_build_414) Dm_build_500(dm_build_502 *DmStatement, dm_build_503 int16) (*execRetInfo, error) { - return dm_build_501.Dm_build_482(dm_build_502, true, dm_build_503) +func (dm_build_786 *dm_build_696) Dm_build_785(dm_build_787 *DmStatement, dm_build_788 int16) (*execRetInfo, error) { + return dm_build_786.Dm_build_767(dm_build_787, true, dm_build_788) } -func (dm_build_505 *dm_build_414) Dm_build_504(dm_build_506 *DmStatement, dm_build_507 [][]interface{}) (*execRetInfo, error) { - dm_build_508 := dm_build_952(dm_build_505, dm_build_506, dm_build_507) - dm_build_509, dm_build_510 := dm_build_505.dm_build_454(dm_build_508) - if dm_build_510 != nil { - return nil, dm_build_510 +func (dm_build_790 *dm_build_696) Dm_build_789(dm_build_791 *DmStatement, dm_build_792 [][]interface{}) (*execRetInfo, error) { + dm_build_793 := dm_build_1237(dm_build_790, dm_build_791, dm_build_792) + dm_build_794, dm_build_795 := dm_build_790.dm_build_739(dm_build_793) + if dm_build_795 != nil { + return nil, dm_build_795 } - return dm_build_509.(*execRetInfo), nil + return dm_build_794.(*execRetInfo), nil } -func (dm_build_512 *dm_build_414) Dm_build_511(dm_build_513 *DmStatement, dm_build_514 [][]interface{}, dm_build_515 bool) (*execRetInfo, error) { - var dm_build_516, dm_build_517 = 0, 0 - var dm_build_518 = len(dm_build_514) - var dm_build_519 [][]interface{} - var dm_build_520 = NewExceInfo() - dm_build_520.updateCounts = make([]int64, dm_build_518) - var dm_build_521 = false - for dm_build_516 < dm_build_518 { - for dm_build_517 = dm_build_516; dm_build_517 < dm_build_518; dm_build_517++ { - paramData := dm_build_514[dm_build_517] - bindData := make([]interface{}, dm_build_513.paramCount) - dm_build_521 = false - for iCol := 0; iCol < int(dm_build_513.paramCount); iCol++ { - if dm_build_513.bindParams[iCol].ioType == IO_TYPE_OUT { +func (dm_build_797 *dm_build_696) Dm_build_796(dm_build_798 *DmStatement, dm_build_799 [][]interface{}, dm_build_800 bool) (*execRetInfo, error) { + var dm_build_801, dm_build_802 = 0, 0 + var dm_build_803 = len(dm_build_799) + var dm_build_804 [][]interface{} + var dm_build_805 = NewExceInfo() + dm_build_805.updateCounts = make([]int64, dm_build_803) + var dm_build_806 = false + for dm_build_801 < dm_build_803 { + for dm_build_802 = dm_build_801; dm_build_802 < dm_build_803; dm_build_802++ { + paramData := dm_build_799[dm_build_802] + bindData := make([]interface{}, dm_build_798.paramCount) + dm_build_806 = false + for icol := 0; icol < int(dm_build_798.paramCount); icol++ { + if dm_build_798.bindParams[icol].ioType == IO_TYPE_OUT { continue } - if dm_build_512.dm_build_648(bindData, paramData, iCol) { - dm_build_521 = true + if dm_build_797.dm_build_933(bindData, paramData, icol) { + dm_build_806 = true break } } - if dm_build_521 { + if dm_build_806 { break } - dm_build_519 = append(dm_build_519, bindData) + dm_build_804 = append(dm_build_804, bindData) } - if dm_build_517 != dm_build_516 { - tmpExecInfo, err := dm_build_512.Dm_build_504(dm_build_513, dm_build_519) + if dm_build_802 != dm_build_801 { + tmpExecInfo, err := dm_build_797.Dm_build_789(dm_build_798, dm_build_804) if err != nil { return nil, err } - dm_build_519 = dm_build_519[0:0] - dm_build_520.union(tmpExecInfo, dm_build_516, dm_build_517-dm_build_516) + dm_build_804 = dm_build_804[0:0] + dm_build_805.union(tmpExecInfo, dm_build_801, dm_build_802-dm_build_801) } - if dm_build_517 < dm_build_518 { - tmpExecInfo, err := dm_build_512.Dm_build_522(dm_build_513, dm_build_514[dm_build_517], dm_build_515) + if dm_build_802 < dm_build_803 { + tmpExecInfo, err := dm_build_797.Dm_build_807(dm_build_798, dm_build_799[dm_build_802], dm_build_800) if err != nil { return nil, err } - dm_build_515 = true - dm_build_520.union(tmpExecInfo, dm_build_517, 1) + dm_build_800 = true + dm_build_805.union(tmpExecInfo, dm_build_802, 1) } - dm_build_516 = dm_build_517 + 1 + dm_build_801 = dm_build_802 + 1 } - for _, i := range dm_build_520.updateCounts { + for _, i := range dm_build_805.updateCounts { if i > 0 { - dm_build_520.updateCount += i + dm_build_805.updateCount += i } } - return dm_build_520, nil + return dm_build_805, nil } -func (dm_build_523 *dm_build_414) Dm_build_522(dm_build_524 *DmStatement, dm_build_525 []interface{}, dm_build_526 bool) (*execRetInfo, error) { +func (dm_build_808 *dm_build_696) Dm_build_807(dm_build_809 *DmStatement, dm_build_810 []interface{}, dm_build_811 bool) (*execRetInfo, error) { - var dm_build_527 = make([]interface{}, dm_build_524.paramCount) - for iCol := 0; iCol < int(dm_build_524.paramCount); iCol++ { - if dm_build_524.bindParams[iCol].ioType == IO_TYPE_OUT { + var dm_build_812 = make([]interface{}, dm_build_809.paramCount) + for icol := 0; icol < int(dm_build_809.paramCount); icol++ { + if dm_build_809.bindParams[icol].ioType == IO_TYPE_OUT { continue } - if dm_build_523.dm_build_648(dm_build_527, dm_build_525, iCol) { + if dm_build_808.dm_build_933(dm_build_812, dm_build_810, icol) { - if !dm_build_526 { - preExecute := dm_build_1168(dm_build_523, dm_build_524, dm_build_524.bindParams) - _, _ = dm_build_523.dm_build_454(preExecute) - dm_build_526 = true + if !dm_build_811 { + preExecute := dm_build_1454(dm_build_808, dm_build_809, dm_build_809.bindParams) + _, _ = dm_build_808.dm_build_739(preExecute) + dm_build_811 = true } - _ = dm_build_523.dm_build_654(dm_build_524, dm_build_524.bindParams[iCol], iCol, dm_build_525[iCol].(iOffRowBinder)) - dm_build_527[iCol] = ParamDataEnum_OFF_ROW + _ = dm_build_808.dm_build_939(dm_build_809, dm_build_809.bindParams[icol], icol, dm_build_810[icol].(iOffRowBinder)) + dm_build_812[icol] = ParamDataEnum_OFF_ROW } } - var dm_build_528 = make([][]interface{}, 1) - dm_build_528[0] = dm_build_527 + var dm_build_813 = make([][]interface{}, 1) + dm_build_813[0] = dm_build_812 - dm_build_529 := dm_build_952(dm_build_523, dm_build_524, dm_build_528) - dm_build_530, dm_build_531 := dm_build_523.dm_build_454(dm_build_529) - if dm_build_531 != nil { - return nil, dm_build_531 + dm_build_814 := dm_build_1237(dm_build_808, dm_build_809, dm_build_813) + dm_build_815, dm_build_816 := dm_build_808.dm_build_739(dm_build_814) + if dm_build_816 != nil { + return nil, dm_build_816 } - return dm_build_530.(*execRetInfo), nil + return dm_build_815.(*execRetInfo), nil } -func (dm_build_533 *dm_build_414) Dm_build_532(dm_build_534 *DmStatement, dm_build_535 int16) (*execRetInfo, error) { - dm_build_536 := dm_build_1155(dm_build_533, dm_build_534, dm_build_535) +func (dm_build_818 *dm_build_696) Dm_build_817(dm_build_819 *DmStatement, dm_build_820 int16) (*execRetInfo, error) { + dm_build_821 := dm_build_1441(dm_build_818, dm_build_819, dm_build_820) - dm_build_537, dm_build_538 := dm_build_533.dm_build_454(dm_build_536) - if dm_build_538 != nil { - return nil, dm_build_538 + dm_build_822, dm_build_823 := dm_build_818.dm_build_739(dm_build_821) + if dm_build_823 != nil { + return nil, dm_build_823 } - return dm_build_537.(*execRetInfo), nil + return dm_build_822.(*execRetInfo), nil } -func (dm_build_540 *dm_build_414) Dm_build_539(dm_build_541 *innerRows, dm_build_542 int64) (*execRetInfo, error) { - dm_build_543 := dm_build_1058(dm_build_540, dm_build_541, dm_build_542, INT64_MAX) - dm_build_544, dm_build_545 := dm_build_540.dm_build_454(dm_build_543) - if dm_build_545 != nil { - return nil, dm_build_545 +func (dm_build_825 *dm_build_696) Dm_build_824(dm_build_826 *innerRows, dm_build_827 int64) (*execRetInfo, error) { + dm_build_828 := dm_build_1344(dm_build_825, dm_build_826, dm_build_827, INT64_MAX) + dm_build_829, dm_build_830 := dm_build_825.dm_build_739(dm_build_828) + if dm_build_830 != nil { + return nil, dm_build_830 } - return dm_build_544.(*execRetInfo), nil + return dm_build_829.(*execRetInfo), nil } -func (dm_build_547 *dm_build_414) Commit() error { - dm_build_548 := dm_build_905(dm_build_547) - _, dm_build_549 := dm_build_547.dm_build_454(dm_build_548) - if dm_build_549 != nil { - return dm_build_549 +func (dm_build_832 *dm_build_696) Commit() error { + dm_build_833 := dm_build_1190(dm_build_832) + _, dm_build_834 := dm_build_832.dm_build_739(dm_build_833) + if dm_build_834 != nil { + return dm_build_834 } return nil } -func (dm_build_551 *dm_build_414) Rollback() error { - dm_build_552 := dm_build_1217(dm_build_551) - _, dm_build_553 := dm_build_551.dm_build_454(dm_build_552) - if dm_build_553 != nil { - return dm_build_553 +func (dm_build_836 *dm_build_696) Rollback() error { + dm_build_837 := dm_build_1503(dm_build_836) + _, dm_build_838 := dm_build_836.dm_build_739(dm_build_837) + if dm_build_838 != nil { + return dm_build_838 } return nil } -func (dm_build_555 *dm_build_414) Dm_build_554(dm_build_556 *DmConnection) error { - dm_build_557 := dm_build_1222(dm_build_555, dm_build_556.IsoLevel) - _, dm_build_558 := dm_build_555.dm_build_454(dm_build_557) - if dm_build_558 != nil { - return dm_build_558 +func (dm_build_840 *dm_build_696) Dm_build_839(dm_build_841 *DmConnection) error { + dm_build_842 := dm_build_1508(dm_build_840, dm_build_841.IsoLevel) + _, dm_build_843 := dm_build_840.dm_build_739(dm_build_842) + if dm_build_843 != nil { + return dm_build_843 } return nil } -func (dm_build_560 *dm_build_414) Dm_build_559(dm_build_561 *DmStatement, dm_build_562 string) error { - dm_build_563 := dm_build_910(dm_build_560, dm_build_561, dm_build_562) - _, dm_build_564 := dm_build_560.dm_build_454(dm_build_563) - if dm_build_564 != nil { - return dm_build_564 +func (dm_build_845 *dm_build_696) Dm_build_844(dm_build_846 *DmStatement, dm_build_847 string) error { + dm_build_848 := dm_build_1195(dm_build_845, dm_build_846, dm_build_847) + _, dm_build_849 := dm_build_845.dm_build_739(dm_build_848) + if dm_build_849 != nil { + return dm_build_849 } return nil } -func (dm_build_566 *dm_build_414) Dm_build_565(dm_build_567 []uint32) ([]int64, error) { - dm_build_568 := dm_build_1320(dm_build_566, dm_build_567) - dm_build_569, dm_build_570 := dm_build_566.dm_build_454(dm_build_568) - if dm_build_570 != nil { - return nil, dm_build_570 +func (dm_build_851 *dm_build_696) Dm_build_850(dm_build_852 []uint32) ([]int64, error) { + dm_build_853 := dm_build_1606(dm_build_851, dm_build_852) + dm_build_854, dm_build_855 := dm_build_851.dm_build_739(dm_build_853) + if dm_build_855 != nil { + return nil, dm_build_855 } - return dm_build_569.([]int64), nil + return dm_build_854.([]int64), nil } -func (dm_build_572 *dm_build_414) Close() error { - if dm_build_572.dm_build_425 { +func (dm_build_857 *dm_build_696) Close() error { + if dm_build_857.dm_build_707 { return nil } - dm_build_573 := dm_build_572.dm_build_415.Close() - if dm_build_573 != nil { - return dm_build_573 + dm_build_858 := dm_build_857.dm_build_697.Close() + if dm_build_858 != nil { + return dm_build_858 } - dm_build_572.dm_build_418 = nil - dm_build_572.dm_build_425 = true + dm_build_857.dm_build_700 = nil + dm_build_857.dm_build_707 = true return nil } -func (dm_build_575 *dm_build_414) dm_build_574(dm_build_576 *lob) (int64, error) { - dm_build_577 := dm_build_1091(dm_build_575, dm_build_576) - dm_build_578, dm_build_579 := dm_build_575.dm_build_454(dm_build_577) - if dm_build_579 != nil { - return 0, dm_build_579 +func (dm_build_860 *dm_build_696) dm_build_859(dm_build_861 *lob) (int64, error) { + dm_build_862 := dm_build_1377(dm_build_860, dm_build_861) + dm_build_863, dm_build_864 := dm_build_860.dm_build_739(dm_build_862) + if dm_build_864 != nil { + return 0, dm_build_864 } - return dm_build_578.(int64), nil + return dm_build_863.(int64), nil } -func (dm_build_581 *dm_build_414) dm_build_580(dm_build_582 *lob, dm_build_583 int32, dm_build_584 int32) (*lobRetInfo, error) { - dm_build_585 := dm_build_1076(dm_build_581, dm_build_582, int(dm_build_583), int(dm_build_584)) - dm_build_586, dm_build_587 := dm_build_581.dm_build_454(dm_build_585) - if dm_build_587 != nil { - return nil, dm_build_587 +func (dm_build_866 *dm_build_696) dm_build_865(dm_build_867 *lob, dm_build_868 int32, dm_build_869 int32) (*lobRetInfo, error) { + dm_build_870 := dm_build_1362(dm_build_866, dm_build_867, int(dm_build_868), int(dm_build_869)) + dm_build_871, dm_build_872 := dm_build_866.dm_build_739(dm_build_870) + if dm_build_872 != nil { + return nil, dm_build_872 } - return dm_build_586.(*lobRetInfo), nil + return dm_build_871.(*lobRetInfo), nil } -func (dm_build_589 *dm_build_414) dm_build_588(dm_build_590 *DmBlob, dm_build_591 int32, dm_build_592 int32) ([]byte, error) { - var dm_build_593 = make([]byte, dm_build_592) - var dm_build_594 int32 = 0 - var dm_build_595 int32 = 0 - var dm_build_596 *lobRetInfo - var dm_build_597 []byte - var dm_build_598 error - for dm_build_594 < dm_build_592 { - dm_build_595 = dm_build_592 - dm_build_594 - if dm_build_595 > Dm_build_810 { - dm_build_595 = Dm_build_810 +func (dm_build_874 *dm_build_696) dm_build_873(dm_build_875 *DmBlob, dm_build_876 int32, dm_build_877 int32) ([]byte, error) { + var dm_build_878 = make([]byte, dm_build_877) + var dm_build_879 int32 = 0 + var dm_build_880 int32 = 0 + var dm_build_881 *lobRetInfo + var dm_build_882 []byte + var dm_build_883 error + for dm_build_879 < dm_build_877 { + dm_build_880 = dm_build_877 - dm_build_879 + if dm_build_880 > Dm_build_1095 { + dm_build_880 = Dm_build_1095 } - dm_build_596, dm_build_598 = dm_build_589.dm_build_580(&dm_build_590.lob, dm_build_591+dm_build_594, dm_build_595) - if dm_build_598 != nil { - return nil, dm_build_598 + dm_build_881, dm_build_883 = dm_build_874.dm_build_865(&dm_build_875.lob, dm_build_876+dm_build_879, dm_build_880) + if dm_build_883 != nil { + return nil, dm_build_883 } - dm_build_597 = dm_build_596.data - if dm_build_597 == nil || len(dm_build_597) == 0 { + dm_build_882 = dm_build_881.data + if dm_build_882 == nil || len(dm_build_882) == 0 { break } - Dm_build_1331.Dm_build_1387(dm_build_593, int(dm_build_594), dm_build_597, 0, len(dm_build_597)) - dm_build_594 += int32(len(dm_build_597)) - if dm_build_590.readOver { + Dm_build_1.Dm_build_57(dm_build_878, int(dm_build_879), dm_build_882, 0, len(dm_build_882)) + dm_build_879 += int32(len(dm_build_882)) + if dm_build_875.readOver { break } } - return dm_build_593, nil + return dm_build_878, nil } -func (dm_build_600 *dm_build_414) dm_build_599(dm_build_601 *DmClob, dm_build_602 int32, dm_build_603 int32) (string, error) { - var dm_build_604 bytes.Buffer - var dm_build_605 int32 = 0 - var dm_build_606 int32 = 0 - var dm_build_607 *lobRetInfo - var dm_build_608 []byte - var dm_build_609 string - var dm_build_610 error - for dm_build_605 < dm_build_603 { - dm_build_606 = dm_build_603 - dm_build_605 - if dm_build_606 > Dm_build_810/2 { - dm_build_606 = Dm_build_810 / 2 +func (dm_build_885 *dm_build_696) dm_build_884(dm_build_886 *DmClob, dm_build_887 int32, dm_build_888 int32) (string, error) { + var dm_build_889 bytes.Buffer + var dm_build_890 int32 = 0 + var dm_build_891 int32 = 0 + var dm_build_892 *lobRetInfo + var dm_build_893 []byte + var dm_build_894 string + var dm_build_895 error + for dm_build_890 < dm_build_888 { + dm_build_891 = dm_build_888 - dm_build_890 + if dm_build_891 > Dm_build_1095/2 { + dm_build_891 = Dm_build_1095 / 2 } - dm_build_607, dm_build_610 = dm_build_600.dm_build_580(&dm_build_601.lob, dm_build_602+dm_build_605, dm_build_606) - if dm_build_610 != nil { - return "", dm_build_610 + dm_build_892, dm_build_895 = dm_build_885.dm_build_865(&dm_build_886.lob, dm_build_887+dm_build_890, dm_build_891) + if dm_build_895 != nil { + return "", dm_build_895 } - dm_build_608 = dm_build_607.data - if dm_build_608 == nil || len(dm_build_608) == 0 { + dm_build_893 = dm_build_892.data + if dm_build_893 == nil || len(dm_build_893) == 0 { break } - dm_build_609 = Dm_build_1331.Dm_build_1488(dm_build_608, 0, len(dm_build_608), dm_build_601.serverEncoding, dm_build_600.dm_build_418) + dm_build_894 = Dm_build_1.Dm_build_158(dm_build_893, 0, len(dm_build_893), dm_build_886.serverEncoding, dm_build_885.dm_build_700) - dm_build_604.WriteString(dm_build_609) - var strLen = dm_build_607.charLen + dm_build_889.WriteString(dm_build_894) + var strLen = dm_build_892.charLen if strLen == -1 { - strLen = int64(utf8.RuneCountInString(dm_build_609)) + strLen = int64(utf8.RuneCountInString(dm_build_894)) } - dm_build_605 += int32(strLen) - if dm_build_601.readOver { + dm_build_890 += int32(strLen) + if dm_build_886.readOver { break } } - return dm_build_604.String(), nil + return dm_build_889.String(), nil } -func (dm_build_612 *dm_build_414) dm_build_611(dm_build_613 *DmClob, dm_build_614 int, dm_build_615 string, dm_build_616 string) (int, error) { - var dm_build_617 = Dm_build_1331.Dm_build_1547(dm_build_615, dm_build_616, dm_build_612.dm_build_418) - var dm_build_618 = 0 - var dm_build_619 = len(dm_build_617) - var dm_build_620 = 0 - var dm_build_621 = 0 - var dm_build_622 = 0 - var dm_build_623 = dm_build_619/Dm_build_809 + 1 - var dm_build_624 byte = 0 - var dm_build_625 byte = 0x01 - var dm_build_626 byte = 0x02 - for i := 0; i < dm_build_623; i++ { - dm_build_624 = 0 +func (dm_build_897 *dm_build_696) dm_build_896(dm_build_898 *DmClob, dm_build_899 int, dm_build_900 string, dm_build_901 string) (int, error) { + var dm_build_902 = Dm_build_1.Dm_build_217(dm_build_900, dm_build_901, dm_build_897.dm_build_700) + var dm_build_903 = 0 + var dm_build_904 = len(dm_build_902) + var dm_build_905 = 0 + var dm_build_906 = 0 + var dm_build_907 = 0 + var dm_build_908 = dm_build_904/Dm_build_1094 + 1 + var dm_build_909 byte = 0 + var dm_build_910 byte = 0x01 + var dm_build_911 byte = 0x02 + for i := 0; i < dm_build_908; i++ { + dm_build_909 = 0 if i == 0 { - dm_build_624 |= dm_build_625 + dm_build_909 |= dm_build_910 } - if i == dm_build_623-1 { - dm_build_624 |= dm_build_626 + if i == dm_build_908-1 { + dm_build_909 |= dm_build_911 } - dm_build_622 = dm_build_619 - dm_build_621 - if dm_build_622 > Dm_build_809 { - dm_build_622 = Dm_build_809 + dm_build_907 = dm_build_904 - dm_build_906 + if dm_build_907 > Dm_build_1094 { + dm_build_907 = Dm_build_1094 } - setLobData := dm_build_1236(dm_build_612, &dm_build_613.lob, dm_build_624, dm_build_614, dm_build_617, dm_build_618, dm_build_622) - ret, err := dm_build_612.dm_build_454(setLobData) + setLobData := dm_build_1522(dm_build_897, &dm_build_898.lob, dm_build_909, dm_build_899, dm_build_902, dm_build_903, dm_build_907) + ret, err := dm_build_897.dm_build_739(setLobData) if err != nil { return 0, err } tmp := ret.(int32) - if err != nil { - return -1, err - } + //if err != nil { + // return -1, err + //} if tmp <= 0 { - return dm_build_620, nil + return dm_build_905, nil } else { - dm_build_614 += int(tmp) - dm_build_620 += int(tmp) - dm_build_621 += dm_build_622 - dm_build_618 += dm_build_622 - } - } - return dm_build_620, nil -} - -func (dm_build_628 *dm_build_414) dm_build_627(dm_build_629 *DmBlob, dm_build_630 int, dm_build_631 []byte) (int, error) { - var dm_build_632 = 0 - var dm_build_633 = len(dm_build_631) - var dm_build_634 = 0 - var dm_build_635 = 0 - var dm_build_636 = 0 - var dm_build_637 = dm_build_633/Dm_build_809 + 1 - var dm_build_638 byte = 0 - var dm_build_639 byte = 0x01 - var dm_build_640 byte = 0x02 - for i := 0; i < dm_build_637; i++ { - dm_build_638 = 0 + dm_build_899 += int(tmp) + dm_build_905 += int(tmp) + dm_build_906 += dm_build_907 + dm_build_903 += dm_build_907 + } + } + return dm_build_905, nil +} + +func (dm_build_913 *dm_build_696) dm_build_912(dm_build_914 *DmBlob, dm_build_915 int, dm_build_916 []byte) (int, error) { + var dm_build_917 = 0 + var dm_build_918 = len(dm_build_916) + var dm_build_919 = 0 + var dm_build_920 = 0 + var dm_build_921 = 0 + var dm_build_922 = dm_build_918/Dm_build_1094 + 1 + var dm_build_923 byte = 0 + var dm_build_924 byte = 0x01 + var dm_build_925 byte = 0x02 + for i := 0; i < dm_build_922; i++ { + dm_build_923 = 0 if i == 0 { - dm_build_638 |= dm_build_639 + dm_build_923 |= dm_build_924 } - if i == dm_build_637-1 { - dm_build_638 |= dm_build_640 + if i == dm_build_922-1 { + dm_build_923 |= dm_build_925 } - dm_build_636 = dm_build_633 - dm_build_635 - if dm_build_636 > Dm_build_809 { - dm_build_636 = Dm_build_809 + dm_build_921 = dm_build_918 - dm_build_920 + if dm_build_921 > Dm_build_1094 { + dm_build_921 = Dm_build_1094 } - setLobData := dm_build_1236(dm_build_628, &dm_build_629.lob, dm_build_638, dm_build_630, dm_build_631, dm_build_632, dm_build_636) - ret, err := dm_build_628.dm_build_454(setLobData) + setLobData := dm_build_1522(dm_build_913, &dm_build_914.lob, dm_build_923, dm_build_915, dm_build_916, dm_build_917, dm_build_921) + ret, err := dm_build_913.dm_build_739(setLobData) if err != nil { return 0, err } tmp := ret.(int32) if tmp <= 0 { - return dm_build_634, nil + return dm_build_919, nil } else { - dm_build_630 += int(tmp) - dm_build_634 += int(tmp) - dm_build_635 += dm_build_636 - dm_build_632 += dm_build_636 + dm_build_915 += int(tmp) + dm_build_919 += int(tmp) + dm_build_920 += dm_build_921 + dm_build_917 += dm_build_921 } } - return dm_build_634, nil + return dm_build_919, nil } -func (dm_build_642 *dm_build_414) dm_build_641(dm_build_643 *lob, dm_build_644 int) (int64, error) { - dm_build_645 := dm_build_1102(dm_build_642, dm_build_643, dm_build_644) - dm_build_646, dm_build_647 := dm_build_642.dm_build_454(dm_build_645) - if dm_build_647 != nil { - return dm_build_643.length, dm_build_647 +func (dm_build_927 *dm_build_696) dm_build_926(dm_build_928 *lob, dm_build_929 int) (int64, error) { + dm_build_930 := dm_build_1388(dm_build_927, dm_build_928, dm_build_929) + dm_build_931, dm_build_932 := dm_build_927.dm_build_739(dm_build_930) + if dm_build_932 != nil { + return dm_build_928.length, dm_build_932 } - return dm_build_646.(int64), nil + return dm_build_931.(int64), nil } -func (dm_build_649 *dm_build_414) dm_build_648(dm_build_650 []interface{}, dm_build_651 []interface{}, dm_build_652 int) bool { - var dm_build_653 = false - dm_build_650[dm_build_652] = dm_build_651[dm_build_652] +func (dm_build_934 *dm_build_696) dm_build_933(dm_build_935 []interface{}, dm_build_936 []interface{}, dm_build_937 int) bool { + var dm_build_938 = false + dm_build_935[dm_build_937] = dm_build_936[dm_build_937] - if binder, ok := dm_build_651[dm_build_652].(iOffRowBinder); ok { - dm_build_653 = true - dm_build_650[dm_build_652] = make([]byte, 0) + if binder, ok := dm_build_936[dm_build_937].(iOffRowBinder); ok { + dm_build_938 = true + dm_build_935[dm_build_937] = make([]byte, 0) var lob lob if l, ok := binder.getObj().(DmBlob); ok { lob = l.lob } else if l, ok := binder.getObj().(DmClob); ok { lob = l.lob } - if &lob != nil && lob.canOptimized(dm_build_649.dm_build_418) { - dm_build_650[dm_build_652] = &lobCtl{lob.buildCtlData()} - dm_build_653 = false + if &lob != nil && lob.canOptimized(dm_build_934.dm_build_700) { + dm_build_935[dm_build_937] = &lobCtl{lob.buildCtlData()} + dm_build_938 = false } } else { - dm_build_650[dm_build_652] = dm_build_651[dm_build_652] + dm_build_935[dm_build_937] = dm_build_936[dm_build_937] } - return dm_build_653 + return dm_build_938 } -func (dm_build_655 *dm_build_414) dm_build_654(dm_build_656 *DmStatement, dm_build_657 parameter, dm_build_658 int, dm_build_659 iOffRowBinder) error { - var dm_build_660 = Dm_build_4() - dm_build_659.read(dm_build_660) - var dm_build_661 = 0 - for !dm_build_659.isReadOver() || dm_build_660.Dm_build_5() > 0 { - if !dm_build_659.isReadOver() && dm_build_660.Dm_build_5() < Dm_build_809 { - dm_build_659.read(dm_build_660) +func (dm_build_940 *dm_build_696) dm_build_939(dm_build_941 *DmStatement, _ parameter, dm_build_943 int, dm_build_944 iOffRowBinder) error { + var dm_build_945 = Dm_build_286() + dm_build_944.read(dm_build_945) + var dm_build_946 = 0 + for !dm_build_944.isReadOver() || dm_build_945.Dm_build_287() > 0 { + if !dm_build_944.isReadOver() && dm_build_945.Dm_build_287() < Dm_build_1094 { + dm_build_944.read(dm_build_945) } - if dm_build_660.Dm_build_5() > Dm_build_809 { - dm_build_661 = Dm_build_809 + if dm_build_945.Dm_build_287() > Dm_build_1094 { + dm_build_946 = Dm_build_1094 } else { - dm_build_661 = dm_build_660.Dm_build_5() + dm_build_946 = dm_build_945.Dm_build_287() } - putData := dm_build_1207(dm_build_655, dm_build_656, int16(dm_build_658), dm_build_660, int32(dm_build_661)) - _, err := dm_build_655.dm_build_454(putData) + putData := dm_build_1493(dm_build_940, dm_build_941, int16(dm_build_943), dm_build_945, int32(dm_build_946)) + _, err := dm_build_940.dm_build_739(putData) if err != nil { return err } @@ -785,47 +794,47 @@ func (dm_build_655 *dm_build_414) dm_build_654(dm_build_656 *DmStatement, dm_bui return nil } -func (dm_build_663 *dm_build_414) dm_build_662() ([]byte, error) { - var dm_build_664 error - if dm_build_663.dm_build_422 == nil { - if dm_build_663.dm_build_422, dm_build_664 = security.NewClientKeyPair(); dm_build_664 != nil { - return nil, dm_build_664 +func (dm_build_948 *dm_build_696) dm_build_947() ([]byte, error) { + var dm_build_949 error + if dm_build_948.dm_build_704 == nil { + if dm_build_948.dm_build_704, dm_build_949 = security.NewClientKeyPair(); dm_build_949 != nil { + return nil, dm_build_949 } } - return security.Bn2Bytes(dm_build_663.dm_build_422.GetY(), security.DH_KEY_LENGTH), nil + return security.Bn2Bytes(dm_build_948.dm_build_704.GetY(), security.DH_KEY_LENGTH), nil } -func (dm_build_666 *dm_build_414) dm_build_665() (*security.DhKey, error) { - var dm_build_667 error - if dm_build_666.dm_build_422 == nil { - if dm_build_666.dm_build_422, dm_build_667 = security.NewClientKeyPair(); dm_build_667 != nil { - return nil, dm_build_667 +func (dm_build_951 *dm_build_696) dm_build_950() (*security.DhKey, error) { + var dm_build_952 error + if dm_build_951.dm_build_704 == nil { + if dm_build_951.dm_build_704, dm_build_952 = security.NewClientKeyPair(); dm_build_952 != nil { + return nil, dm_build_952 } } - return dm_build_666.dm_build_422, nil + return dm_build_951.dm_build_704, nil } -func (dm_build_669 *dm_build_414) dm_build_668(dm_build_670 int, dm_build_671 []byte, dm_build_672 string, dm_build_673 int) (dm_build_674 error) { - if dm_build_670 > 0 && dm_build_670 < security.MIN_EXTERNAL_CIPHER_ID && dm_build_671 != nil { - dm_build_669.dm_build_419, dm_build_674 = security.NewSymmCipher(dm_build_670, dm_build_671) - } else if dm_build_670 >= security.MIN_EXTERNAL_CIPHER_ID { - if dm_build_669.dm_build_419, dm_build_674 = security.NewThirdPartCipher(dm_build_670, dm_build_671, dm_build_672, dm_build_673); dm_build_674 != nil { - dm_build_674 = THIRD_PART_CIPHER_INIT_FAILED.addDetailln(dm_build_674.Error()).throw() +func (dm_build_954 *dm_build_696) dm_build_953(dm_build_955 int, dm_build_956 []byte, dm_build_957 string, dm_build_958 int) (dm_build_959 error) { + if dm_build_955 > 0 && dm_build_955 < security.MIN_EXTERNAL_CIPHER_ID && dm_build_956 != nil { + dm_build_954.dm_build_701, dm_build_959 = security.NewSymmCipher(dm_build_955, dm_build_956) + } else if dm_build_955 >= security.MIN_EXTERNAL_CIPHER_ID { + if dm_build_954.dm_build_701, dm_build_959 = security.NewThirdPartCipher(dm_build_955, dm_build_956, dm_build_957, dm_build_958); dm_build_959 != nil { + dm_build_959 = THIRD_PART_CIPHER_INIT_FAILED.addDetailln(dm_build_959.Error()).throw() } } return } -func (dm_build_676 *dm_build_414) dm_build_675(dm_build_677 bool) (dm_build_678 error) { - if dm_build_676.dm_build_416, dm_build_678 = security.NewTLSFromTCP(dm_build_676.dm_build_415, dm_build_676.dm_build_418.dmConnector.sslCertPath, dm_build_676.dm_build_418.dmConnector.sslKeyPath, dm_build_676.dm_build_418.dmConnector.user); dm_build_678 != nil { +func (dm_build_961 *dm_build_696) dm_build_960(dm_build_962 bool) (dm_build_963 error) { + if dm_build_961.dm_build_698, dm_build_963 = security.NewTLSFromTCP(dm_build_961.dm_build_697, dm_build_961.dm_build_700.dmConnector.sslCertPath, dm_build_961.dm_build_700.dmConnector.sslKeyPath, dm_build_961.dm_build_700.dmConnector.user); dm_build_963 != nil { return } - if !dm_build_677 { - dm_build_676.dm_build_416 = nil + if !dm_build_962 { + dm_build_961.dm_build_698 = nil } return } -func (dm_build_680 *dm_build_414) dm_build_679(dm_build_681 dm_build_817) bool { - return dm_build_681.dm_build_832() != Dm_build_724 && dm_build_680.dm_build_418.sslEncrypt == 1 +func (dm_build_965 *dm_build_696) dm_build_964(dm_build_966 dm_build_1102) bool { + return dm_build_966.dm_build_1117() != Dm_build_1009 && dm_build_965.dm_build_700.sslEncrypt == 1 } diff --git a/dm8/c.go b/dm8/c.go index 4875e59..38d2242 100644 --- a/dm8/c.go +++ b/dm8/c.go @@ -10,487 +10,487 @@ import ( "math" ) -type Dm_build_78 struct { - dm_build_79 []byte - dm_build_80 int +type Dm_build_360 struct { + dm_build_361 []byte + dm_build_362 int } -func Dm_build_81(dm_build_82 int) *Dm_build_78 { - return &Dm_build_78{make([]byte, 0, dm_build_82), 0} +func Dm_build_363(dm_build_364 int) *Dm_build_360 { + return &Dm_build_360{make([]byte, 0, dm_build_364), 0} } -func Dm_build_83(dm_build_84 []byte) *Dm_build_78 { - return &Dm_build_78{dm_build_84, 0} +func Dm_build_365(dm_build_366 []byte) *Dm_build_360 { + return &Dm_build_360{dm_build_366, 0} } -func (dm_build_86 *Dm_build_78) dm_build_85(dm_build_87 int) *Dm_build_78 { +func (dm_build_368 *Dm_build_360) dm_build_367(dm_build_369 int) *Dm_build_360 { - dm_build_88 := len(dm_build_86.dm_build_79) - dm_build_89 := cap(dm_build_86.dm_build_79) + dm_build_370 := len(dm_build_368.dm_build_361) + dm_build_371 := cap(dm_build_368.dm_build_361) - if dm_build_88+dm_build_87 <= dm_build_89 { - dm_build_86.dm_build_79 = dm_build_86.dm_build_79[:dm_build_88+dm_build_87] + if dm_build_370+dm_build_369 <= dm_build_371 { + dm_build_368.dm_build_361 = dm_build_368.dm_build_361[:dm_build_370+dm_build_369] } else { - var calCap = int64(math.Max(float64(2*dm_build_89), float64(dm_build_87+dm_build_88))) + var calCap = int64(math.Max(float64(2*dm_build_371), float64(dm_build_369+dm_build_370))) - nbuf := make([]byte, dm_build_87+dm_build_88, calCap) - copy(nbuf, dm_build_86.dm_build_79) - dm_build_86.dm_build_79 = nbuf + nbuf := make([]byte, dm_build_369+dm_build_370, calCap) + copy(nbuf, dm_build_368.dm_build_361) + dm_build_368.dm_build_361 = nbuf } - return dm_build_86 + return dm_build_368 } -func (dm_build_91 *Dm_build_78) Dm_build_90() int { - return len(dm_build_91.dm_build_79) +func (dm_build_373 *Dm_build_360) Dm_build_372() int { + return len(dm_build_373.dm_build_361) } -func (dm_build_93 *Dm_build_78) Dm_build_92(dm_build_94 int) *Dm_build_78 { - for i := dm_build_94; i < len(dm_build_93.dm_build_79); i++ { - dm_build_93.dm_build_79[i] = 0 +func (dm_build_375 *Dm_build_360) Dm_build_374(dm_build_376 int) *Dm_build_360 { + for i := dm_build_376; i < len(dm_build_375.dm_build_361); i++ { + dm_build_375.dm_build_361[i] = 0 } - dm_build_93.dm_build_79 = dm_build_93.dm_build_79[:dm_build_94] - return dm_build_93 + dm_build_375.dm_build_361 = dm_build_375.dm_build_361[:dm_build_376] + return dm_build_375 } -func (dm_build_96 *Dm_build_78) Dm_build_95(dm_build_97 int) *Dm_build_78 { - dm_build_96.dm_build_80 = dm_build_97 - return dm_build_96 +func (dm_build_378 *Dm_build_360) Dm_build_377(dm_build_379 int) *Dm_build_360 { + dm_build_378.dm_build_362 = dm_build_379 + return dm_build_378 } -func (dm_build_99 *Dm_build_78) Dm_build_98() int { - return dm_build_99.dm_build_80 +func (dm_build_381 *Dm_build_360) Dm_build_380() int { + return dm_build_381.dm_build_362 } -func (dm_build_101 *Dm_build_78) Dm_build_100(dm_build_102 bool) int { - return len(dm_build_101.dm_build_79) - dm_build_101.dm_build_80 +func (dm_build_383 *Dm_build_360) Dm_build_382(_ bool) int { + return len(dm_build_383.dm_build_361) - dm_build_383.dm_build_362 } -func (dm_build_104 *Dm_build_78) Dm_build_103(dm_build_105 int, dm_build_106 bool, dm_build_107 bool) *Dm_build_78 { +func (dm_build_386 *Dm_build_360) Dm_build_385(dm_build_387 int, dm_build_388 bool, dm_build_389 bool) *Dm_build_360 { - if dm_build_106 { - if dm_build_107 { - dm_build_104.dm_build_85(dm_build_105) + if dm_build_388 { + if dm_build_389 { + dm_build_386.dm_build_367(dm_build_387) } else { - dm_build_104.dm_build_79 = dm_build_104.dm_build_79[:len(dm_build_104.dm_build_79)-dm_build_105] + dm_build_386.dm_build_361 = dm_build_386.dm_build_361[:len(dm_build_386.dm_build_361)-dm_build_387] } } else { - if dm_build_107 { - dm_build_104.dm_build_80 += dm_build_105 + if dm_build_389 { + dm_build_386.dm_build_362 += dm_build_387 } else { - dm_build_104.dm_build_80 -= dm_build_105 + dm_build_386.dm_build_362 -= dm_build_387 } } - return dm_build_104 + return dm_build_386 } -func (dm_build_109 *Dm_build_78) Dm_build_108(dm_build_110 io.Reader, dm_build_111 int) (int, error) { - dm_build_112 := len(dm_build_109.dm_build_79) - dm_build_109.dm_build_85(dm_build_111) - dm_build_113 := 0 - for dm_build_111 > 0 { - n, err := dm_build_110.Read(dm_build_109.dm_build_79[dm_build_112+dm_build_113:]) +func (dm_build_391 *Dm_build_360) Dm_build_390(dm_build_392 io.Reader, dm_build_393 int) (int, error) { + dm_build_394 := len(dm_build_391.dm_build_361) + dm_build_391.dm_build_367(dm_build_393) + dm_build_395 := 0 + for dm_build_393 > 0 { + n, err := dm_build_392.Read(dm_build_391.dm_build_361[dm_build_394+dm_build_395:]) if n > 0 && err == io.EOF { - dm_build_113 += n - dm_build_109.dm_build_79 = dm_build_109.dm_build_79[:dm_build_112+dm_build_113] - return dm_build_113, nil + dm_build_395 += n + dm_build_391.dm_build_361 = dm_build_391.dm_build_361[:dm_build_394+dm_build_395] + return dm_build_395, nil } else if n > 0 && err == nil { - dm_build_111 -= n - dm_build_113 += n + dm_build_393 -= n + dm_build_395 += n } else if n == 0 && err != nil { return -1, ECGO_COMMUNITION_ERROR.addDetailln(err.Error()).throw() } } - return dm_build_113, nil + return dm_build_395, nil } -func (dm_build_115 *Dm_build_78) Dm_build_114(dm_build_116 io.Writer) (*Dm_build_78, error) { - if _, err := dm_build_116.Write(dm_build_115.dm_build_79); err != nil { +func (dm_build_397 *Dm_build_360) Dm_build_396(dm_build_398 io.Writer) (*Dm_build_360, error) { + if _, err := dm_build_398.Write(dm_build_397.dm_build_361); err != nil { return nil, ECGO_COMMUNITION_ERROR.addDetailln(err.Error()).throw() } - return dm_build_115, nil + return dm_build_397, nil } -func (dm_build_118 *Dm_build_78) Dm_build_117(dm_build_119 bool) int { - dm_build_120 := len(dm_build_118.dm_build_79) - dm_build_118.dm_build_85(1) +func (dm_build_400 *Dm_build_360) Dm_build_399(dm_build_401 bool) int { + dm_build_402 := len(dm_build_400.dm_build_361) + dm_build_400.dm_build_367(1) - if dm_build_119 { - return copy(dm_build_118.dm_build_79[dm_build_120:], []byte{1}) + if dm_build_401 { + return copy(dm_build_400.dm_build_361[dm_build_402:], []byte{1}) } else { - return copy(dm_build_118.dm_build_79[dm_build_120:], []byte{0}) + return copy(dm_build_400.dm_build_361[dm_build_402:], []byte{0}) } } -func (dm_build_122 *Dm_build_78) Dm_build_121(dm_build_123 byte) int { - dm_build_124 := len(dm_build_122.dm_build_79) - dm_build_122.dm_build_85(1) +func (dm_build_404 *Dm_build_360) Dm_build_403(dm_build_405 byte) int { + dm_build_406 := len(dm_build_404.dm_build_361) + dm_build_404.dm_build_367(1) - return copy(dm_build_122.dm_build_79[dm_build_124:], Dm_build_1331.Dm_build_1509(dm_build_123)) + return copy(dm_build_404.dm_build_361[dm_build_406:], Dm_build_1.Dm_build_179(dm_build_405)) } -func (dm_build_126 *Dm_build_78) Dm_build_125(dm_build_127 int8) int { - dm_build_128 := len(dm_build_126.dm_build_79) - dm_build_126.dm_build_85(1) +func (dm_build_408 *Dm_build_360) Dm_build_407(dm_build_409 int8) int { + dm_build_410 := len(dm_build_408.dm_build_361) + dm_build_408.dm_build_367(1) - return copy(dm_build_126.dm_build_79[dm_build_128:], Dm_build_1331.Dm_build_1512(dm_build_127)) + return copy(dm_build_408.dm_build_361[dm_build_410:], Dm_build_1.Dm_build_182(dm_build_409)) } -func (dm_build_130 *Dm_build_78) Dm_build_129(dm_build_131 int16) int { - dm_build_132 := len(dm_build_130.dm_build_79) - dm_build_130.dm_build_85(2) +func (dm_build_412 *Dm_build_360) Dm_build_411(dm_build_413 int16) int { + dm_build_414 := len(dm_build_412.dm_build_361) + dm_build_412.dm_build_367(2) - return copy(dm_build_130.dm_build_79[dm_build_132:], Dm_build_1331.Dm_build_1515(dm_build_131)) + return copy(dm_build_412.dm_build_361[dm_build_414:], Dm_build_1.Dm_build_185(dm_build_413)) } -func (dm_build_134 *Dm_build_78) Dm_build_133(dm_build_135 int32) int { - dm_build_136 := len(dm_build_134.dm_build_79) - dm_build_134.dm_build_85(4) +func (dm_build_416 *Dm_build_360) Dm_build_415(dm_build_417 int32) int { + dm_build_418 := len(dm_build_416.dm_build_361) + dm_build_416.dm_build_367(4) - return copy(dm_build_134.dm_build_79[dm_build_136:], Dm_build_1331.Dm_build_1518(dm_build_135)) + return copy(dm_build_416.dm_build_361[dm_build_418:], Dm_build_1.Dm_build_188(dm_build_417)) } -func (dm_build_138 *Dm_build_78) Dm_build_137(dm_build_139 uint8) int { - dm_build_140 := len(dm_build_138.dm_build_79) - dm_build_138.dm_build_85(1) +func (dm_build_420 *Dm_build_360) Dm_build_419(dm_build_421 uint8) int { + dm_build_422 := len(dm_build_420.dm_build_361) + dm_build_420.dm_build_367(1) - return copy(dm_build_138.dm_build_79[dm_build_140:], Dm_build_1331.Dm_build_1530(dm_build_139)) + return copy(dm_build_420.dm_build_361[dm_build_422:], Dm_build_1.Dm_build_200(dm_build_421)) } -func (dm_build_142 *Dm_build_78) Dm_build_141(dm_build_143 uint16) int { - dm_build_144 := len(dm_build_142.dm_build_79) - dm_build_142.dm_build_85(2) +func (dm_build_424 *Dm_build_360) Dm_build_423(dm_build_425 uint16) int { + dm_build_426 := len(dm_build_424.dm_build_361) + dm_build_424.dm_build_367(2) - return copy(dm_build_142.dm_build_79[dm_build_144:], Dm_build_1331.Dm_build_1533(dm_build_143)) + return copy(dm_build_424.dm_build_361[dm_build_426:], Dm_build_1.Dm_build_203(dm_build_425)) } -func (dm_build_146 *Dm_build_78) Dm_build_145(dm_build_147 uint32) int { - dm_build_148 := len(dm_build_146.dm_build_79) - dm_build_146.dm_build_85(4) +func (dm_build_428 *Dm_build_360) Dm_build_427(dm_build_429 uint32) int { + dm_build_430 := len(dm_build_428.dm_build_361) + dm_build_428.dm_build_367(4) - return copy(dm_build_146.dm_build_79[dm_build_148:], Dm_build_1331.Dm_build_1536(dm_build_147)) + return copy(dm_build_428.dm_build_361[dm_build_430:], Dm_build_1.Dm_build_206(dm_build_429)) } -func (dm_build_150 *Dm_build_78) Dm_build_149(dm_build_151 uint64) int { - dm_build_152 := len(dm_build_150.dm_build_79) - dm_build_150.dm_build_85(8) +func (dm_build_432 *Dm_build_360) Dm_build_431(dm_build_433 uint64) int { + dm_build_434 := len(dm_build_432.dm_build_361) + dm_build_432.dm_build_367(8) - return copy(dm_build_150.dm_build_79[dm_build_152:], Dm_build_1331.Dm_build_1539(dm_build_151)) + return copy(dm_build_432.dm_build_361[dm_build_434:], Dm_build_1.Dm_build_209(dm_build_433)) } -func (dm_build_154 *Dm_build_78) Dm_build_153(dm_build_155 float32) int { - dm_build_156 := len(dm_build_154.dm_build_79) - dm_build_154.dm_build_85(4) +func (dm_build_436 *Dm_build_360) Dm_build_435(dm_build_437 float32) int { + dm_build_438 := len(dm_build_436.dm_build_361) + dm_build_436.dm_build_367(4) - return copy(dm_build_154.dm_build_79[dm_build_156:], Dm_build_1331.Dm_build_1536(math.Float32bits(dm_build_155))) + return copy(dm_build_436.dm_build_361[dm_build_438:], Dm_build_1.Dm_build_206(math.Float32bits(dm_build_437))) } -func (dm_build_158 *Dm_build_78) Dm_build_157(dm_build_159 float64) int { - dm_build_160 := len(dm_build_158.dm_build_79) - dm_build_158.dm_build_85(8) +func (dm_build_440 *Dm_build_360) Dm_build_439(dm_build_441 float64) int { + dm_build_442 := len(dm_build_440.dm_build_361) + dm_build_440.dm_build_367(8) - return copy(dm_build_158.dm_build_79[dm_build_160:], Dm_build_1331.Dm_build_1539(math.Float64bits(dm_build_159))) + return copy(dm_build_440.dm_build_361[dm_build_442:], Dm_build_1.Dm_build_209(math.Float64bits(dm_build_441))) } -func (dm_build_162 *Dm_build_78) Dm_build_161(dm_build_163 []byte) int { - dm_build_164 := len(dm_build_162.dm_build_79) - dm_build_162.dm_build_85(len(dm_build_163)) - return copy(dm_build_162.dm_build_79[dm_build_164:], dm_build_163) +func (dm_build_444 *Dm_build_360) Dm_build_443(dm_build_445 []byte) int { + dm_build_446 := len(dm_build_444.dm_build_361) + dm_build_444.dm_build_367(len(dm_build_445)) + return copy(dm_build_444.dm_build_361[dm_build_446:], dm_build_445) } -func (dm_build_166 *Dm_build_78) Dm_build_165(dm_build_167 []byte) int { - return dm_build_166.Dm_build_133(int32(len(dm_build_167))) + dm_build_166.Dm_build_161(dm_build_167) +func (dm_build_448 *Dm_build_360) Dm_build_447(dm_build_449 []byte) int { + return dm_build_448.Dm_build_415(int32(len(dm_build_449))) + dm_build_448.Dm_build_443(dm_build_449) } -func (dm_build_169 *Dm_build_78) Dm_build_168(dm_build_170 []byte) int { - return dm_build_169.Dm_build_137(uint8(len(dm_build_170))) + dm_build_169.Dm_build_161(dm_build_170) +func (dm_build_451 *Dm_build_360) Dm_build_450(dm_build_452 []byte) int { + return dm_build_451.Dm_build_419(uint8(len(dm_build_452))) + dm_build_451.Dm_build_443(dm_build_452) } -func (dm_build_172 *Dm_build_78) Dm_build_171(dm_build_173 []byte) int { - return dm_build_172.Dm_build_141(uint16(len(dm_build_173))) + dm_build_172.Dm_build_161(dm_build_173) +func (dm_build_454 *Dm_build_360) Dm_build_453(dm_build_455 []byte) int { + return dm_build_454.Dm_build_423(uint16(len(dm_build_455))) + dm_build_454.Dm_build_443(dm_build_455) } -func (dm_build_175 *Dm_build_78) Dm_build_174(dm_build_176 []byte) int { - return dm_build_175.Dm_build_161(dm_build_176) + dm_build_175.Dm_build_121(0) +func (dm_build_457 *Dm_build_360) Dm_build_456(dm_build_458 []byte) int { + return dm_build_457.Dm_build_443(dm_build_458) + dm_build_457.Dm_build_403(0) } -func (dm_build_178 *Dm_build_78) Dm_build_177(dm_build_179 string, dm_build_180 string, dm_build_181 *DmConnection) int { - dm_build_182 := Dm_build_1331.Dm_build_1547(dm_build_179, dm_build_180, dm_build_181) - return dm_build_178.Dm_build_165(dm_build_182) +func (dm_build_460 *Dm_build_360) Dm_build_459(dm_build_461 string, dm_build_462 string, dm_build_463 *DmConnection) int { + dm_build_464 := Dm_build_1.Dm_build_217(dm_build_461, dm_build_462, dm_build_463) + return dm_build_460.Dm_build_447(dm_build_464) } -func (dm_build_184 *Dm_build_78) Dm_build_183(dm_build_185 string, dm_build_186 string, dm_build_187 *DmConnection) int { - dm_build_188 := Dm_build_1331.Dm_build_1547(dm_build_185, dm_build_186, dm_build_187) - return dm_build_184.Dm_build_168(dm_build_188) +func (dm_build_466 *Dm_build_360) Dm_build_465(dm_build_467 string, dm_build_468 string, dm_build_469 *DmConnection) int { + dm_build_470 := Dm_build_1.Dm_build_217(dm_build_467, dm_build_468, dm_build_469) + return dm_build_466.Dm_build_450(dm_build_470) } -func (dm_build_190 *Dm_build_78) Dm_build_189(dm_build_191 string, dm_build_192 string, dm_build_193 *DmConnection) int { - dm_build_194 := Dm_build_1331.Dm_build_1547(dm_build_191, dm_build_192, dm_build_193) - return dm_build_190.Dm_build_171(dm_build_194) +func (dm_build_472 *Dm_build_360) Dm_build_471(dm_build_473 string, dm_build_474 string, dm_build_475 *DmConnection) int { + dm_build_476 := Dm_build_1.Dm_build_217(dm_build_473, dm_build_474, dm_build_475) + return dm_build_472.Dm_build_453(dm_build_476) } -func (dm_build_196 *Dm_build_78) Dm_build_195(dm_build_197 string, dm_build_198 string, dm_build_199 *DmConnection) int { - dm_build_200 := Dm_build_1331.Dm_build_1547(dm_build_197, dm_build_198, dm_build_199) - return dm_build_196.Dm_build_174(dm_build_200) +func (dm_build_478 *Dm_build_360) Dm_build_477(dm_build_479 string, dm_build_480 string, dm_build_481 *DmConnection) int { + dm_build_482 := Dm_build_1.Dm_build_217(dm_build_479, dm_build_480, dm_build_481) + return dm_build_478.Dm_build_456(dm_build_482) } -func (dm_build_202 *Dm_build_78) Dm_build_201() byte { - dm_build_203 := Dm_build_1331.Dm_build_1424(dm_build_202.dm_build_79, dm_build_202.dm_build_80) - dm_build_202.dm_build_80++ - return dm_build_203 +func (dm_build_484 *Dm_build_360) Dm_build_483() byte { + dm_build_485 := Dm_build_1.Dm_build_94(dm_build_484.dm_build_361, dm_build_484.dm_build_362) + dm_build_484.dm_build_362++ + return dm_build_485 } -func (dm_build_205 *Dm_build_78) Dm_build_204() int16 { - dm_build_206 := Dm_build_1331.Dm_build_1428(dm_build_205.dm_build_79, dm_build_205.dm_build_80) - dm_build_205.dm_build_80 += 2 - return dm_build_206 +func (dm_build_487 *Dm_build_360) Dm_build_486() int16 { + dm_build_488 := Dm_build_1.Dm_build_98(dm_build_487.dm_build_361, dm_build_487.dm_build_362) + dm_build_487.dm_build_362 += 2 + return dm_build_488 } -func (dm_build_208 *Dm_build_78) Dm_build_207() int32 { - dm_build_209 := Dm_build_1331.Dm_build_1433(dm_build_208.dm_build_79, dm_build_208.dm_build_80) - dm_build_208.dm_build_80 += 4 - return dm_build_209 +func (dm_build_490 *Dm_build_360) Dm_build_489() int32 { + dm_build_491 := Dm_build_1.Dm_build_103(dm_build_490.dm_build_361, dm_build_490.dm_build_362) + dm_build_490.dm_build_362 += 4 + return dm_build_491 } -func (dm_build_211 *Dm_build_78) Dm_build_210() int64 { - dm_build_212 := Dm_build_1331.Dm_build_1438(dm_build_211.dm_build_79, dm_build_211.dm_build_80) - dm_build_211.dm_build_80 += 8 - return dm_build_212 +func (dm_build_493 *Dm_build_360) Dm_build_492() int64 { + dm_build_494 := Dm_build_1.Dm_build_108(dm_build_493.dm_build_361, dm_build_493.dm_build_362) + dm_build_493.dm_build_362 += 8 + return dm_build_494 } -func (dm_build_214 *Dm_build_78) Dm_build_213() float32 { - dm_build_215 := Dm_build_1331.Dm_build_1443(dm_build_214.dm_build_79, dm_build_214.dm_build_80) - dm_build_214.dm_build_80 += 4 - return dm_build_215 +func (dm_build_496 *Dm_build_360) Dm_build_495() float32 { + dm_build_497 := Dm_build_1.Dm_build_113(dm_build_496.dm_build_361, dm_build_496.dm_build_362) + dm_build_496.dm_build_362 += 4 + return dm_build_497 } -func (dm_build_217 *Dm_build_78) Dm_build_216() float64 { - dm_build_218 := Dm_build_1331.Dm_build_1447(dm_build_217.dm_build_79, dm_build_217.dm_build_80) - dm_build_217.dm_build_80 += 8 - return dm_build_218 +func (dm_build_499 *Dm_build_360) Dm_build_498() float64 { + dm_build_500 := Dm_build_1.Dm_build_117(dm_build_499.dm_build_361, dm_build_499.dm_build_362) + dm_build_499.dm_build_362 += 8 + return dm_build_500 } -func (dm_build_220 *Dm_build_78) Dm_build_219() uint8 { - dm_build_221 := Dm_build_1331.Dm_build_1451(dm_build_220.dm_build_79, dm_build_220.dm_build_80) - dm_build_220.dm_build_80 += 1 - return dm_build_221 +func (dm_build_502 *Dm_build_360) Dm_build_501() uint8 { + dm_build_503 := Dm_build_1.Dm_build_121(dm_build_502.dm_build_361, dm_build_502.dm_build_362) + dm_build_502.dm_build_362 += 1 + return dm_build_503 } -func (dm_build_223 *Dm_build_78) Dm_build_222() uint16 { - dm_build_224 := Dm_build_1331.Dm_build_1455(dm_build_223.dm_build_79, dm_build_223.dm_build_80) - dm_build_223.dm_build_80 += 2 - return dm_build_224 +func (dm_build_505 *Dm_build_360) Dm_build_504() uint16 { + dm_build_506 := Dm_build_1.Dm_build_125(dm_build_505.dm_build_361, dm_build_505.dm_build_362) + dm_build_505.dm_build_362 += 2 + return dm_build_506 } -func (dm_build_226 *Dm_build_78) Dm_build_225() uint32 { - dm_build_227 := Dm_build_1331.Dm_build_1460(dm_build_226.dm_build_79, dm_build_226.dm_build_80) - dm_build_226.dm_build_80 += 4 - return dm_build_227 +func (dm_build_508 *Dm_build_360) Dm_build_507() uint32 { + dm_build_509 := Dm_build_1.Dm_build_130(dm_build_508.dm_build_361, dm_build_508.dm_build_362) + dm_build_508.dm_build_362 += 4 + return dm_build_509 } -func (dm_build_229 *Dm_build_78) Dm_build_228(dm_build_230 int) []byte { - dm_build_231 := Dm_build_1331.Dm_build_1482(dm_build_229.dm_build_79, dm_build_229.dm_build_80, dm_build_230) - dm_build_229.dm_build_80 += dm_build_230 - return dm_build_231 +func (dm_build_511 *Dm_build_360) Dm_build_510(dm_build_512 int) []byte { + dm_build_513 := Dm_build_1.Dm_build_152(dm_build_511.dm_build_361, dm_build_511.dm_build_362, dm_build_512) + dm_build_511.dm_build_362 += dm_build_512 + return dm_build_513 } -func (dm_build_233 *Dm_build_78) Dm_build_232() []byte { - return dm_build_233.Dm_build_228(int(dm_build_233.Dm_build_207())) +func (dm_build_515 *Dm_build_360) Dm_build_514() []byte { + return dm_build_515.Dm_build_510(int(dm_build_515.Dm_build_489())) } -func (dm_build_235 *Dm_build_78) Dm_build_234() []byte { - return dm_build_235.Dm_build_228(int(dm_build_235.Dm_build_201())) +func (dm_build_517 *Dm_build_360) Dm_build_516() []byte { + return dm_build_517.Dm_build_510(int(dm_build_517.Dm_build_483())) } -func (dm_build_237 *Dm_build_78) Dm_build_236() []byte { - return dm_build_237.Dm_build_228(int(dm_build_237.Dm_build_204())) +func (dm_build_519 *Dm_build_360) Dm_build_518() []byte { + return dm_build_519.Dm_build_510(int(dm_build_519.Dm_build_486())) } -func (dm_build_239 *Dm_build_78) Dm_build_238(dm_build_240 int) []byte { - return dm_build_239.Dm_build_228(dm_build_240) +func (dm_build_521 *Dm_build_360) Dm_build_520(dm_build_522 int) []byte { + return dm_build_521.Dm_build_510(dm_build_522) } -func (dm_build_242 *Dm_build_78) Dm_build_241() []byte { - dm_build_243 := 0 - for dm_build_242.Dm_build_201() != 0 { - dm_build_243++ +func (dm_build_524 *Dm_build_360) Dm_build_523() []byte { + dm_build_525 := 0 + for dm_build_524.Dm_build_483() != 0 { + dm_build_525++ } - dm_build_242.Dm_build_103(dm_build_243, false, false) - return dm_build_242.Dm_build_228(dm_build_243) + dm_build_524.Dm_build_385(dm_build_525, false, false) + return dm_build_524.Dm_build_510(dm_build_525) } -func (dm_build_245 *Dm_build_78) Dm_build_244(dm_build_246 int, dm_build_247 string, dm_build_248 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_245.Dm_build_228(dm_build_246), dm_build_247, dm_build_248) +func (dm_build_527 *Dm_build_360) Dm_build_526(dm_build_528 int, dm_build_529 string, dm_build_530 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_527.Dm_build_510(dm_build_528), dm_build_529, dm_build_530) } -func (dm_build_250 *Dm_build_78) Dm_build_249(dm_build_251 string, dm_build_252 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_250.Dm_build_232(), dm_build_251, dm_build_252) +func (dm_build_532 *Dm_build_360) Dm_build_531(dm_build_533 string, dm_build_534 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_532.Dm_build_514(), dm_build_533, dm_build_534) } -func (dm_build_254 *Dm_build_78) Dm_build_253(dm_build_255 string, dm_build_256 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_254.Dm_build_234(), dm_build_255, dm_build_256) +func (dm_build_536 *Dm_build_360) Dm_build_535(dm_build_537 string, dm_build_538 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_536.Dm_build_516(), dm_build_537, dm_build_538) } -func (dm_build_258 *Dm_build_78) Dm_build_257(dm_build_259 string, dm_build_260 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_258.Dm_build_236(), dm_build_259, dm_build_260) +func (dm_build_540 *Dm_build_360) Dm_build_539(dm_build_541 string, dm_build_542 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_540.Dm_build_518(), dm_build_541, dm_build_542) } -func (dm_build_262 *Dm_build_78) Dm_build_261(dm_build_263 string, dm_build_264 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_262.Dm_build_241(), dm_build_263, dm_build_264) +func (dm_build_544 *Dm_build_360) Dm_build_543(dm_build_545 string, dm_build_546 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_544.Dm_build_523(), dm_build_545, dm_build_546) } -func (dm_build_266 *Dm_build_78) Dm_build_265(dm_build_267 int, dm_build_268 byte) int { - return dm_build_266.Dm_build_301(dm_build_267, Dm_build_1331.Dm_build_1509(dm_build_268)) +func (dm_build_548 *Dm_build_360) Dm_build_547(dm_build_549 int, dm_build_550 byte) int { + return dm_build_548.Dm_build_583(dm_build_549, Dm_build_1.Dm_build_179(dm_build_550)) } -func (dm_build_270 *Dm_build_78) Dm_build_269(dm_build_271 int, dm_build_272 int16) int { - return dm_build_270.Dm_build_301(dm_build_271, Dm_build_1331.Dm_build_1515(dm_build_272)) +func (dm_build_552 *Dm_build_360) Dm_build_551(dm_build_553 int, dm_build_554 int16) int { + return dm_build_552.Dm_build_583(dm_build_553, Dm_build_1.Dm_build_185(dm_build_554)) } -func (dm_build_274 *Dm_build_78) Dm_build_273(dm_build_275 int, dm_build_276 int32) int { - return dm_build_274.Dm_build_301(dm_build_275, Dm_build_1331.Dm_build_1518(dm_build_276)) +func (dm_build_556 *Dm_build_360) Dm_build_555(dm_build_557 int, dm_build_558 int32) int { + return dm_build_556.Dm_build_583(dm_build_557, Dm_build_1.Dm_build_188(dm_build_558)) } -func (dm_build_278 *Dm_build_78) Dm_build_277(dm_build_279 int, dm_build_280 int64) int { - return dm_build_278.Dm_build_301(dm_build_279, Dm_build_1331.Dm_build_1521(dm_build_280)) +func (dm_build_560 *Dm_build_360) Dm_build_559(dm_build_561 int, dm_build_562 int64) int { + return dm_build_560.Dm_build_583(dm_build_561, Dm_build_1.Dm_build_191(dm_build_562)) } -func (dm_build_282 *Dm_build_78) Dm_build_281(dm_build_283 int, dm_build_284 float32) int { - return dm_build_282.Dm_build_301(dm_build_283, Dm_build_1331.Dm_build_1524(dm_build_284)) +func (dm_build_564 *Dm_build_360) Dm_build_563(dm_build_565 int, dm_build_566 float32) int { + return dm_build_564.Dm_build_583(dm_build_565, Dm_build_1.Dm_build_194(dm_build_566)) } -func (dm_build_286 *Dm_build_78) Dm_build_285(dm_build_287 int, dm_build_288 float64) int { - return dm_build_286.Dm_build_301(dm_build_287, Dm_build_1331.Dm_build_1527(dm_build_288)) +func (dm_build_568 *Dm_build_360) Dm_build_567(dm_build_569 int, dm_build_570 float64) int { + return dm_build_568.Dm_build_583(dm_build_569, Dm_build_1.Dm_build_197(dm_build_570)) } -func (dm_build_290 *Dm_build_78) Dm_build_289(dm_build_291 int, dm_build_292 uint8) int { - return dm_build_290.Dm_build_301(dm_build_291, Dm_build_1331.Dm_build_1530(dm_build_292)) +func (dm_build_572 *Dm_build_360) Dm_build_571(dm_build_573 int, dm_build_574 uint8) int { + return dm_build_572.Dm_build_583(dm_build_573, Dm_build_1.Dm_build_200(dm_build_574)) } -func (dm_build_294 *Dm_build_78) Dm_build_293(dm_build_295 int, dm_build_296 uint16) int { - return dm_build_294.Dm_build_301(dm_build_295, Dm_build_1331.Dm_build_1533(dm_build_296)) +func (dm_build_576 *Dm_build_360) Dm_build_575(dm_build_577 int, dm_build_578 uint16) int { + return dm_build_576.Dm_build_583(dm_build_577, Dm_build_1.Dm_build_203(dm_build_578)) } -func (dm_build_298 *Dm_build_78) Dm_build_297(dm_build_299 int, dm_build_300 uint32) int { - return dm_build_298.Dm_build_301(dm_build_299, Dm_build_1331.Dm_build_1536(dm_build_300)) +func (dm_build_580 *Dm_build_360) Dm_build_579(dm_build_581 int, dm_build_582 uint32) int { + return dm_build_580.Dm_build_583(dm_build_581, Dm_build_1.Dm_build_206(dm_build_582)) } -func (dm_build_302 *Dm_build_78) Dm_build_301(dm_build_303 int, dm_build_304 []byte) int { - return copy(dm_build_302.dm_build_79[dm_build_303:], dm_build_304) +func (dm_build_584 *Dm_build_360) Dm_build_583(dm_build_585 int, dm_build_586 []byte) int { + return copy(dm_build_584.dm_build_361[dm_build_585:], dm_build_586) } -func (dm_build_306 *Dm_build_78) Dm_build_305(dm_build_307 int, dm_build_308 []byte) int { - return dm_build_306.Dm_build_273(dm_build_307, int32(len(dm_build_308))) + dm_build_306.Dm_build_301(dm_build_307+4, dm_build_308) +func (dm_build_588 *Dm_build_360) Dm_build_587(dm_build_589 int, dm_build_590 []byte) int { + return dm_build_588.Dm_build_555(dm_build_589, int32(len(dm_build_590))) + dm_build_588.Dm_build_583(dm_build_589+4, dm_build_590) } -func (dm_build_310 *Dm_build_78) Dm_build_309(dm_build_311 int, dm_build_312 []byte) int { - return dm_build_310.Dm_build_265(dm_build_311, byte(len(dm_build_312))) + dm_build_310.Dm_build_301(dm_build_311+1, dm_build_312) +func (dm_build_592 *Dm_build_360) Dm_build_591(dm_build_593 int, dm_build_594 []byte) int { + return dm_build_592.Dm_build_547(dm_build_593, byte(len(dm_build_594))) + dm_build_592.Dm_build_583(dm_build_593+1, dm_build_594) } -func (dm_build_314 *Dm_build_78) Dm_build_313(dm_build_315 int, dm_build_316 []byte) int { - return dm_build_314.Dm_build_269(dm_build_315, int16(len(dm_build_316))) + dm_build_314.Dm_build_301(dm_build_315+2, dm_build_316) +func (dm_build_596 *Dm_build_360) Dm_build_595(dm_build_597 int, dm_build_598 []byte) int { + return dm_build_596.Dm_build_551(dm_build_597, int16(len(dm_build_598))) + dm_build_596.Dm_build_583(dm_build_597+2, dm_build_598) } -func (dm_build_318 *Dm_build_78) Dm_build_317(dm_build_319 int, dm_build_320 []byte) int { - return dm_build_318.Dm_build_301(dm_build_319, dm_build_320) + dm_build_318.Dm_build_265(dm_build_319+len(dm_build_320), 0) +func (dm_build_600 *Dm_build_360) Dm_build_599(dm_build_601 int, dm_build_602 []byte) int { + return dm_build_600.Dm_build_583(dm_build_601, dm_build_602) + dm_build_600.Dm_build_547(dm_build_601+len(dm_build_602), 0) } -func (dm_build_322 *Dm_build_78) Dm_build_321(dm_build_323 int, dm_build_324 string, dm_build_325 string, dm_build_326 *DmConnection) int { - return dm_build_322.Dm_build_305(dm_build_323, Dm_build_1331.Dm_build_1547(dm_build_324, dm_build_325, dm_build_326)) +func (dm_build_604 *Dm_build_360) Dm_build_603(dm_build_605 int, dm_build_606 string, dm_build_607 string, dm_build_608 *DmConnection) int { + return dm_build_604.Dm_build_587(dm_build_605, Dm_build_1.Dm_build_217(dm_build_606, dm_build_607, dm_build_608)) } -func (dm_build_328 *Dm_build_78) Dm_build_327(dm_build_329 int, dm_build_330 string, dm_build_331 string, dm_build_332 *DmConnection) int { - return dm_build_328.Dm_build_309(dm_build_329, Dm_build_1331.Dm_build_1547(dm_build_330, dm_build_331, dm_build_332)) +func (dm_build_610 *Dm_build_360) Dm_build_609(dm_build_611 int, dm_build_612 string, dm_build_613 string, dm_build_614 *DmConnection) int { + return dm_build_610.Dm_build_591(dm_build_611, Dm_build_1.Dm_build_217(dm_build_612, dm_build_613, dm_build_614)) } -func (dm_build_334 *Dm_build_78) Dm_build_333(dm_build_335 int, dm_build_336 string, dm_build_337 string, dm_build_338 *DmConnection) int { - return dm_build_334.Dm_build_313(dm_build_335, Dm_build_1331.Dm_build_1547(dm_build_336, dm_build_337, dm_build_338)) +func (dm_build_616 *Dm_build_360) Dm_build_615(dm_build_617 int, dm_build_618 string, dm_build_619 string, dm_build_620 *DmConnection) int { + return dm_build_616.Dm_build_595(dm_build_617, Dm_build_1.Dm_build_217(dm_build_618, dm_build_619, dm_build_620)) } -func (dm_build_340 *Dm_build_78) Dm_build_339(dm_build_341 int, dm_build_342 string, dm_build_343 string, dm_build_344 *DmConnection) int { - return dm_build_340.Dm_build_317(dm_build_341, Dm_build_1331.Dm_build_1547(dm_build_342, dm_build_343, dm_build_344)) +func (dm_build_622 *Dm_build_360) Dm_build_621(dm_build_623 int, dm_build_624 string, dm_build_625 string, dm_build_626 *DmConnection) int { + return dm_build_622.Dm_build_599(dm_build_623, Dm_build_1.Dm_build_217(dm_build_624, dm_build_625, dm_build_626)) } -func (dm_build_346 *Dm_build_78) Dm_build_345(dm_build_347 int) byte { - return Dm_build_1331.Dm_build_1552(dm_build_346.Dm_build_372(dm_build_347, 1)) +func (dm_build_628 *Dm_build_360) Dm_build_627(dm_build_629 int) byte { + return Dm_build_1.Dm_build_222(dm_build_628.Dm_build_654(dm_build_629, 1)) } -func (dm_build_349 *Dm_build_78) Dm_build_348(dm_build_350 int) int16 { - return Dm_build_1331.Dm_build_1555(dm_build_349.Dm_build_372(dm_build_350, 2)) +func (dm_build_631 *Dm_build_360) Dm_build_630(dm_build_632 int) int16 { + return Dm_build_1.Dm_build_225(dm_build_631.Dm_build_654(dm_build_632, 2)) } -func (dm_build_352 *Dm_build_78) Dm_build_351(dm_build_353 int) int32 { - return Dm_build_1331.Dm_build_1558(dm_build_352.Dm_build_372(dm_build_353, 4)) +func (dm_build_634 *Dm_build_360) Dm_build_633(dm_build_635 int) int32 { + return Dm_build_1.Dm_build_228(dm_build_634.Dm_build_654(dm_build_635, 4)) } -func (dm_build_355 *Dm_build_78) Dm_build_354(dm_build_356 int) int64 { - return Dm_build_1331.Dm_build_1561(dm_build_355.Dm_build_372(dm_build_356, 8)) +func (dm_build_637 *Dm_build_360) Dm_build_636(dm_build_638 int) int64 { + return Dm_build_1.Dm_build_231(dm_build_637.Dm_build_654(dm_build_638, 8)) } -func (dm_build_358 *Dm_build_78) Dm_build_357(dm_build_359 int) float32 { - return Dm_build_1331.Dm_build_1564(dm_build_358.Dm_build_372(dm_build_359, 4)) +func (dm_build_640 *Dm_build_360) Dm_build_639(dm_build_641 int) float32 { + return Dm_build_1.Dm_build_234(dm_build_640.Dm_build_654(dm_build_641, 4)) } -func (dm_build_361 *Dm_build_78) Dm_build_360(dm_build_362 int) float64 { - return Dm_build_1331.Dm_build_1567(dm_build_361.Dm_build_372(dm_build_362, 8)) +func (dm_build_643 *Dm_build_360) Dm_build_642(dm_build_644 int) float64 { + return Dm_build_1.Dm_build_237(dm_build_643.Dm_build_654(dm_build_644, 8)) } -func (dm_build_364 *Dm_build_78) Dm_build_363(dm_build_365 int) uint8 { - return Dm_build_1331.Dm_build_1570(dm_build_364.Dm_build_372(dm_build_365, 1)) +func (dm_build_646 *Dm_build_360) Dm_build_645(dm_build_647 int) uint8 { + return Dm_build_1.Dm_build_240(dm_build_646.Dm_build_654(dm_build_647, 1)) } -func (dm_build_367 *Dm_build_78) Dm_build_366(dm_build_368 int) uint16 { - return Dm_build_1331.Dm_build_1573(dm_build_367.Dm_build_372(dm_build_368, 2)) +func (dm_build_649 *Dm_build_360) Dm_build_648(dm_build_650 int) uint16 { + return Dm_build_1.Dm_build_243(dm_build_649.Dm_build_654(dm_build_650, 2)) } -func (dm_build_370 *Dm_build_78) Dm_build_369(dm_build_371 int) uint32 { - return Dm_build_1331.Dm_build_1576(dm_build_370.Dm_build_372(dm_build_371, 4)) +func (dm_build_652 *Dm_build_360) Dm_build_651(dm_build_653 int) uint32 { + return Dm_build_1.Dm_build_246(dm_build_652.Dm_build_654(dm_build_653, 4)) } -func (dm_build_373 *Dm_build_78) Dm_build_372(dm_build_374 int, dm_build_375 int) []byte { - return dm_build_373.dm_build_79[dm_build_374 : dm_build_374+dm_build_375] +func (dm_build_655 *Dm_build_360) Dm_build_654(dm_build_656 int, dm_build_657 int) []byte { + return dm_build_655.dm_build_361[dm_build_656 : dm_build_656+dm_build_657] } -func (dm_build_377 *Dm_build_78) Dm_build_376(dm_build_378 int) []byte { - dm_build_379 := dm_build_377.Dm_build_351(dm_build_378) - return dm_build_377.Dm_build_372(dm_build_378+4, int(dm_build_379)) +func (dm_build_659 *Dm_build_360) Dm_build_658(dm_build_660 int) []byte { + dm_build_661 := dm_build_659.Dm_build_633(dm_build_660) + return dm_build_659.Dm_build_654(dm_build_660+4, int(dm_build_661)) } -func (dm_build_381 *Dm_build_78) Dm_build_380(dm_build_382 int) []byte { - dm_build_383 := dm_build_381.Dm_build_345(dm_build_382) - return dm_build_381.Dm_build_372(dm_build_382+1, int(dm_build_383)) +func (dm_build_663 *Dm_build_360) Dm_build_662(dm_build_664 int) []byte { + dm_build_665 := dm_build_663.Dm_build_627(dm_build_664) + return dm_build_663.Dm_build_654(dm_build_664+1, int(dm_build_665)) } -func (dm_build_385 *Dm_build_78) Dm_build_384(dm_build_386 int) []byte { - dm_build_387 := dm_build_385.Dm_build_348(dm_build_386) - return dm_build_385.Dm_build_372(dm_build_386+2, int(dm_build_387)) +func (dm_build_667 *Dm_build_360) Dm_build_666(dm_build_668 int) []byte { + dm_build_669 := dm_build_667.Dm_build_630(dm_build_668) + return dm_build_667.Dm_build_654(dm_build_668+2, int(dm_build_669)) } -func (dm_build_389 *Dm_build_78) Dm_build_388(dm_build_390 int) []byte { - dm_build_391 := 0 - for dm_build_389.Dm_build_345(dm_build_390) != 0 { - dm_build_390++ - dm_build_391++ +func (dm_build_671 *Dm_build_360) Dm_build_670(dm_build_672 int) []byte { + dm_build_673 := 0 + for dm_build_671.Dm_build_627(dm_build_672) != 0 { + dm_build_672++ + dm_build_673++ } - return dm_build_389.Dm_build_372(dm_build_390-dm_build_391, int(dm_build_391)) + return dm_build_671.Dm_build_654(dm_build_672-dm_build_673, dm_build_673) } -func (dm_build_393 *Dm_build_78) Dm_build_392(dm_build_394 int, dm_build_395 string, dm_build_396 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_393.Dm_build_376(dm_build_394), dm_build_395, dm_build_396) +func (dm_build_675 *Dm_build_360) Dm_build_674(dm_build_676 int, dm_build_677 string, dm_build_678 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_675.Dm_build_658(dm_build_676), dm_build_677, dm_build_678) } -func (dm_build_398 *Dm_build_78) Dm_build_397(dm_build_399 int, dm_build_400 string, dm_build_401 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_398.Dm_build_380(dm_build_399), dm_build_400, dm_build_401) +func (dm_build_680 *Dm_build_360) Dm_build_679(dm_build_681 int, dm_build_682 string, dm_build_683 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_680.Dm_build_662(dm_build_681), dm_build_682, dm_build_683) } -func (dm_build_403 *Dm_build_78) Dm_build_402(dm_build_404 int, dm_build_405 string, dm_build_406 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_403.Dm_build_384(dm_build_404), dm_build_405, dm_build_406) +func (dm_build_685 *Dm_build_360) Dm_build_684(dm_build_686 int, dm_build_687 string, dm_build_688 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_685.Dm_build_666(dm_build_686), dm_build_687, dm_build_688) } -func (dm_build_408 *Dm_build_78) Dm_build_407(dm_build_409 int, dm_build_410 string, dm_build_411 *DmConnection) string { - return Dm_build_1331.Dm_build_1584(dm_build_408.Dm_build_388(dm_build_409), dm_build_410, dm_build_411) +func (dm_build_690 *Dm_build_360) Dm_build_689(dm_build_691 int, dm_build_692 string, dm_build_693 *DmConnection) string { + return Dm_build_1.Dm_build_253(dm_build_690.Dm_build_670(dm_build_691), dm_build_692, dm_build_693) } diff --git a/dm8/d.go b/dm8/d.go index cb6e3c5..a5e5d13 100644 --- a/dm8/d.go +++ b/dm8/d.go @@ -10,198 +10,204 @@ import ( "io" ) -type Dm_build_0 struct { - dm_build_1 *list.List - dm_build_2 *dm_build_54 - dm_build_3 int +type Dm_build_282 struct { + dm_build_283 *list.List + dm_build_284 *dm_build_336 + dm_build_285 int } -func Dm_build_4() *Dm_build_0 { - return &Dm_build_0{ - dm_build_1: list.New(), - dm_build_3: 0, +func Dm_build_286() *Dm_build_282 { + return &Dm_build_282{ + dm_build_283: list.New(), + dm_build_285: 0, } } -func (dm_build_6 *Dm_build_0) Dm_build_5() int { - return dm_build_6.dm_build_3 +func (dm_build_288 *Dm_build_282) Dm_build_287() int { + return dm_build_288.dm_build_285 } -func (dm_build_8 *Dm_build_0) Dm_build_7(dm_build_9 *Dm_build_78, dm_build_10 int) int { - var dm_build_11 = 0 - var dm_build_12 = 0 - for dm_build_11 < dm_build_10 && dm_build_8.dm_build_2 != nil { - dm_build_12 = dm_build_8.dm_build_2.dm_build_62(dm_build_9, dm_build_10-dm_build_11) - if dm_build_8.dm_build_2.dm_build_57 == 0 { - dm_build_8.dm_build_44() +func (dm_build_290 *Dm_build_282) Dm_build_289(dm_build_291 *Dm_build_360, dm_build_292 int) int { + var dm_build_293 = 0 + var dm_build_294 = 0 + for dm_build_293 < dm_build_292 && dm_build_290.dm_build_284 != nil { + dm_build_294 = dm_build_290.dm_build_284.dm_build_344(dm_build_291, dm_build_292-dm_build_293) + if dm_build_290.dm_build_284.dm_build_339 == 0 { + dm_build_290.dm_build_326() } - dm_build_11 += dm_build_12 - dm_build_8.dm_build_3 -= dm_build_12 + dm_build_293 += dm_build_294 + dm_build_290.dm_build_285 -= dm_build_294 } - return dm_build_11 + return dm_build_293 } -func (dm_build_14 *Dm_build_0) Dm_build_13(dm_build_15 []byte, dm_build_16 int, dm_build_17 int) int { - var dm_build_18 = 0 - var dm_build_19 = 0 - for dm_build_18 < dm_build_17 && dm_build_14.dm_build_2 != nil { - dm_build_19 = dm_build_14.dm_build_2.dm_build_66(dm_build_15, dm_build_16, dm_build_17-dm_build_18) - if dm_build_14.dm_build_2.dm_build_57 == 0 { - dm_build_14.dm_build_44() +func (dm_build_296 *Dm_build_282) Dm_build_295(dm_build_297 []byte, dm_build_298 int, dm_build_299 int) int { + var dm_build_300 = 0 + var dm_build_301 = 0 + for dm_build_300 < dm_build_299 && dm_build_296.dm_build_284 != nil { + dm_build_301 = dm_build_296.dm_build_284.dm_build_348(dm_build_297, dm_build_298, dm_build_299-dm_build_300) + if dm_build_296.dm_build_284.dm_build_339 == 0 { + dm_build_296.dm_build_326() } - dm_build_18 += dm_build_19 - dm_build_14.dm_build_3 -= dm_build_19 - dm_build_16 += dm_build_19 + dm_build_300 += dm_build_301 + dm_build_296.dm_build_285 -= dm_build_301 + dm_build_298 += dm_build_301 } - return dm_build_18 + return dm_build_300 } -func (dm_build_21 *Dm_build_0) Dm_build_20(dm_build_22 io.Writer, dm_build_23 int) int { - var dm_build_24 = 0 - var dm_build_25 = 0 - for dm_build_24 < dm_build_23 && dm_build_21.dm_build_2 != nil { - dm_build_25 = dm_build_21.dm_build_2.dm_build_71(dm_build_22, dm_build_23-dm_build_24) - if dm_build_21.dm_build_2.dm_build_57 == 0 { - dm_build_21.dm_build_44() +func (dm_build_303 *Dm_build_282) Dm_build_302(dm_build_304 io.Writer, dm_build_305 int) int { + var dm_build_306 = 0 + var dm_build_307 = 0 + for dm_build_306 < dm_build_305 && dm_build_303.dm_build_284 != nil { + dm_build_307 = dm_build_303.dm_build_284.dm_build_353(dm_build_304, dm_build_305-dm_build_306) + if dm_build_303.dm_build_284.dm_build_339 == 0 { + dm_build_303.dm_build_326() } - dm_build_24 += dm_build_25 - dm_build_21.dm_build_3 -= dm_build_25 + dm_build_306 += dm_build_307 + dm_build_303.dm_build_285 -= dm_build_307 } - return dm_build_24 + return dm_build_306 } -func (dm_build_27 *Dm_build_0) Dm_build_26(dm_build_28 []byte, dm_build_29 int, dm_build_30 int) { - if dm_build_30 == 0 { +func (dm_build_309 *Dm_build_282) Dm_build_308(dm_build_310 []byte, dm_build_311 int, dm_build_312 int) { + if dm_build_312 == 0 { return } - var dm_build_31 = dm_build_58(dm_build_28, dm_build_29, dm_build_30) - if dm_build_27.dm_build_2 == nil { - dm_build_27.dm_build_2 = dm_build_31 + var dm_build_313 = dm_build_340(dm_build_310, dm_build_311, dm_build_312) + if dm_build_309.dm_build_284 == nil { + dm_build_309.dm_build_284 = dm_build_313 } else { - dm_build_27.dm_build_1.PushBack(dm_build_31) + dm_build_309.dm_build_283.PushBack(dm_build_313) } - dm_build_27.dm_build_3 += dm_build_30 + dm_build_309.dm_build_285 += dm_build_312 } -func (dm_build_33 *Dm_build_0) dm_build_32(dm_build_34 int) byte { - var dm_build_35 = dm_build_34 - var dm_build_36 = dm_build_33.dm_build_2 - for dm_build_35 > 0 && dm_build_36 != nil { - if dm_build_36.dm_build_57 == 0 { +func (dm_build_315 *Dm_build_282) dm_build_314(dm_build_316 int) byte { + var dm_build_317 = dm_build_316 + var dm_build_318 = dm_build_315.dm_build_284 + for dm_build_317 > 0 && dm_build_318 != nil { + if dm_build_318.dm_build_339 == 0 { continue } - if dm_build_35 > dm_build_36.dm_build_57-1 { - dm_build_35 -= dm_build_36.dm_build_57 - dm_build_36 = dm_build_33.dm_build_1.Front().Value.(*dm_build_54) + if dm_build_317 > dm_build_318.dm_build_339-1 { + dm_build_317 -= dm_build_318.dm_build_339 + dm_build_318 = dm_build_315.dm_build_283.Front().Value.(*dm_build_336) } else { break } } - return dm_build_36.dm_build_75(dm_build_35) + if dm_build_318 != nil { + return dm_build_318.dm_build_357(dm_build_317) + } + return 0 } -func (dm_build_38 *Dm_build_0) Dm_build_37(dm_build_39 *Dm_build_0) { - if dm_build_39.dm_build_3 == 0 { + +func (dm_build_320 *Dm_build_282) Dm_build_319(dm_build_321 *Dm_build_282) { + if dm_build_321.dm_build_285 == 0 { return } - var dm_build_40 = dm_build_39.dm_build_2 - for dm_build_40 != nil { - dm_build_38.dm_build_41(dm_build_40) - dm_build_39.dm_build_44() - dm_build_40 = dm_build_39.dm_build_2 + var dm_build_322 = dm_build_321.dm_build_284 + for dm_build_322 != nil { + dm_build_320.dm_build_323(dm_build_322) + dm_build_321.dm_build_326() + dm_build_322 = dm_build_321.dm_build_284 } - dm_build_39.dm_build_3 = 0 + dm_build_321.dm_build_285 = 0 } -func (dm_build_42 *Dm_build_0) dm_build_41(dm_build_43 *dm_build_54) { - if dm_build_43.dm_build_57 == 0 { + +func (dm_build_324 *Dm_build_282) dm_build_323(dm_build_325 *dm_build_336) { + if dm_build_325.dm_build_339 == 0 { return } - if dm_build_42.dm_build_2 == nil { - dm_build_42.dm_build_2 = dm_build_43 + if dm_build_324.dm_build_284 == nil { + dm_build_324.dm_build_284 = dm_build_325 } else { - dm_build_42.dm_build_1.PushBack(dm_build_43) + dm_build_324.dm_build_283.PushBack(dm_build_325) } - dm_build_42.dm_build_3 += dm_build_43.dm_build_57 + dm_build_324.dm_build_285 += dm_build_325.dm_build_339 } -func (dm_build_45 *Dm_build_0) dm_build_44() { - var dm_build_46 = dm_build_45.dm_build_1.Front() - if dm_build_46 == nil { - dm_build_45.dm_build_2 = nil +func (dm_build_327 *Dm_build_282) dm_build_326() { + var dm_build_328 = dm_build_327.dm_build_283.Front() + if dm_build_328 == nil { + dm_build_327.dm_build_284 = nil } else { - dm_build_45.dm_build_2 = dm_build_46.Value.(*dm_build_54) - dm_build_45.dm_build_1.Remove(dm_build_46) + dm_build_327.dm_build_284 = dm_build_328.Value.(*dm_build_336) + dm_build_327.dm_build_283.Remove(dm_build_328) } } -func (dm_build_48 *Dm_build_0) Dm_build_47() []byte { - var dm_build_49 = make([]byte, dm_build_48.dm_build_3) - var dm_build_50 = dm_build_48.dm_build_2 - var dm_build_51 = 0 - var dm_build_52 = len(dm_build_49) - var dm_build_53 = 0 - for dm_build_50 != nil { - if dm_build_50.dm_build_57 > 0 { - if dm_build_52 > dm_build_50.dm_build_57 { - dm_build_53 = dm_build_50.dm_build_57 +func (dm_build_330 *Dm_build_282) Dm_build_329() []byte { + var dm_build_331 = make([]byte, dm_build_330.dm_build_285) + var dm_build_332 = dm_build_330.dm_build_284 + var dm_build_333 = 0 + var dm_build_334 = len(dm_build_331) + var dm_build_335 = 0 + for dm_build_332 != nil { + if dm_build_332.dm_build_339 > 0 { + if dm_build_334 > dm_build_332.dm_build_339 { + dm_build_335 = dm_build_332.dm_build_339 } else { - dm_build_53 = dm_build_52 + dm_build_335 = dm_build_334 } - copy(dm_build_49[dm_build_51:dm_build_51+dm_build_53], dm_build_50.dm_build_55[dm_build_50.dm_build_56:dm_build_50.dm_build_56+dm_build_53]) - dm_build_51 += dm_build_53 - dm_build_52 -= dm_build_53 + copy(dm_build_331[dm_build_333:dm_build_333+dm_build_335], dm_build_332.dm_build_337[dm_build_332.dm_build_338:dm_build_332.dm_build_338+dm_build_335]) + dm_build_333 += dm_build_335 + dm_build_334 -= dm_build_335 } - if dm_build_48.dm_build_1.Front() == nil { - dm_build_50 = nil + if dm_build_330.dm_build_283.Front() == nil { + dm_build_332 = nil } else { - dm_build_50 = dm_build_48.dm_build_1.Front().Value.(*dm_build_54) + dm_build_332 = dm_build_330.dm_build_283.Front().Value.(*dm_build_336) } } - return dm_build_49 + return dm_build_331 } -type dm_build_54 struct { - dm_build_55 []byte - dm_build_56 int - dm_build_57 int +type dm_build_336 struct { + dm_build_337 []byte + dm_build_338 int + dm_build_339 int } -func dm_build_58(dm_build_59 []byte, dm_build_60 int, dm_build_61 int) *dm_build_54 { - return &dm_build_54{ - dm_build_59, - dm_build_60, - dm_build_61, +func dm_build_340(dm_build_341 []byte, dm_build_342 int, dm_build_343 int) *dm_build_336 { + return &dm_build_336{ + dm_build_341, + dm_build_342, + dm_build_343, } } -func (dm_build_63 *dm_build_54) dm_build_62(dm_build_64 *Dm_build_78, dm_build_65 int) int { - if dm_build_63.dm_build_57 <= dm_build_65 { - dm_build_65 = dm_build_63.dm_build_57 +func (dm_build_345 *dm_build_336) dm_build_344(dm_build_346 *Dm_build_360, dm_build_347 int) int { + if dm_build_345.dm_build_339 <= dm_build_347 { + dm_build_347 = dm_build_345.dm_build_339 } - dm_build_64.Dm_build_161(dm_build_63.dm_build_55[dm_build_63.dm_build_56 : dm_build_63.dm_build_56+dm_build_65]) - dm_build_63.dm_build_56 += dm_build_65 - dm_build_63.dm_build_57 -= dm_build_65 - return dm_build_65 + dm_build_346.Dm_build_443(dm_build_345.dm_build_337[dm_build_345.dm_build_338 : dm_build_345.dm_build_338+dm_build_347]) + dm_build_345.dm_build_338 += dm_build_347 + dm_build_345.dm_build_339 -= dm_build_347 + return dm_build_347 } -func (dm_build_67 *dm_build_54) dm_build_66(dm_build_68 []byte, dm_build_69 int, dm_build_70 int) int { - if dm_build_67.dm_build_57 <= dm_build_70 { - dm_build_70 = dm_build_67.dm_build_57 +func (dm_build_349 *dm_build_336) dm_build_348(dm_build_350 []byte, dm_build_351 int, dm_build_352 int) int { + if dm_build_349.dm_build_339 <= dm_build_352 { + dm_build_352 = dm_build_349.dm_build_339 } - copy(dm_build_68[dm_build_69:dm_build_69+dm_build_70], dm_build_67.dm_build_55[dm_build_67.dm_build_56:dm_build_67.dm_build_56+dm_build_70]) - dm_build_67.dm_build_56 += dm_build_70 - dm_build_67.dm_build_57 -= dm_build_70 - return dm_build_70 + copy(dm_build_350[dm_build_351:dm_build_351+dm_build_352], dm_build_349.dm_build_337[dm_build_349.dm_build_338:dm_build_349.dm_build_338+dm_build_352]) + dm_build_349.dm_build_338 += dm_build_352 + dm_build_349.dm_build_339 -= dm_build_352 + return dm_build_352 } -func (dm_build_72 *dm_build_54) dm_build_71(dm_build_73 io.Writer, dm_build_74 int) int { - if dm_build_72.dm_build_57 <= dm_build_74 { - dm_build_74 = dm_build_72.dm_build_57 +func (dm_build_354 *dm_build_336) dm_build_353(dm_build_355 io.Writer, dm_build_356 int) int { + if dm_build_354.dm_build_339 <= dm_build_356 { + dm_build_356 = dm_build_354.dm_build_339 } - _, _ = dm_build_73.Write(dm_build_72.dm_build_55[dm_build_72.dm_build_56 : dm_build_72.dm_build_56+dm_build_74]) - dm_build_72.dm_build_56 += dm_build_74 - dm_build_72.dm_build_57 -= dm_build_74 - return dm_build_74 + _, _ = dm_build_355.Write(dm_build_354.dm_build_337[dm_build_354.dm_build_338 : dm_build_354.dm_build_338+dm_build_356]) + dm_build_354.dm_build_338 += dm_build_356 + dm_build_354.dm_build_339 -= dm_build_356 + return dm_build_356 } -func (dm_build_76 *dm_build_54) dm_build_75(dm_build_77 int) byte { - return dm_build_76.dm_build_55[dm_build_76.dm_build_56+dm_build_77] + +func (dm_build_358 *dm_build_336) dm_build_357(dm_build_359 int) byte { + return dm_build_358.dm_build_337[dm_build_358.dm_build_338+dm_build_359] } diff --git a/dm8/e.go b/dm8/e.go index 6fcc8b8..04e77d8 100644 --- a/dm8/e.go +++ b/dm8/e.go @@ -16,325 +16,325 @@ import ( "golang.org/x/text/transform" ) -type dm_build_1330 struct{} +type dm_build_0 struct{} -var Dm_build_1331 = &dm_build_1330{} +var Dm_build_1 = &dm_build_0{} -func (Dm_build_1333 *dm_build_1330) Dm_build_1332(dm_build_1334 []byte, dm_build_1335 int, dm_build_1336 byte) int { - dm_build_1334[dm_build_1335] = dm_build_1336 +func (Dm_build_3 *dm_build_0) Dm_build_2(dm_build_4 []byte, dm_build_5 int, dm_build_6 byte) int { + dm_build_4[dm_build_5] = dm_build_6 return 1 } -func (Dm_build_1338 *dm_build_1330) Dm_build_1337(dm_build_1339 []byte, dm_build_1340 int, dm_build_1341 int8) int { - dm_build_1339[dm_build_1340] = byte(dm_build_1341) +func (Dm_build_8 *dm_build_0) Dm_build_7(dm_build_9 []byte, dm_build_10 int, dm_build_11 int8) int { + dm_build_9[dm_build_10] = byte(dm_build_11) return 1 } -func (Dm_build_1343 *dm_build_1330) Dm_build_1342(dm_build_1344 []byte, dm_build_1345 int, dm_build_1346 int16) int { - dm_build_1344[dm_build_1345] = byte(dm_build_1346) - dm_build_1345++ - dm_build_1344[dm_build_1345] = byte(dm_build_1346 >> 8) +func (Dm_build_13 *dm_build_0) Dm_build_12(dm_build_14 []byte, dm_build_15 int, dm_build_16 int16) int { + dm_build_14[dm_build_15] = byte(dm_build_16) + dm_build_15++ + dm_build_14[dm_build_15] = byte(dm_build_16 >> 8) return 2 } -func (Dm_build_1348 *dm_build_1330) Dm_build_1347(dm_build_1349 []byte, dm_build_1350 int, dm_build_1351 int32) int { - dm_build_1349[dm_build_1350] = byte(dm_build_1351) - dm_build_1350++ - dm_build_1349[dm_build_1350] = byte(dm_build_1351 >> 8) - dm_build_1350++ - dm_build_1349[dm_build_1350] = byte(dm_build_1351 >> 16) - dm_build_1350++ - dm_build_1349[dm_build_1350] = byte(dm_build_1351 >> 24) - dm_build_1350++ +func (Dm_build_18 *dm_build_0) Dm_build_17(dm_build_19 []byte, dm_build_20 int, dm_build_21 int32) int { + dm_build_19[dm_build_20] = byte(dm_build_21) + dm_build_20++ + dm_build_19[dm_build_20] = byte(dm_build_21 >> 8) + dm_build_20++ + dm_build_19[dm_build_20] = byte(dm_build_21 >> 16) + dm_build_20++ + dm_build_19[dm_build_20] = byte(dm_build_21 >> 24) + dm_build_20++ return 4 } -func (Dm_build_1353 *dm_build_1330) Dm_build_1352(dm_build_1354 []byte, dm_build_1355 int, dm_build_1356 int64) int { - dm_build_1354[dm_build_1355] = byte(dm_build_1356) - dm_build_1355++ - dm_build_1354[dm_build_1355] = byte(dm_build_1356 >> 8) - dm_build_1355++ - dm_build_1354[dm_build_1355] = byte(dm_build_1356 >> 16) - dm_build_1355++ - dm_build_1354[dm_build_1355] = byte(dm_build_1356 >> 24) - dm_build_1355++ - dm_build_1354[dm_build_1355] = byte(dm_build_1356 >> 32) - dm_build_1355++ - dm_build_1354[dm_build_1355] = byte(dm_build_1356 >> 40) - dm_build_1355++ - dm_build_1354[dm_build_1355] = byte(dm_build_1356 >> 48) - dm_build_1355++ - dm_build_1354[dm_build_1355] = byte(dm_build_1356 >> 56) +func (Dm_build_23 *dm_build_0) Dm_build_22(dm_build_24 []byte, dm_build_25 int, dm_build_26 int64) int { + dm_build_24[dm_build_25] = byte(dm_build_26) + dm_build_25++ + dm_build_24[dm_build_25] = byte(dm_build_26 >> 8) + dm_build_25++ + dm_build_24[dm_build_25] = byte(dm_build_26 >> 16) + dm_build_25++ + dm_build_24[dm_build_25] = byte(dm_build_26 >> 24) + dm_build_25++ + dm_build_24[dm_build_25] = byte(dm_build_26 >> 32) + dm_build_25++ + dm_build_24[dm_build_25] = byte(dm_build_26 >> 40) + dm_build_25++ + dm_build_24[dm_build_25] = byte(dm_build_26 >> 48) + dm_build_25++ + dm_build_24[dm_build_25] = byte(dm_build_26 >> 56) return 8 } -func (Dm_build_1358 *dm_build_1330) Dm_build_1357(dm_build_1359 []byte, dm_build_1360 int, dm_build_1361 float32) int { - return Dm_build_1358.Dm_build_1377(dm_build_1359, dm_build_1360, math.Float32bits(dm_build_1361)) +func (Dm_build_28 *dm_build_0) Dm_build_27(dm_build_29 []byte, dm_build_30 int, dm_build_31 float32) int { + return Dm_build_28.Dm_build_47(dm_build_29, dm_build_30, math.Float32bits(dm_build_31)) } -func (Dm_build_1363 *dm_build_1330) Dm_build_1362(dm_build_1364 []byte, dm_build_1365 int, dm_build_1366 float64) int { - return Dm_build_1363.Dm_build_1382(dm_build_1364, dm_build_1365, math.Float64bits(dm_build_1366)) +func (Dm_build_33 *dm_build_0) Dm_build_32(dm_build_34 []byte, dm_build_35 int, dm_build_36 float64) int { + return Dm_build_33.Dm_build_52(dm_build_34, dm_build_35, math.Float64bits(dm_build_36)) } -func (Dm_build_1368 *dm_build_1330) Dm_build_1367(dm_build_1369 []byte, dm_build_1370 int, dm_build_1371 uint8) int { - dm_build_1369[dm_build_1370] = byte(dm_build_1371) +func (Dm_build_38 *dm_build_0) Dm_build_37(dm_build_39 []byte, dm_build_40 int, dm_build_41 uint8) int { + dm_build_39[dm_build_40] = dm_build_41 return 1 } -func (Dm_build_1373 *dm_build_1330) Dm_build_1372(dm_build_1374 []byte, dm_build_1375 int, dm_build_1376 uint16) int { - dm_build_1374[dm_build_1375] = byte(dm_build_1376) - dm_build_1375++ - dm_build_1374[dm_build_1375] = byte(dm_build_1376 >> 8) +func (Dm_build_43 *dm_build_0) Dm_build_42(dm_build_44 []byte, dm_build_45 int, dm_build_46 uint16) int { + dm_build_44[dm_build_45] = byte(dm_build_46) + dm_build_45++ + dm_build_44[dm_build_45] = byte(dm_build_46 >> 8) return 2 } -func (Dm_build_1378 *dm_build_1330) Dm_build_1377(dm_build_1379 []byte, dm_build_1380 int, dm_build_1381 uint32) int { - dm_build_1379[dm_build_1380] = byte(dm_build_1381) - dm_build_1380++ - dm_build_1379[dm_build_1380] = byte(dm_build_1381 >> 8) - dm_build_1380++ - dm_build_1379[dm_build_1380] = byte(dm_build_1381 >> 16) - dm_build_1380++ - dm_build_1379[dm_build_1380] = byte(dm_build_1381 >> 24) +func (Dm_build_48 *dm_build_0) Dm_build_47(dm_build_49 []byte, dm_build_50 int, dm_build_51 uint32) int { + dm_build_49[dm_build_50] = byte(dm_build_51) + dm_build_50++ + dm_build_49[dm_build_50] = byte(dm_build_51 >> 8) + dm_build_50++ + dm_build_49[dm_build_50] = byte(dm_build_51 >> 16) + dm_build_50++ + dm_build_49[dm_build_50] = byte(dm_build_51 >> 24) return 3 } -func (Dm_build_1383 *dm_build_1330) Dm_build_1382(dm_build_1384 []byte, dm_build_1385 int, dm_build_1386 uint64) int { - dm_build_1384[dm_build_1385] = byte(dm_build_1386) - dm_build_1385++ - dm_build_1384[dm_build_1385] = byte(dm_build_1386 >> 8) - dm_build_1385++ - dm_build_1384[dm_build_1385] = byte(dm_build_1386 >> 16) - dm_build_1385++ - dm_build_1384[dm_build_1385] = byte(dm_build_1386 >> 24) - dm_build_1385++ - dm_build_1384[dm_build_1385] = byte(dm_build_1386 >> 32) - dm_build_1385++ - dm_build_1384[dm_build_1385] = byte(dm_build_1386 >> 40) - dm_build_1385++ - dm_build_1384[dm_build_1385] = byte(dm_build_1386 >> 48) - dm_build_1385++ - dm_build_1384[dm_build_1385] = byte(dm_build_1386 >> 56) +func (Dm_build_53 *dm_build_0) Dm_build_52(dm_build_54 []byte, dm_build_55 int, dm_build_56 uint64) int { + dm_build_54[dm_build_55] = byte(dm_build_56) + dm_build_55++ + dm_build_54[dm_build_55] = byte(dm_build_56 >> 8) + dm_build_55++ + dm_build_54[dm_build_55] = byte(dm_build_56 >> 16) + dm_build_55++ + dm_build_54[dm_build_55] = byte(dm_build_56 >> 24) + dm_build_55++ + dm_build_54[dm_build_55] = byte(dm_build_56 >> 32) + dm_build_55++ + dm_build_54[dm_build_55] = byte(dm_build_56 >> 40) + dm_build_55++ + dm_build_54[dm_build_55] = byte(dm_build_56 >> 48) + dm_build_55++ + dm_build_54[dm_build_55] = byte(dm_build_56 >> 56) return 3 } -func (Dm_build_1388 *dm_build_1330) Dm_build_1387(dm_build_1389 []byte, dm_build_1390 int, dm_build_1391 []byte, dm_build_1392 int, dm_build_1393 int) int { - copy(dm_build_1389[dm_build_1390:dm_build_1390+dm_build_1393], dm_build_1391[dm_build_1392:dm_build_1392+dm_build_1393]) - return dm_build_1393 +func (Dm_build_58 *dm_build_0) Dm_build_57(dm_build_59 []byte, dm_build_60 int, dm_build_61 []byte, dm_build_62 int, dm_build_63 int) int { + copy(dm_build_59[dm_build_60:dm_build_60+dm_build_63], dm_build_61[dm_build_62:dm_build_62+dm_build_63]) + return dm_build_63 } -func (Dm_build_1395 *dm_build_1330) Dm_build_1394(dm_build_1396 []byte, dm_build_1397 int, dm_build_1398 []byte, dm_build_1399 int, dm_build_1400 int) int { - dm_build_1397 += Dm_build_1395.Dm_build_1377(dm_build_1396, dm_build_1397, uint32(dm_build_1400)) - return 4 + Dm_build_1395.Dm_build_1387(dm_build_1396, dm_build_1397, dm_build_1398, dm_build_1399, dm_build_1400) +func (Dm_build_65 *dm_build_0) Dm_build_64(dm_build_66 []byte, dm_build_67 int, dm_build_68 []byte, dm_build_69 int, dm_build_70 int) int { + dm_build_67 += Dm_build_65.Dm_build_47(dm_build_66, dm_build_67, uint32(dm_build_70)) + return 4 + Dm_build_65.Dm_build_57(dm_build_66, dm_build_67, dm_build_68, dm_build_69, dm_build_70) } -func (Dm_build_1402 *dm_build_1330) Dm_build_1401(dm_build_1403 []byte, dm_build_1404 int, dm_build_1405 []byte, dm_build_1406 int, dm_build_1407 int) int { - dm_build_1404 += Dm_build_1402.Dm_build_1372(dm_build_1403, dm_build_1404, uint16(dm_build_1407)) - return 2 + Dm_build_1402.Dm_build_1387(dm_build_1403, dm_build_1404, dm_build_1405, dm_build_1406, dm_build_1407) +func (Dm_build_72 *dm_build_0) Dm_build_71(dm_build_73 []byte, dm_build_74 int, dm_build_75 []byte, dm_build_76 int, dm_build_77 int) int { + dm_build_74 += Dm_build_72.Dm_build_42(dm_build_73, dm_build_74, uint16(dm_build_77)) + return 2 + Dm_build_72.Dm_build_57(dm_build_73, dm_build_74, dm_build_75, dm_build_76, dm_build_77) } -func (Dm_build_1409 *dm_build_1330) Dm_build_1408(dm_build_1410 []byte, dm_build_1411 int, dm_build_1412 string, dm_build_1413 string, dm_build_1414 *DmConnection) int { - dm_build_1415 := Dm_build_1409.Dm_build_1547(dm_build_1412, dm_build_1413, dm_build_1414) - dm_build_1411 += Dm_build_1409.Dm_build_1377(dm_build_1410, dm_build_1411, uint32(len(dm_build_1415))) - return 4 + Dm_build_1409.Dm_build_1387(dm_build_1410, dm_build_1411, dm_build_1415, 0, len(dm_build_1415)) +func (Dm_build_79 *dm_build_0) Dm_build_78(dm_build_80 []byte, dm_build_81 int, dm_build_82 string, dm_build_83 string, dm_build_84 *DmConnection) int { + dm_build_85 := Dm_build_79.Dm_build_217(dm_build_82, dm_build_83, dm_build_84) + dm_build_81 += Dm_build_79.Dm_build_47(dm_build_80, dm_build_81, uint32(len(dm_build_85))) + return 4 + Dm_build_79.Dm_build_57(dm_build_80, dm_build_81, dm_build_85, 0, len(dm_build_85)) } -func (Dm_build_1417 *dm_build_1330) Dm_build_1416(dm_build_1418 []byte, dm_build_1419 int, dm_build_1420 string, dm_build_1421 string, dm_build_1422 *DmConnection) int { - dm_build_1423 := Dm_build_1417.Dm_build_1547(dm_build_1420, dm_build_1421, dm_build_1422) +func (Dm_build_87 *dm_build_0) Dm_build_86(dm_build_88 []byte, dm_build_89 int, dm_build_90 string, dm_build_91 string, dm_build_92 *DmConnection) int { + dm_build_93 := Dm_build_87.Dm_build_217(dm_build_90, dm_build_91, dm_build_92) - dm_build_1419 += Dm_build_1417.Dm_build_1372(dm_build_1418, dm_build_1419, uint16(len(dm_build_1423))) - return 2 + Dm_build_1417.Dm_build_1387(dm_build_1418, dm_build_1419, dm_build_1423, 0, len(dm_build_1423)) + dm_build_89 += Dm_build_87.Dm_build_42(dm_build_88, dm_build_89, uint16(len(dm_build_93))) + return 2 + Dm_build_87.Dm_build_57(dm_build_88, dm_build_89, dm_build_93, 0, len(dm_build_93)) } -func (Dm_build_1425 *dm_build_1330) Dm_build_1424(dm_build_1426 []byte, dm_build_1427 int) byte { - return dm_build_1426[dm_build_1427] +func (Dm_build_95 *dm_build_0) Dm_build_94(dm_build_96 []byte, dm_build_97 int) byte { + return dm_build_96[dm_build_97] } -func (Dm_build_1429 *dm_build_1330) Dm_build_1428(dm_build_1430 []byte, dm_build_1431 int) int16 { - var dm_build_1432 int16 - dm_build_1432 = int16(dm_build_1430[dm_build_1431] & 0xff) - dm_build_1431++ - dm_build_1432 |= int16(dm_build_1430[dm_build_1431]&0xff) << 8 - return dm_build_1432 +func (Dm_build_99 *dm_build_0) Dm_build_98(dm_build_100 []byte, dm_build_101 int) int16 { + var dm_build_102 int16 + dm_build_102 = int16(dm_build_100[dm_build_101] & 0xff) + dm_build_101++ + dm_build_102 |= int16(dm_build_100[dm_build_101]&0xff) << 8 + return dm_build_102 } -func (Dm_build_1434 *dm_build_1330) Dm_build_1433(dm_build_1435 []byte, dm_build_1436 int) int32 { - var dm_build_1437 int32 - dm_build_1437 = int32(dm_build_1435[dm_build_1436] & 0xff) - dm_build_1436++ - dm_build_1437 |= int32(dm_build_1435[dm_build_1436]&0xff) << 8 - dm_build_1436++ - dm_build_1437 |= int32(dm_build_1435[dm_build_1436]&0xff) << 16 - dm_build_1436++ - dm_build_1437 |= int32(dm_build_1435[dm_build_1436]&0xff) << 24 - return dm_build_1437 +func (Dm_build_104 *dm_build_0) Dm_build_103(dm_build_105 []byte, dm_build_106 int) int32 { + var dm_build_107 int32 + dm_build_107 = int32(dm_build_105[dm_build_106] & 0xff) + dm_build_106++ + dm_build_107 |= int32(dm_build_105[dm_build_106]&0xff) << 8 + dm_build_106++ + dm_build_107 |= int32(dm_build_105[dm_build_106]&0xff) << 16 + dm_build_106++ + dm_build_107 |= int32(dm_build_105[dm_build_106]&0xff) << 24 + return dm_build_107 } -func (Dm_build_1439 *dm_build_1330) Dm_build_1438(dm_build_1440 []byte, dm_build_1441 int) int64 { - var dm_build_1442 int64 - dm_build_1442 = int64(dm_build_1440[dm_build_1441] & 0xff) - dm_build_1441++ - dm_build_1442 |= int64(dm_build_1440[dm_build_1441]&0xff) << 8 - dm_build_1441++ - dm_build_1442 |= int64(dm_build_1440[dm_build_1441]&0xff) << 16 - dm_build_1441++ - dm_build_1442 |= int64(dm_build_1440[dm_build_1441]&0xff) << 24 - dm_build_1441++ - dm_build_1442 |= int64(dm_build_1440[dm_build_1441]&0xff) << 32 - dm_build_1441++ - dm_build_1442 |= int64(dm_build_1440[dm_build_1441]&0xff) << 40 - dm_build_1441++ - dm_build_1442 |= int64(dm_build_1440[dm_build_1441]&0xff) << 48 - dm_build_1441++ - dm_build_1442 |= int64(dm_build_1440[dm_build_1441]&0xff) << 56 - return dm_build_1442 +func (Dm_build_109 *dm_build_0) Dm_build_108(dm_build_110 []byte, dm_build_111 int) int64 { + var dm_build_112 int64 + dm_build_112 = int64(dm_build_110[dm_build_111] & 0xff) + dm_build_111++ + dm_build_112 |= int64(dm_build_110[dm_build_111]&0xff) << 8 + dm_build_111++ + dm_build_112 |= int64(dm_build_110[dm_build_111]&0xff) << 16 + dm_build_111++ + dm_build_112 |= int64(dm_build_110[dm_build_111]&0xff) << 24 + dm_build_111++ + dm_build_112 |= int64(dm_build_110[dm_build_111]&0xff) << 32 + dm_build_111++ + dm_build_112 |= int64(dm_build_110[dm_build_111]&0xff) << 40 + dm_build_111++ + dm_build_112 |= int64(dm_build_110[dm_build_111]&0xff) << 48 + dm_build_111++ + dm_build_112 |= int64(dm_build_110[dm_build_111]&0xff) << 56 + return dm_build_112 } -func (Dm_build_1444 *dm_build_1330) Dm_build_1443(dm_build_1445 []byte, dm_build_1446 int) float32 { - return math.Float32frombits(Dm_build_1444.Dm_build_1460(dm_build_1445, dm_build_1446)) +func (Dm_build_114 *dm_build_0) Dm_build_113(dm_build_115 []byte, dm_build_116 int) float32 { + return math.Float32frombits(Dm_build_114.Dm_build_130(dm_build_115, dm_build_116)) } -func (Dm_build_1448 *dm_build_1330) Dm_build_1447(dm_build_1449 []byte, dm_build_1450 int) float64 { - return math.Float64frombits(Dm_build_1448.Dm_build_1465(dm_build_1449, dm_build_1450)) +func (Dm_build_118 *dm_build_0) Dm_build_117(dm_build_119 []byte, dm_build_120 int) float64 { + return math.Float64frombits(Dm_build_118.Dm_build_135(dm_build_119, dm_build_120)) } -func (Dm_build_1452 *dm_build_1330) Dm_build_1451(dm_build_1453 []byte, dm_build_1454 int) uint8 { - return uint8(dm_build_1453[dm_build_1454] & 0xff) +func (Dm_build_122 *dm_build_0) Dm_build_121(dm_build_123 []byte, dm_build_124 int) uint8 { + return dm_build_123[dm_build_124] & 0xff } -func (Dm_build_1456 *dm_build_1330) Dm_build_1455(dm_build_1457 []byte, dm_build_1458 int) uint16 { - var dm_build_1459 uint16 - dm_build_1459 = uint16(dm_build_1457[dm_build_1458] & 0xff) - dm_build_1458++ - dm_build_1459 |= uint16(dm_build_1457[dm_build_1458]&0xff) << 8 - return dm_build_1459 +func (Dm_build_126 *dm_build_0) Dm_build_125(dm_build_127 []byte, dm_build_128 int) uint16 { + var dm_build_129 uint16 + dm_build_129 = uint16(dm_build_127[dm_build_128] & 0xff) + dm_build_128++ + dm_build_129 |= uint16(dm_build_127[dm_build_128]&0xff) << 8 + return dm_build_129 } -func (Dm_build_1461 *dm_build_1330) Dm_build_1460(dm_build_1462 []byte, dm_build_1463 int) uint32 { - var dm_build_1464 uint32 - dm_build_1464 = uint32(dm_build_1462[dm_build_1463] & 0xff) - dm_build_1463++ - dm_build_1464 |= uint32(dm_build_1462[dm_build_1463]&0xff) << 8 - dm_build_1463++ - dm_build_1464 |= uint32(dm_build_1462[dm_build_1463]&0xff) << 16 - dm_build_1463++ - dm_build_1464 |= uint32(dm_build_1462[dm_build_1463]&0xff) << 24 - return dm_build_1464 +func (Dm_build_131 *dm_build_0) Dm_build_130(dm_build_132 []byte, dm_build_133 int) uint32 { + var dm_build_134 uint32 + dm_build_134 = uint32(dm_build_132[dm_build_133] & 0xff) + dm_build_133++ + dm_build_134 |= uint32(dm_build_132[dm_build_133]&0xff) << 8 + dm_build_133++ + dm_build_134 |= uint32(dm_build_132[dm_build_133]&0xff) << 16 + dm_build_133++ + dm_build_134 |= uint32(dm_build_132[dm_build_133]&0xff) << 24 + return dm_build_134 } -func (Dm_build_1466 *dm_build_1330) Dm_build_1465(dm_build_1467 []byte, dm_build_1468 int) uint64 { - var dm_build_1469 uint64 - dm_build_1469 = uint64(dm_build_1467[dm_build_1468] & 0xff) - dm_build_1468++ - dm_build_1469 |= uint64(dm_build_1467[dm_build_1468]&0xff) << 8 - dm_build_1468++ - dm_build_1469 |= uint64(dm_build_1467[dm_build_1468]&0xff) << 16 - dm_build_1468++ - dm_build_1469 |= uint64(dm_build_1467[dm_build_1468]&0xff) << 24 - dm_build_1468++ - dm_build_1469 |= uint64(dm_build_1467[dm_build_1468]&0xff) << 32 - dm_build_1468++ - dm_build_1469 |= uint64(dm_build_1467[dm_build_1468]&0xff) << 40 - dm_build_1468++ - dm_build_1469 |= uint64(dm_build_1467[dm_build_1468]&0xff) << 48 - dm_build_1468++ - dm_build_1469 |= uint64(dm_build_1467[dm_build_1468]&0xff) << 56 - return dm_build_1469 +func (Dm_build_136 *dm_build_0) Dm_build_135(dm_build_137 []byte, dm_build_138 int) uint64 { + var dm_build_139 uint64 + dm_build_139 = uint64(dm_build_137[dm_build_138] & 0xff) + dm_build_138++ + dm_build_139 |= uint64(dm_build_137[dm_build_138]&0xff) << 8 + dm_build_138++ + dm_build_139 |= uint64(dm_build_137[dm_build_138]&0xff) << 16 + dm_build_138++ + dm_build_139 |= uint64(dm_build_137[dm_build_138]&0xff) << 24 + dm_build_138++ + dm_build_139 |= uint64(dm_build_137[dm_build_138]&0xff) << 32 + dm_build_138++ + dm_build_139 |= uint64(dm_build_137[dm_build_138]&0xff) << 40 + dm_build_138++ + dm_build_139 |= uint64(dm_build_137[dm_build_138]&0xff) << 48 + dm_build_138++ + dm_build_139 |= uint64(dm_build_137[dm_build_138]&0xff) << 56 + return dm_build_139 } -func (Dm_build_1471 *dm_build_1330) Dm_build_1470(dm_build_1472 []byte, dm_build_1473 int) []byte { - dm_build_1474 := Dm_build_1471.Dm_build_1460(dm_build_1472, dm_build_1473) +func (Dm_build_141 *dm_build_0) Dm_build_140(dm_build_142 []byte, dm_build_143 int) []byte { + dm_build_144 := Dm_build_141.Dm_build_130(dm_build_142, dm_build_143) - dm_build_1475 := make([]byte, dm_build_1474) - copy(dm_build_1475[:int(dm_build_1474)], dm_build_1472[dm_build_1473+4:dm_build_1473+4+int(dm_build_1474)]) - return dm_build_1475 + dm_build_145 := make([]byte, dm_build_144) + copy(dm_build_145[:int(dm_build_144)], dm_build_142[dm_build_143+4:dm_build_143+4+int(dm_build_144)]) + return dm_build_145 } -func (Dm_build_1477 *dm_build_1330) Dm_build_1476(dm_build_1478 []byte, dm_build_1479 int) []byte { - dm_build_1480 := Dm_build_1477.Dm_build_1455(dm_build_1478, dm_build_1479) +func (Dm_build_147 *dm_build_0) Dm_build_146(dm_build_148 []byte, dm_build_149 int) []byte { + dm_build_150 := Dm_build_147.Dm_build_125(dm_build_148, dm_build_149) - dm_build_1481 := make([]byte, dm_build_1480) - copy(dm_build_1481[:int(dm_build_1480)], dm_build_1478[dm_build_1479+2:dm_build_1479+2+int(dm_build_1480)]) - return dm_build_1481 + dm_build_151 := make([]byte, dm_build_150) + copy(dm_build_151[:int(dm_build_150)], dm_build_148[dm_build_149+2:dm_build_149+2+int(dm_build_150)]) + return dm_build_151 } -func (Dm_build_1483 *dm_build_1330) Dm_build_1482(dm_build_1484 []byte, dm_build_1485 int, dm_build_1486 int) []byte { +func (Dm_build_153 *dm_build_0) Dm_build_152(dm_build_154 []byte, dm_build_155 int, dm_build_156 int) []byte { - dm_build_1487 := make([]byte, dm_build_1486) - copy(dm_build_1487[:dm_build_1486], dm_build_1484[dm_build_1485:dm_build_1485+dm_build_1486]) - return dm_build_1487 + dm_build_157 := make([]byte, dm_build_156) + copy(dm_build_157[:dm_build_156], dm_build_154[dm_build_155:dm_build_155+dm_build_156]) + return dm_build_157 } -func (Dm_build_1489 *dm_build_1330) Dm_build_1488(dm_build_1490 []byte, dm_build_1491 int, dm_build_1492 int, dm_build_1493 string, dm_build_1494 *DmConnection) string { - return Dm_build_1489.Dm_build_1584(dm_build_1490[dm_build_1491:dm_build_1491+dm_build_1492], dm_build_1493, dm_build_1494) +func (Dm_build_159 *dm_build_0) Dm_build_158(dm_build_160 []byte, dm_build_161 int, dm_build_162 int, dm_build_163 string, dm_build_164 *DmConnection) string { + return Dm_build_159.Dm_build_253(dm_build_160[dm_build_161:dm_build_161+dm_build_162], dm_build_163, dm_build_164) } -func (Dm_build_1496 *dm_build_1330) Dm_build_1495(dm_build_1497 []byte, dm_build_1498 int, dm_build_1499 string, dm_build_1500 *DmConnection) string { - dm_build_1501 := Dm_build_1496.Dm_build_1460(dm_build_1497, dm_build_1498) - dm_build_1498 += 4 - return Dm_build_1496.Dm_build_1488(dm_build_1497, dm_build_1498, int(dm_build_1501), dm_build_1499, dm_build_1500) +func (Dm_build_166 *dm_build_0) Dm_build_165(dm_build_167 []byte, dm_build_168 int, dm_build_169 string, dm_build_170 *DmConnection) string { + dm_build_171 := Dm_build_166.Dm_build_130(dm_build_167, dm_build_168) + dm_build_168 += 4 + return Dm_build_166.Dm_build_158(dm_build_167, dm_build_168, int(dm_build_171), dm_build_169, dm_build_170) } -func (Dm_build_1503 *dm_build_1330) Dm_build_1502(dm_build_1504 []byte, dm_build_1505 int, dm_build_1506 string, dm_build_1507 *DmConnection) string { - dm_build_1508 := Dm_build_1503.Dm_build_1455(dm_build_1504, dm_build_1505) - dm_build_1505 += 2 - return Dm_build_1503.Dm_build_1488(dm_build_1504, dm_build_1505, int(dm_build_1508), dm_build_1506, dm_build_1507) +func (Dm_build_173 *dm_build_0) Dm_build_172(dm_build_174 []byte, dm_build_175 int, dm_build_176 string, dm_build_177 *DmConnection) string { + dm_build_178 := Dm_build_173.Dm_build_125(dm_build_174, dm_build_175) + dm_build_175 += 2 + return Dm_build_173.Dm_build_158(dm_build_174, dm_build_175, int(dm_build_178), dm_build_176, dm_build_177) } -func (Dm_build_1510 *dm_build_1330) Dm_build_1509(dm_build_1511 byte) []byte { - return []byte{dm_build_1511} +func (Dm_build_180 *dm_build_0) Dm_build_179(dm_build_181 byte) []byte { + return []byte{dm_build_181} } -func (Dm_build_1513 *dm_build_1330) Dm_build_1512(dm_build_1514 int8) []byte { - return []byte{byte(dm_build_1514)} +func (Dm_build_183 *dm_build_0) Dm_build_182(dm_build_184 int8) []byte { + return []byte{byte(dm_build_184)} } -func (Dm_build_1516 *dm_build_1330) Dm_build_1515(dm_build_1517 int16) []byte { - return []byte{byte(dm_build_1517), byte(dm_build_1517 >> 8)} +func (Dm_build_186 *dm_build_0) Dm_build_185(dm_build_187 int16) []byte { + return []byte{byte(dm_build_187), byte(dm_build_187 >> 8)} } -func (Dm_build_1519 *dm_build_1330) Dm_build_1518(dm_build_1520 int32) []byte { - return []byte{byte(dm_build_1520), byte(dm_build_1520 >> 8), byte(dm_build_1520 >> 16), byte(dm_build_1520 >> 24)} +func (Dm_build_189 *dm_build_0) Dm_build_188(dm_build_190 int32) []byte { + return []byte{byte(dm_build_190), byte(dm_build_190 >> 8), byte(dm_build_190 >> 16), byte(dm_build_190 >> 24)} } -func (Dm_build_1522 *dm_build_1330) Dm_build_1521(dm_build_1523 int64) []byte { - return []byte{byte(dm_build_1523), byte(dm_build_1523 >> 8), byte(dm_build_1523 >> 16), byte(dm_build_1523 >> 24), byte(dm_build_1523 >> 32), - byte(dm_build_1523 >> 40), byte(dm_build_1523 >> 48), byte(dm_build_1523 >> 56)} +func (Dm_build_192 *dm_build_0) Dm_build_191(dm_build_193 int64) []byte { + return []byte{byte(dm_build_193), byte(dm_build_193 >> 8), byte(dm_build_193 >> 16), byte(dm_build_193 >> 24), byte(dm_build_193 >> 32), + byte(dm_build_193 >> 40), byte(dm_build_193 >> 48), byte(dm_build_193 >> 56)} } -func (Dm_build_1525 *dm_build_1330) Dm_build_1524(dm_build_1526 float32) []byte { - return Dm_build_1525.Dm_build_1536(math.Float32bits(dm_build_1526)) +func (Dm_build_195 *dm_build_0) Dm_build_194(dm_build_196 float32) []byte { + return Dm_build_195.Dm_build_206(math.Float32bits(dm_build_196)) } -func (Dm_build_1528 *dm_build_1330) Dm_build_1527(dm_build_1529 float64) []byte { - return Dm_build_1528.Dm_build_1539(math.Float64bits(dm_build_1529)) +func (Dm_build_198 *dm_build_0) Dm_build_197(dm_build_199 float64) []byte { + return Dm_build_198.Dm_build_209(math.Float64bits(dm_build_199)) } -func (Dm_build_1531 *dm_build_1330) Dm_build_1530(dm_build_1532 uint8) []byte { - return []byte{byte(dm_build_1532)} +func (Dm_build_201 *dm_build_0) Dm_build_200(dm_build_202 uint8) []byte { + return []byte{dm_build_202} } -func (Dm_build_1534 *dm_build_1330) Dm_build_1533(dm_build_1535 uint16) []byte { - return []byte{byte(dm_build_1535), byte(dm_build_1535 >> 8)} +func (Dm_build_204 *dm_build_0) Dm_build_203(dm_build_205 uint16) []byte { + return []byte{byte(dm_build_205), byte(dm_build_205 >> 8)} } -func (Dm_build_1537 *dm_build_1330) Dm_build_1536(dm_build_1538 uint32) []byte { - return []byte{byte(dm_build_1538), byte(dm_build_1538 >> 8), byte(dm_build_1538 >> 16), byte(dm_build_1538 >> 24)} +func (Dm_build_207 *dm_build_0) Dm_build_206(dm_build_208 uint32) []byte { + return []byte{byte(dm_build_208), byte(dm_build_208 >> 8), byte(dm_build_208 >> 16), byte(dm_build_208 >> 24)} } -func (Dm_build_1540 *dm_build_1330) Dm_build_1539(dm_build_1541 uint64) []byte { - return []byte{byte(dm_build_1541), byte(dm_build_1541 >> 8), byte(dm_build_1541 >> 16), byte(dm_build_1541 >> 24), byte(dm_build_1541 >> 32), byte(dm_build_1541 >> 40), byte(dm_build_1541 >> 48), byte(dm_build_1541 >> 56)} +func (Dm_build_210 *dm_build_0) Dm_build_209(dm_build_211 uint64) []byte { + return []byte{byte(dm_build_211), byte(dm_build_211 >> 8), byte(dm_build_211 >> 16), byte(dm_build_211 >> 24), byte(dm_build_211 >> 32), byte(dm_build_211 >> 40), byte(dm_build_211 >> 48), byte(dm_build_211 >> 56)} } -func (Dm_build_1543 *dm_build_1330) Dm_build_1542(dm_build_1544 []byte, dm_build_1545 string, dm_build_1546 *DmConnection) []byte { - if dm_build_1545 == "UTF-8" { - return dm_build_1544 +func (Dm_build_213 *dm_build_0) Dm_build_212(dm_build_214 []byte, dm_build_215 string, dm_build_216 *DmConnection) []byte { + if dm_build_215 == "UTF-8" { + return dm_build_214 } - if dm_build_1546 == nil { - if e := dm_build_1589(dm_build_1545); e != nil { + if dm_build_216 == nil { + if e := dm_build_258(dm_build_215); e != nil { tmp, err := io.ReadAll( - transform.NewReader(bytes.NewReader(dm_build_1544), e.NewEncoder()), + transform.NewReader(bytes.NewReader(dm_build_214), e.NewEncoder()), ) if err != nil { panic("UTF8 To Charset error!") @@ -346,25 +346,25 @@ func (Dm_build_1543 *dm_build_1330) Dm_build_1542(dm_build_1544 []byte, dm_build panic("Unsupported Charset!") } - if dm_build_1546.encodeBuffer == nil { - dm_build_1546.encodeBuffer = bytes.NewBuffer(nil) - dm_build_1546.encode = dm_build_1589(dm_build_1546.getServerEncoding()) - dm_build_1546.transformReaderDst = make([]byte, 4096) - dm_build_1546.transformReaderSrc = make([]byte, 4096) + if dm_build_216.encodeBuffer == nil { + dm_build_216.encodeBuffer = bytes.NewBuffer(nil) + dm_build_216.encode = dm_build_258(dm_build_216.getServerEncoding()) + dm_build_216.transformReaderDst = make([]byte, 4096) + dm_build_216.transformReaderSrc = make([]byte, 4096) } - if e := dm_build_1546.encode; e != nil { + if e := dm_build_216.encode; e != nil { - dm_build_1546.encodeBuffer.Reset() + dm_build_216.encodeBuffer.Reset() - n, err := dm_build_1546.encodeBuffer.ReadFrom( - Dm_build_1603(bytes.NewReader(dm_build_1544), e.NewEncoder(), dm_build_1546.transformReaderDst, dm_build_1546.transformReaderSrc), + n, err := dm_build_216.encodeBuffer.ReadFrom( + Dm_build_272(bytes.NewReader(dm_build_214), e.NewEncoder(), dm_build_216.transformReaderDst, dm_build_216.transformReaderSrc), ) if err != nil { panic("UTF8 To Charset error!") } var tmp = make([]byte, n) - if _, err = dm_build_1546.encodeBuffer.Read(tmp); err != nil { + if _, err = dm_build_216.encodeBuffer.Read(tmp); err != nil { panic("UTF8 To Charset error!") } return tmp @@ -373,177 +373,152 @@ func (Dm_build_1543 *dm_build_1330) Dm_build_1542(dm_build_1544 []byte, dm_build panic("Unsupported Charset!") } -func (Dm_build_1548 *dm_build_1330) Dm_build_1547(dm_build_1549 string, dm_build_1550 string, dm_build_1551 *DmConnection) []byte { - return Dm_build_1548.Dm_build_1542([]byte(dm_build_1549), dm_build_1550, dm_build_1551) +func (Dm_build_218 *dm_build_0) Dm_build_217(dm_build_219 string, dm_build_220 string, dm_build_221 *DmConnection) []byte { + return Dm_build_218.Dm_build_212([]byte(dm_build_219), dm_build_220, dm_build_221) } -func (Dm_build_1553 *dm_build_1330) Dm_build_1552(dm_build_1554 []byte) byte { - return Dm_build_1553.Dm_build_1424(dm_build_1554, 0) +func (Dm_build_223 *dm_build_0) Dm_build_222(dm_build_224 []byte) byte { + return Dm_build_223.Dm_build_94(dm_build_224, 0) } -func (Dm_build_1556 *dm_build_1330) Dm_build_1555(dm_build_1557 []byte) int16 { - return Dm_build_1556.Dm_build_1428(dm_build_1557, 0) +func (Dm_build_226 *dm_build_0) Dm_build_225(dm_build_227 []byte) int16 { + return Dm_build_226.Dm_build_98(dm_build_227, 0) } -func (Dm_build_1559 *dm_build_1330) Dm_build_1558(dm_build_1560 []byte) int32 { - return Dm_build_1559.Dm_build_1433(dm_build_1560, 0) +func (Dm_build_229 *dm_build_0) Dm_build_228(dm_build_230 []byte) int32 { + return Dm_build_229.Dm_build_103(dm_build_230, 0) } -func (Dm_build_1562 *dm_build_1330) Dm_build_1561(dm_build_1563 []byte) int64 { - return Dm_build_1562.Dm_build_1438(dm_build_1563, 0) +func (Dm_build_232 *dm_build_0) Dm_build_231(dm_build_233 []byte) int64 { + return Dm_build_232.Dm_build_108(dm_build_233, 0) } -func (Dm_build_1565 *dm_build_1330) Dm_build_1564(dm_build_1566 []byte) float32 { - return Dm_build_1565.Dm_build_1443(dm_build_1566, 0) +func (Dm_build_235 *dm_build_0) Dm_build_234(dm_build_236 []byte) float32 { + return Dm_build_235.Dm_build_113(dm_build_236, 0) } -func (Dm_build_1568 *dm_build_1330) Dm_build_1567(dm_build_1569 []byte) float64 { - return Dm_build_1568.Dm_build_1447(dm_build_1569, 0) +func (Dm_build_238 *dm_build_0) Dm_build_237(dm_build_239 []byte) float64 { + return Dm_build_238.Dm_build_117(dm_build_239, 0) } -func (Dm_build_1571 *dm_build_1330) Dm_build_1570(dm_build_1572 []byte) uint8 { - return Dm_build_1571.Dm_build_1451(dm_build_1572, 0) +func (Dm_build_241 *dm_build_0) Dm_build_240(dm_build_242 []byte) uint8 { + return Dm_build_241.Dm_build_121(dm_build_242, 0) } -func (Dm_build_1574 *dm_build_1330) Dm_build_1573(dm_build_1575 []byte) uint16 { - return Dm_build_1574.Dm_build_1455(dm_build_1575, 0) +func (Dm_build_244 *dm_build_0) Dm_build_243(dm_build_245 []byte) uint16 { + return Dm_build_244.Dm_build_125(dm_build_245, 0) } -func (Dm_build_1577 *dm_build_1330) Dm_build_1576(dm_build_1578 []byte) uint32 { - return Dm_build_1577.Dm_build_1460(dm_build_1578, 0) +func (Dm_build_247 *dm_build_0) Dm_build_246(dm_build_248 []byte) uint32 { + return Dm_build_247.Dm_build_130(dm_build_248, 0) } -func (Dm_build_1580 *dm_build_1330) Dm_build_1579(dm_build_1581 []byte, dm_build_1582 string, dm_build_1583 *DmConnection) []byte { - if dm_build_1582 == "UTF-8" { - return dm_build_1581 +func (Dm_build_250 *dm_build_0) Dm_build_249(dm_build_251 []byte, dm_build_252 string) []byte { + if dm_build_252 == "UTF-8" { + return dm_build_251 } - if dm_build_1583 == nil { - if e := dm_build_1589(dm_build_1582); e != nil { + if e := dm_build_258(dm_build_252); e != nil { - tmp, err := io.ReadAll( - transform.NewReader(bytes.NewReader(dm_build_1581), e.NewDecoder()), - ) - if err != nil { - - panic("Charset To UTF8 error!") - } - - return tmp - } - - panic("Unsupported Charset!") - } - - if dm_build_1583.encodeBuffer == nil { - dm_build_1583.encodeBuffer = bytes.NewBuffer(nil) - dm_build_1583.encode = dm_build_1589(dm_build_1583.getServerEncoding()) - dm_build_1583.transformReaderDst = make([]byte, 4096) - dm_build_1583.transformReaderSrc = make([]byte, 4096) - } - - if e := dm_build_1583.encode; e != nil { - - dm_build_1583.encodeBuffer.Reset() - - n, err := dm_build_1583.encodeBuffer.ReadFrom( - Dm_build_1603(bytes.NewReader(dm_build_1581), e.NewDecoder(), dm_build_1583.transformReaderDst, dm_build_1583.transformReaderSrc), + tmp, err := io.ReadAll( + transform.NewReader(bytes.NewReader(dm_build_251), e.NewDecoder()), ) if err != nil { panic("Charset To UTF8 error!") } - return dm_build_1583.encodeBuffer.Next(int(n)) + return tmp } panic("Unsupported Charset!") + } -func (Dm_build_1585 *dm_build_1330) Dm_build_1584(dm_build_1586 []byte, dm_build_1587 string, dm_build_1588 *DmConnection) string { - return string(Dm_build_1585.Dm_build_1579(dm_build_1586, dm_build_1587, dm_build_1588)) +func (Dm_build_254 *dm_build_0) Dm_build_253(dm_build_255 []byte, dm_build_256 string, _ *DmConnection) string { + return string(Dm_build_254.Dm_build_249(dm_build_255, dm_build_256)) } -func dm_build_1589(dm_build_1590 string) encoding.Encoding { - if e, err := ianaindex.MIB.Encoding(dm_build_1590); err == nil && e != nil { +func dm_build_258(dm_build_259 string) encoding.Encoding { + if e, err := ianaindex.MIB.Encoding(dm_build_259); err == nil && e != nil { return e } return nil } -type Dm_build_1591 struct { - dm_build_1592 io.Reader - dm_build_1593 transform.Transformer - dm_build_1594 error +type Dm_build_260 struct { + dm_build_261 io.Reader + dm_build_262 transform.Transformer + dm_build_263 error - dm_build_1595 []byte - dm_build_1596, dm_build_1597 int + dm_build_264 []byte + dm_build_265, dm_build_266 int - dm_build_1598 []byte - dm_build_1599, dm_build_1600 int + dm_build_267 []byte + dm_build_268, dm_build_269 int - dm_build_1601 bool + dm_build_270 bool } -const dm_build_1602 = 4096 +const _ = 4096 -func Dm_build_1603(dm_build_1604 io.Reader, dm_build_1605 transform.Transformer, dm_build_1606 []byte, dm_build_1607 []byte) *Dm_build_1591 { - dm_build_1605.Reset() - return &Dm_build_1591{ - dm_build_1592: dm_build_1604, - dm_build_1593: dm_build_1605, - dm_build_1595: dm_build_1606, - dm_build_1598: dm_build_1607, +func Dm_build_272(dm_build_273 io.Reader, dm_build_274 transform.Transformer, dm_build_275 []byte, dm_build_276 []byte) *Dm_build_260 { + dm_build_274.Reset() + return &Dm_build_260{ + dm_build_261: dm_build_273, + dm_build_262: dm_build_274, + dm_build_264: dm_build_275, + dm_build_267: dm_build_276, } } -func (dm_build_1609 *Dm_build_1591) Read(dm_build_1610 []byte) (int, error) { - dm_build_1611, dm_build_1612 := 0, error(nil) +func (dm_build_278 *Dm_build_260) Read(dm_build_279 []byte) (int, error) { + dm_build_280, dm_build_281 := 0, error(nil) for { - if dm_build_1609.dm_build_1596 != dm_build_1609.dm_build_1597 { - dm_build_1611 = copy(dm_build_1610, dm_build_1609.dm_build_1595[dm_build_1609.dm_build_1596:dm_build_1609.dm_build_1597]) - dm_build_1609.dm_build_1596 += dm_build_1611 - if dm_build_1609.dm_build_1596 == dm_build_1609.dm_build_1597 && dm_build_1609.dm_build_1601 { - return dm_build_1611, dm_build_1609.dm_build_1594 + if dm_build_278.dm_build_265 != dm_build_278.dm_build_266 { + dm_build_280 = copy(dm_build_279, dm_build_278.dm_build_264[dm_build_278.dm_build_265:dm_build_278.dm_build_266]) + dm_build_278.dm_build_265 += dm_build_280 + if dm_build_278.dm_build_265 == dm_build_278.dm_build_266 && dm_build_278.dm_build_270 { + return dm_build_280, dm_build_278.dm_build_263 } - return dm_build_1611, nil - } else if dm_build_1609.dm_build_1601 { - return 0, dm_build_1609.dm_build_1594 + return dm_build_280, nil + } else if dm_build_278.dm_build_270 { + return 0, dm_build_278.dm_build_263 } - if dm_build_1609.dm_build_1599 != dm_build_1609.dm_build_1600 || dm_build_1609.dm_build_1594 != nil { - dm_build_1609.dm_build_1596 = 0 - dm_build_1609.dm_build_1597, dm_build_1611, dm_build_1612 = dm_build_1609.dm_build_1593.Transform(dm_build_1609.dm_build_1595, dm_build_1609.dm_build_1598[dm_build_1609.dm_build_1599:dm_build_1609.dm_build_1600], dm_build_1609.dm_build_1594 == io.EOF) - dm_build_1609.dm_build_1599 += dm_build_1611 + if dm_build_278.dm_build_268 != dm_build_278.dm_build_269 || dm_build_278.dm_build_263 != nil { + dm_build_278.dm_build_265 = 0 + dm_build_278.dm_build_266, dm_build_280, dm_build_281 = dm_build_278.dm_build_262.Transform(dm_build_278.dm_build_264, dm_build_278.dm_build_267[dm_build_278.dm_build_268:dm_build_278.dm_build_269], dm_build_278.dm_build_263 == io.EOF) + dm_build_278.dm_build_268 += dm_build_280 switch { - case dm_build_1612 == nil: - if dm_build_1609.dm_build_1599 != dm_build_1609.dm_build_1600 { - dm_build_1609.dm_build_1594 = nil + case dm_build_281 == nil: + if dm_build_278.dm_build_268 != dm_build_278.dm_build_269 { + dm_build_278.dm_build_263 = nil } - dm_build_1609.dm_build_1601 = dm_build_1609.dm_build_1594 != nil + dm_build_278.dm_build_270 = dm_build_278.dm_build_263 != nil continue - case errors.Is(dm_build_1612, transform.ErrShortDst) && (dm_build_1609.dm_build_1597 != 0 || dm_build_1611 != 0): + case errors.Is(dm_build_281, transform.ErrShortDst) && (dm_build_278.dm_build_266 != 0 || dm_build_280 != 0): continue - case errors.Is(dm_build_1612, transform.ErrShortSrc) && dm_build_1609.dm_build_1600-dm_build_1609.dm_build_1599 != len(dm_build_1609.dm_build_1598) && dm_build_1609.dm_build_1594 == nil: + case errors.Is(dm_build_281, transform.ErrShortSrc) && dm_build_278.dm_build_269-dm_build_278.dm_build_268 != len(dm_build_278.dm_build_267) && dm_build_278.dm_build_263 == nil: default: - dm_build_1609.dm_build_1601 = true + dm_build_278.dm_build_270 = true - if dm_build_1609.dm_build_1594 == nil || dm_build_1609.dm_build_1594 == io.EOF { - dm_build_1609.dm_build_1594 = dm_build_1612 + if dm_build_278.dm_build_263 == nil || dm_build_278.dm_build_263 == io.EOF { + dm_build_278.dm_build_263 = dm_build_281 } continue } } - if dm_build_1609.dm_build_1599 != 0 { - dm_build_1609.dm_build_1599, dm_build_1609.dm_build_1600 = 0, copy(dm_build_1609.dm_build_1598, dm_build_1609.dm_build_1598[dm_build_1609.dm_build_1599:dm_build_1609.dm_build_1600]) + if dm_build_278.dm_build_268 != 0 { + dm_build_278.dm_build_268, dm_build_278.dm_build_269 = 0, copy(dm_build_278.dm_build_267, dm_build_278.dm_build_267[dm_build_278.dm_build_268:dm_build_278.dm_build_269]) } - dm_build_1611, dm_build_1609.dm_build_1594 = dm_build_1609.dm_build_1592.Read(dm_build_1609.dm_build_1598[dm_build_1609.dm_build_1600:]) - dm_build_1609.dm_build_1600 += dm_build_1611 + dm_build_280, dm_build_278.dm_build_263 = dm_build_278.dm_build_261.Read(dm_build_278.dm_build_267[dm_build_278.dm_build_269:]) + dm_build_278.dm_build_269 += dm_build_280 } } diff --git a/dm8/f.go b/dm8/f.go index 638febc..7465a78 100644 --- a/dm8/f.go +++ b/dm8/f.go @@ -13,24 +13,24 @@ import ( "github.com/golang/snappy" ) -func Compress(srcBuffer *Dm_build_78, offset int, length int, compressID int) ([]byte, error) { - if compressID == Dm_build_775 { - return snappy.Encode(nil, srcBuffer.Dm_build_372(offset, length)), nil +func Compress(srcBuffer *Dm_build_360, offset int, length int, compressID int) ([]byte, error) { + if compressID == Dm_build_1060 { + return snappy.Encode(nil, srcBuffer.Dm_build_654(offset, length)), nil } return GzlibCompress(srcBuffer, offset, length) } func UnCompress(srcBytes []byte, compressID int) ([]byte, error) { - if compressID == Dm_build_775 { + if compressID == Dm_build_1060 { return snappy.Decode(nil, srcBytes) } return GzlibUncompress(srcBytes) } -func GzlibCompress(srcBuffer *Dm_build_78, offset int, length int) ([]byte, error) { +func GzlibCompress(srcBuffer *Dm_build_360, offset int, length int) ([]byte, error) { var ret bytes.Buffer var w = zlib.NewWriter(&ret) - _, _ = w.Write(srcBuffer.Dm_build_372(offset, length)) + _, _ = w.Write(srcBuffer.Dm_build_654(offset, length)) _ = w.Close() return ret.Bytes(), nil } diff --git a/dm8/g.go b/dm8/g.go index a359c19..8175077 100644 --- a/dm8/g.go +++ b/dm8/g.go @@ -473,6 +473,7 @@ type sqlStat struct { DataSourceId string } +//goland:noinspection GoExportedFuncWithUnexportedType func NewSqlStat(sql string) *sqlStat { s := new(sqlStat) s.Sql = sql @@ -1077,6 +1078,7 @@ func (cs *connectionStat) createSqlStat(sql string) *sqlStat { } +//goland:noinspection GoBoolExpressions func (cs *connectionStat) putSqlStat(sqlStat *sqlStat) bool { if cs.maxSqlSize > 0 && len(cs.sqlStatMap) == cs.maxSqlSize { if StatSqlRemoveMode == STAT_SQL_REMOVE_OLDEST { @@ -1098,6 +1100,7 @@ func (cs *connectionStat) putSqlStat(sqlStat *sqlStat) bool { } } +//goland:noinspection GoBoolExpressions func (cs *connectionStat) eliminateSqlStat() *sqlStat { if cs.maxSqlSize > 0 && len(cs.sqlStatMap) == cs.maxSqlSize { if StatSqlRemoveMode == STAT_SQL_REMOVE_OLDEST { @@ -1603,7 +1606,7 @@ func (sr *StatReader) service(url string, params *Properties) []map[string]inter } } -func (sr *StatReader) getSqlStatList(params *Properties) []map[string]interface{} { +func (sr *StatReader) getSqlStatList(_ *Properties) []map[string]interface{} { array := make([]map[string]interface{}, 0) connStatMap := goStat.getConnStatMap() var sqlStatMap map[string]*sqlStat @@ -1857,9 +1860,9 @@ func (sr *StatReader) comparatorOrderBy(array []map[string]interface{}, params * if len(array) > 0 { - if orderBy != "" { - sort.Sort(newMapSlice(array, !(DEFAULT_ORDER_TYPE == orderType), orderBy)) - } + //if orderBy != "" { + sort.Sort(newMapSlice(array, !(DEFAULT_ORDER_TYPE == orderType), orderBy)) + //} fromIndex := (pageNum - 1) * pageSize @@ -2033,7 +2036,7 @@ type statFlusher struct { flushFreq int filePath string filePrefix string - buffer *Dm_build_0 + buffer *Dm_build_282 } func newStatFlusher() *statFlusher { @@ -2044,7 +2047,7 @@ func newStatFlusher() *statFlusher { sf.flushFreq = StatFlushFreq sf.filePath = StatDir sf.filePrefix = "dm_go_stat" - sf.buffer = Dm_build_4() + sf.buffer = Dm_build_286() return sf } @@ -2106,25 +2109,25 @@ func (sf *statFlusher) writeAndFlush(logs []string, startOff int, l int) { for i := startOff; i < startOff+l; i++ { bytes = []byte(logs[i] + util.StringUtil.LineSeparator()) - sf.buffer.Dm_build_26(bytes, 0, len(bytes)) + sf.buffer.Dm_build_308(bytes, 0, len(bytes)) - if sf.buffer.Dm_build_5() >= FLUSH_SIZE { + if sf.buffer.Dm_build_287() >= FLUSH_SIZE { sf.doFlush(sf.buffer) } } - if sf.buffer.Dm_build_5() > 0 { + if sf.buffer.Dm_build_287() > 0 { sf.doFlush(sf.buffer) } } -func (sf *statFlusher) doFlush(buffer *Dm_build_0) { +func (sf *statFlusher) doFlush(buffer *Dm_build_282) { if sf.needCreateNewFile() { sf.closeCurrentFile() sf.logFile = sf.createNewFile() } if sf.logFile != nil { - buffer.Dm_build_20(sf.logFile, buffer.Dm_build_5()) + buffer.Dm_build_302(sf.logFile, buffer.Dm_build_287()) } } func (sf *statFlusher) closeCurrentFile() { diff --git a/dm8/h.go b/dm8/h.go index cdf5acd..d87d721 100644 --- a/dm8/h.go +++ b/dm8/h.go @@ -99,7 +99,7 @@ func dmdtDecodeFast(value []byte) []int { if dtype == DATE { - dt[OFFSET_YEAR] = int(Dm_build_1331.Dm_build_1428(value, 0)) & 0x7FFF + dt[OFFSET_YEAR] = int(Dm_build_1.Dm_build_98(value, 0)) & 0x7FFF if dt[OFFSET_YEAR] > 9999 { dt[OFFSET_YEAR] = int(int16(dt[OFFSET_YEAR] | 0x8000)) } @@ -119,10 +119,10 @@ func dmdtDecodeFast(value []byte) []int { dt[OFFSET_SECOND] = ((int(value[1]) >> 3) & 0x1f) + ((int(value[2]) & 0x01) << 5) dt[OFFSET_NANOSECOND] = ((int(value[2]) >> 1) & 0x7f) + ((int(value[3]) & 0x00ff) << 7) + ((int(value[4]) & 0x1F) << 15) dt[OFFSET_NANOSECOND] *= 1000 - dt[OFFSET_TIMEZONE] = int(Dm_build_1331.Dm_build_1428(value, 5)) + dt[OFFSET_TIMEZONE] = int(Dm_build_1.Dm_build_98(value, 5)) } else if dtype == DATETIME { - dt[OFFSET_YEAR] = int(Dm_build_1331.Dm_build_1428(value, 0)) & 0x7FFF + dt[OFFSET_YEAR] = int(Dm_build_1.Dm_build_98(value, 0)) & 0x7FFF if dt[OFFSET_YEAR] > 9999 { dt[OFFSET_YEAR] = int(int16(dt[OFFSET_YEAR] | 0x8000)) } @@ -141,7 +141,7 @@ func dmdtDecodeFast(value []byte) []int { dt[OFFSET_NANOSECOND] *= 1000 } else if dtype == DATETIME_TZ { - dt[OFFSET_YEAR] = int(Dm_build_1331.Dm_build_1428(value, 0)) & 0x7FFF + dt[OFFSET_YEAR] = int(Dm_build_1.Dm_build_98(value, 0)) & 0x7FFF if dt[OFFSET_YEAR] > 9999 { dt[OFFSET_YEAR] = int(int16(dt[OFFSET_YEAR] | 0x8000)) } @@ -159,10 +159,10 @@ func dmdtDecodeFast(value []byte) []int { dt[OFFSET_NANOSECOND] = ((int(value[5]) >> 1) & 0x7f) + ((int(value[6]) & 0x00ff) << 7) + ((int(value[7]) & 0x1F) << 15) dt[OFFSET_NANOSECOND] *= 1000 - dt[OFFSET_TIMEZONE] = int(Dm_build_1331.Dm_build_1428(value, len(value)-2)) + dt[OFFSET_TIMEZONE] = int(Dm_build_1.Dm_build_98(value, len(value)-2)) } else if dtype == DATETIME2 { - dt[OFFSET_YEAR] = int(Dm_build_1331.Dm_build_1428(value, 0)) & 0x7FFF + dt[OFFSET_YEAR] = int(Dm_build_1.Dm_build_98(value, 0)) & 0x7FFF if dt[OFFSET_YEAR] > 9999 { dt[OFFSET_YEAR] = int(int16(dt[OFFSET_YEAR] | 0x8000)) } @@ -180,7 +180,7 @@ func dmdtDecodeFast(value []byte) []int { dt[OFFSET_NANOSECOND] = ((int(value[5]) >> 1) & 0x7f) + ((int(value[6]) & 0x00ff) << 7) + ((int(value[7]) & 0x00ff) << 15) + ((int(value[8]) & 0x7F) << 23) } else if dtype == DATETIME2_TZ { - dt[OFFSET_YEAR] = int(Dm_build_1331.Dm_build_1428(value, 0)) & 0x7FFF + dt[OFFSET_YEAR] = int(Dm_build_1.Dm_build_98(value, 0)) & 0x7FFF if dt[OFFSET_YEAR] > 9999 { dt[OFFSET_YEAR] = int(int16(dt[OFFSET_YEAR] | 0x8000)) } @@ -197,21 +197,21 @@ func dmdtDecodeFast(value []byte) []int { dt[OFFSET_NANOSECOND] = ((int(value[5]) >> 1) & 0x7f) + ((int(value[6]) & 0x00ff) << 7) + ((int(value[7]) & 0x00ff) << 15) + ((int(value[8]) & 0x7F) << 23) - dt[OFFSET_TIMEZONE] = int(Dm_build_1331.Dm_build_1428(value, len(value)-2)) + dt[OFFSET_TIMEZONE] = int(Dm_build_1.Dm_build_98(value, len(value)-2)) } return dt } func dmdtDecodeBdta(value []byte) []int { dt := make([]int, DT_LEN) - dt[OFFSET_YEAR] = int(Dm_build_1331.Dm_build_1428(value, 0)) + dt[OFFSET_YEAR] = int(Dm_build_1.Dm_build_98(value, 0)) dt[OFFSET_MONTH] = int(value[2] & 0xFF) dt[OFFSET_DAY] = int(value[3] & 0xFF) dt[OFFSET_HOUR] = int(value[4] & 0xFF) dt[OFFSET_MINUTE] = int(value[5] & 0xFF) dt[OFFSET_SECOND] = int(value[6] & 0xFF) dt[OFFSET_NANOSECOND] = int((value[7] & 0xFF) + (value[8] << 8) + (value[9] << 16)) - dt[OFFSET_TIMEZONE] = int(Dm_build_1331.Dm_build_1428(value, 10)) + dt[OFFSET_TIMEZONE] = int(Dm_build_1.Dm_build_98(value, 10)) if len(value) > 12 { @@ -735,7 +735,7 @@ func encode(dt []int, column column, lTz int, dTz int) ([]byte, error) { ret[7] = (byte)((msec >> 15) & 0xFF) - Dm_build_1331.Dm_build_1342(ret, 8, int16(tz)) + Dm_build_1.Dm_build_12(ret, 8, int16(tz)) } else if column.colType == DATETIME2_TZ { ret = make([]byte, 11) @@ -761,7 +761,7 @@ func encode(dt []int, column column, lTz int, dTz int) ([]byte, error) { ret[8] = (byte)((msec >> 23) & 0xFF) - Dm_build_1331.Dm_build_1342(ret, 8, int16(tz)) + Dm_build_1.Dm_build_12(ret, 8, int16(tz)) } else if column.colType == TIME { msec /= 1000 ret = make([]byte, 5) @@ -789,7 +789,7 @@ func encode(dt []int, column column, lTz int, dTz int) ([]byte, error) { ret[4] = (byte)((msec >> 15) & 0xFF) - Dm_build_1331.Dm_build_1342(ret, 5, int16(tz)) + Dm_build_1.Dm_build_12(ret, 5, int16(tz)) } return ret, nil diff --git a/dm8/i.go b/dm8/i.go index 325a9f6..5caf9bb 100644 --- a/dm8/i.go +++ b/dm8/i.go @@ -35,7 +35,7 @@ func (DB2G db2g) charToString(bytes []byte, column *column, conn *DmConnection) clobStr, _ := clob.getSubString(1, int32(clobLen)) return clobStr } - return Dm_build_1331.Dm_build_1584(bytes, conn.serverEncoding, conn) + return Dm_build_1.Dm_build_253(bytes, conn.serverEncoding, conn) } func (DB2G db2g) charToFloat64(bytes []byte, column *column, conn *DmConnection) (float64, error) { @@ -101,7 +101,7 @@ func (DB2G db2g) decToDecimal(bytes []byte, prec int, scale int, compatibleOracl } func (DB2G db2g) toBytes(bytes []byte, column *column, conn *DmConnection) ([]byte, error) { - retBytes := Dm_build_1331.Dm_build_1482(bytes, 0, len(bytes)) + retBytes := Dm_build_1.Dm_build_152(bytes, 0, len(bytes)) switch column.colType { case CLOB: clob := newClobFromDB(retBytes, conn, column, true) @@ -110,7 +110,7 @@ func (DB2G db2g) toBytes(bytes []byte, column *column, conn *DmConnection) ([]by return nil, err } - return Dm_build_1331.Dm_build_1547(str, conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(str, conn.getServerEncoding(), conn), nil case BLOB: blob := newBlobFromDB(retBytes, conn, column, true) bs, err := blob.getBytes(1, int32(blob.length)) @@ -130,15 +130,15 @@ func (DB2G db2g) toString(bytes []byte, column *column, conn *DmConnection) stri case BIT, BOOLEAN, TINYINT: return strconv.FormatInt(int64(bytes[0]), 10) case SMALLINT: - return strconv.FormatInt(int64(Dm_build_1331.Dm_build_1555(bytes)), 10) + return strconv.FormatInt(int64(Dm_build_1.Dm_build_225(bytes)), 10) case INT: - return strconv.FormatInt(int64(Dm_build_1331.Dm_build_1558(bytes)), 10) + return strconv.FormatInt(int64(Dm_build_1.Dm_build_228(bytes)), 10) case BIGINT: - return strconv.FormatInt(Dm_build_1331.Dm_build_1561(bytes), 10) + return strconv.FormatInt(Dm_build_1.Dm_build_231(bytes), 10) case REAL: - return strconv.FormatFloat(float64(Dm_build_1331.Dm_build_1564(bytes)), 'f', -1, 32) + return strconv.FormatFloat(float64(Dm_build_1.Dm_build_234(bytes)), 'f', -1, 32) case DOUBLE: - return strconv.FormatFloat(Dm_build_1331.Dm_build_1567(bytes), 'f', -1, 64) + return strconv.FormatFloat(Dm_build_1.Dm_build_237(bytes), 'f', -1, 64) case DECIMAL: case BINARY, VARBINARY: @@ -193,15 +193,15 @@ func (DB2G db2g) toBool(bytes []byte, column *column, conn *DmConnection) (bool, case BIT, BOOLEAN, TINYINT: return bytes[0] != 0, nil case SMALLINT: - return Dm_build_1331.Dm_build_1428(bytes, 0) != 0, nil + return Dm_build_1.Dm_build_98(bytes, 0) != 0, nil case INT: - return Dm_build_1331.Dm_build_1433(bytes, 0) != 0, nil + return Dm_build_1.Dm_build_103(bytes, 0) != 0, nil case BIGINT: - return Dm_build_1331.Dm_build_1438(bytes, 0) != 0, nil + return Dm_build_1.Dm_build_108(bytes, 0) != 0, nil case REAL: - return Dm_build_1331.Dm_build_1443(bytes, 0) != 0, nil + return Dm_build_1.Dm_build_113(bytes, 0) != 0, nil case DOUBLE: - return Dm_build_1331.Dm_build_1447(bytes, 0) != 0, nil + return Dm_build_1.Dm_build_117(bytes, 0) != 0, nil case DECIMAL: case CHAR, VARCHAR, VARCHAR2, CLOB: @@ -221,31 +221,31 @@ func (DB2G db2g) toByte(bytes []byte, column *column, conn *DmConnection) (byte, return bytes[0], nil } case SMALLINT: - tval := Dm_build_1331.Dm_build_1428(bytes, 0) + tval := Dm_build_1.Dm_build_98(bytes, 0) if tval < int16(BYTE_MIN) || tval > int16(BYTE_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return byte(tval), nil case INT: - tval := Dm_build_1331.Dm_build_1433(bytes, 0) + tval := Dm_build_1.Dm_build_103(bytes, 0) if tval < int32(BYTE_MIN) || tval > int32(BYTE_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return byte(tval), nil case BIGINT: - tval := Dm_build_1331.Dm_build_1438(bytes, 0) + tval := Dm_build_1.Dm_build_108(bytes, 0) if tval < int64(BYTE_MIN) || tval > int64(BYTE_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return byte(tval), nil case REAL: - tval := Dm_build_1331.Dm_build_1443(bytes, 0) + tval := Dm_build_1.Dm_build_113(bytes, 0) if tval < float32(BYTE_MIN) || tval > float32(BYTE_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return byte(tval), nil case DOUBLE: - tval := Dm_build_1331.Dm_build_1447(bytes, 0) + tval := Dm_build_1.Dm_build_117(bytes, 0) if tval < float64(BYTE_MIN) || tval > float64(BYTE_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } @@ -288,32 +288,32 @@ func (DB2G db2g) toInt8(bytes []byte, column *column, conn *DmConnection) (int8, return int8(bytes[0]), nil case SMALLINT: - tval := Dm_build_1331.Dm_build_1428(bytes, 0) + tval := Dm_build_1.Dm_build_98(bytes, 0) if tval < int16(INT8_MIN) || tval < int16(INT8_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int8(tval), nil case INT: - tval := Dm_build_1331.Dm_build_1433(bytes, 0) + tval := Dm_build_1.Dm_build_103(bytes, 0) if tval < int32(INT8_MIN) || tval > int32(INT8_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int8(tval), nil case BIGINT: - tval := Dm_build_1331.Dm_build_1438(bytes, 0) + tval := Dm_build_1.Dm_build_108(bytes, 0) if tval < int64(INT8_MIN) || tval > int64(INT8_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int8(tval), nil case REAL: - tval := Dm_build_1331.Dm_build_1443(bytes, 0) + tval := Dm_build_1.Dm_build_113(bytes, 0) if tval < float32(INT8_MIN) || tval > float32(INT8_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int8(tval), nil case DOUBLE: - tval := Dm_build_1331.Dm_build_1447(bytes, 0) + tval := Dm_build_1.Dm_build_117(bytes, 0) if tval < float64(INT8_MIN) || tval > float64(INT8_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } @@ -356,28 +356,28 @@ func (DB2G db2g) toInt16(bytes []byte, column *column, conn *DmConnection) (int1 return int16(bytes[0]), nil case SMALLINT: - return Dm_build_1331.Dm_build_1428(bytes, 0), nil + return Dm_build_1.Dm_build_98(bytes, 0), nil case INT: - tval := Dm_build_1331.Dm_build_1433(bytes, 0) + tval := Dm_build_1.Dm_build_103(bytes, 0) if tval < int32(INT16_MIN) || tval > int32(INT16_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int16(tval), nil case BIGINT: - tval := Dm_build_1331.Dm_build_1438(bytes, 0) + tval := Dm_build_1.Dm_build_108(bytes, 0) if tval < int64(INT16_MIN) || tval > int64(INT16_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int16(tval), nil case REAL: - tval := Dm_build_1331.Dm_build_1443(bytes, 0) + tval := Dm_build_1.Dm_build_113(bytes, 0) if tval < float32(INT16_MIN) || tval > float32(INT16_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int16(tval), nil case DOUBLE: - tval := Dm_build_1331.Dm_build_1447(bytes, 0) + tval := Dm_build_1.Dm_build_117(bytes, 0) if tval < float64(INT16_MIN) || tval > float64(INT16_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } @@ -420,27 +420,27 @@ func (DB2G db2g) toUInt16(bytes []byte, column *column, conn *DmConnection) (uin return uint16(bytes[0]), nil case SMALLINT: - return uint16(Dm_build_1331.Dm_build_1428(bytes, 0)), nil + return uint16(Dm_build_1.Dm_build_98(bytes, 0)), nil case INT: - tval := Dm_build_1331.Dm_build_1433(bytes, 0) + tval := Dm_build_1.Dm_build_103(bytes, 0) if tval < int32(UINT16_MIN) || tval > int32(UINT16_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return uint16(tval), nil case BIGINT: - tval := Dm_build_1331.Dm_build_1438(bytes, 0) + tval := Dm_build_1.Dm_build_108(bytes, 0) if tval < int64(UINT16_MIN) || tval > int64(UINT16_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return uint16(tval), nil case REAL: - tval := Dm_build_1331.Dm_build_1443(bytes, 0) + tval := Dm_build_1.Dm_build_113(bytes, 0) if tval < float32(UINT16_MIN) || tval > float32(UINT16_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return uint16(tval), nil case DOUBLE: - tval := Dm_build_1331.Dm_build_1447(bytes, 0) + tval := Dm_build_1.Dm_build_117(bytes, 0) if tval < float64(UINT16_MIN) || tval > float64(UINT16_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } @@ -483,23 +483,23 @@ func (DB2G db2g) toInt32(bytes []byte, column *column, conn *DmConnection) (int3 return int32(bytes[0]), nil case SMALLINT: - return int32(Dm_build_1331.Dm_build_1428(bytes, 0)), nil + return int32(Dm_build_1.Dm_build_98(bytes, 0)), nil case INT: - return Dm_build_1331.Dm_build_1433(bytes, 0), nil + return Dm_build_1.Dm_build_103(bytes, 0), nil case BIGINT: - tval := Dm_build_1331.Dm_build_1438(bytes, 0) + tval := Dm_build_1.Dm_build_108(bytes, 0) if tval < int64(INT32_MIN) || tval > int64(INT32_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int32(tval), nil case REAL: - tval := Dm_build_1331.Dm_build_1443(bytes, 0) + tval := Dm_build_1.Dm_build_113(bytes, 0) if tval < float32(INT32_MIN) || tval > float32(INT32_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return int32(tval), nil case DOUBLE: - tval := Dm_build_1331.Dm_build_1447(bytes, 0) + tval := Dm_build_1.Dm_build_117(bytes, 0) if tval < float64(INT32_MIN) || tval > float64(INT32_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } @@ -542,23 +542,23 @@ func (DB2G db2g) toUInt32(bytes []byte, column *column, conn *DmConnection) (uin return uint32(bytes[0]), nil case SMALLINT: - return uint32(Dm_build_1331.Dm_build_1428(bytes, 0)), nil + return uint32(Dm_build_1.Dm_build_98(bytes, 0)), nil case INT: - return uint32(Dm_build_1331.Dm_build_1433(bytes, 0)), nil + return uint32(Dm_build_1.Dm_build_103(bytes, 0)), nil case BIGINT: - tval := Dm_build_1331.Dm_build_1438(bytes, 0) + tval := Dm_build_1.Dm_build_108(bytes, 0) if tval < int64(UINT32_MIN) || tval > int64(UINT32_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return uint32(tval), nil case REAL: - tval := Dm_build_1331.Dm_build_1443(bytes, 0) + tval := Dm_build_1.Dm_build_113(bytes, 0) if tval < float32(UINT32_MIN) || tval > float32(UINT32_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } return uint32(tval), nil case DOUBLE: - tval := Dm_build_1331.Dm_build_1447(bytes, 0) + tval := Dm_build_1.Dm_build_117(bytes, 0) if tval < float64(UINT32_MIN) || tval > float64(UINT32_MAX) { return 0, ECGO_DATA_OVERFLOW.throw() } @@ -601,15 +601,15 @@ func (DB2G db2g) toInt64(bytes []byte, column *column, conn *DmConnection) (int6 return int64(bytes[0]), nil } case SMALLINT: - return int64(Dm_build_1331.Dm_build_1555(bytes)), nil + return int64(Dm_build_1.Dm_build_225(bytes)), nil case INT: - return int64(Dm_build_1331.Dm_build_1558(bytes)), nil + return int64(Dm_build_1.Dm_build_228(bytes)), nil case BIGINT: - return Dm_build_1331.Dm_build_1561(bytes), nil + return Dm_build_1.Dm_build_231(bytes), nil case REAL: - return int64(Dm_build_1331.Dm_build_1564(bytes)), nil + return int64(Dm_build_1.Dm_build_234(bytes)), nil case DOUBLE: - return int64(Dm_build_1331.Dm_build_1567(bytes)), nil + return int64(Dm_build_1.Dm_build_237(bytes)), nil case CHAR, VARCHAR2, VARCHAR, CLOB: tval, err := DB2G.charToFloat64(bytes, column, conn) @@ -641,15 +641,15 @@ func (DB2G db2g) toUInt64(bytes []byte, column *column, conn *DmConnection) (uin return uint64(bytes[0]), nil } case SMALLINT: - return uint64(Dm_build_1331.Dm_build_1555(bytes)), nil + return uint64(Dm_build_1.Dm_build_225(bytes)), nil case INT: - return uint64(Dm_build_1331.Dm_build_1558(bytes)), nil + return uint64(Dm_build_1.Dm_build_228(bytes)), nil case BIGINT: - return uint64(Dm_build_1331.Dm_build_1561(bytes)), nil + return uint64(Dm_build_1.Dm_build_231(bytes)), nil case REAL: - return uint64(Dm_build_1331.Dm_build_1564(bytes)), nil + return uint64(Dm_build_1.Dm_build_234(bytes)), nil case DOUBLE: - return uint64(Dm_build_1331.Dm_build_1567(bytes)), nil + return uint64(Dm_build_1.Dm_build_237(bytes)), nil case CHAR, VARCHAR2, VARCHAR, CLOB: tval, err := DB2G.charToFloat64(bytes, column, conn) @@ -700,15 +700,15 @@ func (DB2G db2g) toFloat32(bytes []byte, column *column, conn *DmConnection) (fl } return float32(bytes[0]), nil case SMALLINT: - return float32(Dm_build_1331.Dm_build_1428(bytes, 0)), nil + return float32(Dm_build_1.Dm_build_98(bytes, 0)), nil case INT: - return float32(Dm_build_1331.Dm_build_1433(bytes, 0)), nil + return float32(Dm_build_1.Dm_build_103(bytes, 0)), nil case BIGINT: - return float32(Dm_build_1331.Dm_build_1438(bytes, 0)), nil + return float32(Dm_build_1.Dm_build_108(bytes, 0)), nil case REAL: - return Dm_build_1331.Dm_build_1443(bytes, 0), nil + return Dm_build_1.Dm_build_113(bytes, 0), nil case DOUBLE: - dval := Dm_build_1331.Dm_build_1447(bytes, 0) + dval := Dm_build_1.Dm_build_117(bytes, 0) return float32(dval), nil case DECIMAL: dval, err := DB2G.decToDecimal(bytes, int(column.prec), int(column.scale), conn.CompatibleOracle()) @@ -734,15 +734,15 @@ func (DB2G db2g) toFloat64(bytes []byte, column *column, conn *DmConnection) (fl } return float64(bytes[0]), nil case SMALLINT: - return float64(Dm_build_1331.Dm_build_1428(bytes, 0)), nil + return float64(Dm_build_1.Dm_build_98(bytes, 0)), nil case INT: - return float64(Dm_build_1331.Dm_build_1433(bytes, 0)), nil + return float64(Dm_build_1.Dm_build_103(bytes, 0)), nil case BIGINT: - return float64(Dm_build_1331.Dm_build_1438(bytes, 0)), nil + return float64(Dm_build_1.Dm_build_108(bytes, 0)), nil case REAL: - return float64(Dm_build_1331.Dm_build_1443(bytes, 0)), nil + return float64(Dm_build_1.Dm_build_113(bytes, 0)), nil case DOUBLE: - return Dm_build_1331.Dm_build_1447(bytes, 0), nil + return Dm_build_1.Dm_build_117(bytes, 0), nil case DECIMAL: dval, err := DB2G.decToDecimal(bytes, int(column.prec), int(column.scale), conn.CompatibleOracle()) if err != nil { @@ -790,15 +790,15 @@ func (DB2G db2g) toDmDecimal(value []byte, column *column, conn *DmConnection) ( return NewDecimalFromInt64(int64(value[0])) } case SMALLINT: - return NewDecimalFromInt64(int64(Dm_build_1331.Dm_build_1428(value, 0))) + return NewDecimalFromInt64(int64(Dm_build_1.Dm_build_98(value, 0))) case INT: - return NewDecimalFromInt64(int64(Dm_build_1331.Dm_build_1433(value, 0))) + return NewDecimalFromInt64(int64(Dm_build_1.Dm_build_103(value, 0))) case BIGINT: - return NewDecimalFromInt64(Dm_build_1331.Dm_build_1438(value, 0)) + return NewDecimalFromInt64(Dm_build_1.Dm_build_108(value, 0)) case REAL: - return NewDecimalFromFloat64(float64(Dm_build_1331.Dm_build_1443(value, 0))) + return NewDecimalFromFloat64(float64(Dm_build_1.Dm_build_113(value, 0))) case DOUBLE: - return NewDecimalFromFloat64(Dm_build_1331.Dm_build_1447(value, 0)) + return NewDecimalFromFloat64(Dm_build_1.Dm_build_117(value, 0)) case DECIMAL: return decodeDecimal(value, int(column.prec), int(column.scale)) case CHAR, VARCHAR, VARCHAR2, CLOB: @@ -827,19 +827,19 @@ func (DB2G db2g) toObject(bytes []byte, column *column, conn *DmConnection) (int case TINYINT: - return Dm_build_1331.Dm_build_1424(bytes, 0), nil + return Dm_build_1.Dm_build_94(bytes, 0), nil case SMALLINT: - return Dm_build_1331.Dm_build_1428(bytes, 0), nil + return Dm_build_1.Dm_build_98(bytes, 0), nil case INT: - return Dm_build_1331.Dm_build_1433(bytes, 0), nil + return Dm_build_1.Dm_build_103(bytes, 0), nil case BIGINT: - return Dm_build_1331.Dm_build_1438(bytes, 0), nil + return Dm_build_1.Dm_build_108(bytes, 0), nil case DECIMAL: return DB2G.decToDecimal(bytes, int(column.prec), int(column.scale), conn.CompatibleOracle()) case REAL: - return Dm_build_1331.Dm_build_1443(bytes, 0), nil + return Dm_build_1.Dm_build_113(bytes, 0), nil case DOUBLE: - return Dm_build_1331.Dm_build_1447(bytes, 0), nil + return Dm_build_1.Dm_build_117(bytes, 0), nil case DATE, TIME, DATETIME, TIME_TZ, DATETIME_TZ, DATETIME2, DATETIME2_TZ: dt := decode(bytes, column.isBdta, *column, int(conn.dmConnector.localTimezone), int(conn.DbTimezone)) return toTimeFromDT(dt, int(conn.dmConnector.localTimezone)), nil diff --git a/dm8/i18n/zm.go b/dm8/i18n/zm.go index f04be96..26055b6 100644 --- a/dm8/i18n/zm.go +++ b/dm8/i18n/zm.go @@ -5,13 +5,69 @@ package i18n -const Messages_zh_TW = `{ +const Messages_zh_HK = `{ "language": "zh-Hant", "messages": [ { "id": "error.dsn.invalidSchema", "translation": "DSN串必須以dm://開頭" }, + { + "id": "error.unsupported.scan", + "translation": "Scan類型轉換出錯" + }, + { + "id": "error.invalidParameterNumber", + "translation": "參數個數不匹配" + }, + { + "id": "error.initThirdPartCipherFailed", + "translation": "第三方加密初始化失敗" + }, + { + "id": "error.connectionSwitchFailed", + "translation": "連接重置失敗" + }, + { + "id": "error.connectionSwitched", + "translation": "連接已重置" + }, + { + "id": "error.invalidServerMode", + "translation": "服務器模式不匹配" + }, + { + "id": "error.osauthError", + "translation": "同時使用了指定用戶登錄和OS認證登錄, 請確定一種方式." + }, + { + "id": "error.notQuerySQL", + "translation": "非查詢SQL語句" + }, + { + "id": "error.notExecSQL", + "translation": "非執行SQL語句" + }, + { + "id": "error.invalidTranIsolation", + "translation": "非法的事務隔離級" + }, + { + "id": "errorCommitInAutoCommitMode", + "translation": "自動提交模式下不能手動提交" + }, + { + "id": "errorRollbackInAutoCommitMode", + "translation": "自動提交模式下不能手動回滾" + }, + { + "id": "errorStatementHandleClosed", + "translation": "語句已經關閉" + }, + { + "id": "errorResultSetColsed", + "translation": "結果集已經關閉" + }, { "id": "error.communicationError", "translation": "網絡通信異常" @@ -23,6 +79,166 @@ const Messages_zh_TW = `{ { "id": "error.unkownNetWork", "translation": "未知的網絡" - } + }, + { + "id": "error.serverVersion", + "translation": "服務器版本太低" + }, + { + "id": "error.usernameTooLong", + "translation": "用戶名超長" + }, + { + "id": "error.passwordTooLong", + "translation": "密碼超長" + }, + { + "id": "error.dataTooLong", + "translation": "數據大小已超過可支持範圍" + }, + { + "id": "error.invalidColumnType", + "translation": "無效的列類型" + }, + { + "id": "error.dataConvertionError", + "translation": "類型轉換異常" + }, + { + "id": "error.invalidConn", + "translation": "連接失效" + }, + { + "id": "error.invalidHex", + "translation": "無效的十六進制数字" + }, + { + "id": "error.invalidBFile", + "translation": "無效的BFile格式串" + }, + { + "id": "error.dataOverflow", + "translation": "数字溢出" + }, + { + "id": "error.invalidDateTimeFormat", + "translation": "錯誤的日期時間類型格式" + }, + { + "id": "error.datetimeOverflow", + "translation": "数字溢出" + }, + { + "id": "error.invalidTimeInterval", + "translation": "錯誤的時間間隔類型數據" + }, + { + "id": "error.unsupportedInparamType", + "translation": "輸入參數類型不支持" + }, + { + "id": "error.unsupportedOutparamType", + "translation": "輸出參數類型不支持" + }, + { + "id": "error.unsupportedType", + "translation": "不支持該數據類型" + }, + { + "id": "error.invalidObjBlob", + "translation": "無效的對象BLOB數據" + }, + { + "id": "error.structMemNotMatch", + "translation": "記錄或類數據成員不匹配" + }, + { + "id": "error.invalidComplexTypeName", + "translation": "無效的類型描述名稱" + }, + { + "id": "error.invalidParamterValue", + "translation": "無效的參數值" + }, + { + "id": "error.invalidArrayLen", + "translation": "靜態數組長度大於定義時長度" + }, + { + "id": "error.invalidSequenceNumber", + "translation": "無效的列序號" + }, + { + "id": "error.resultsetInReadOnlyStatus", + "translation": "結果集處於只讀狀態" + }, + { + "id": "error.SSLInitFailed", + "translation": "初始化SSL環境失敗" + }, + { + "id": "error.LobDataHasFreed", + "translation": "LOB數據已經被釋放" + }, + { + "id": "error.fatalError", + "translation": "致命錯誤" + }, + { + "id": "error.invalidLenOrOffset", + "translation": "長度或偏移錯誤" + }, + { + "id": "error.intervalValueOverflow", + "translation": "時間間隔類型數據溢出" + }, + { + "id": "error.invalidCipher", + "translation": "不支持的加密類型" + }, + { + "id": "error.storeInNilPointer", + "translation": "無法將數據存入空指針" + }, + { + "id": "error.batchError", + "translation": "批量執行出錯" + }, + { + "id": "warning.bpWithErr", + "translation": "警告:批量執行部分行產生錯誤" + }, + { + "id": "error.invalidSqlType", + "translation": "非法的SQL語句類型" + }, + { + "id": "error.invalidDateTimeValue", + "translation": "無效的日期時間類型值" + }, + { + "id": "error.msgTooLong", + "translation": "消息長度超出限制512M" + }, + { + "id": "error.isNull", + "translation": "數據為NULL" + }, + { + "id": "error.ParamCountLimit", + "translation": "參數個數超過最大值65536." + }, + { + "id": "error.unbindedParameter", + "translation": "有參數未綁定" + }, + { + "id": "error.stringCut", + "translation": "字符串截斷" + }, + { + "id": "error.connectionClosedOrNotBuild", + "translation": "連接尚未建立或已經關閉" + } ] }` diff --git a/dm8/j.go b/dm8/j.go index db55115..8b3d4a2 100644 --- a/dm8/j.go +++ b/dm8/j.go @@ -69,7 +69,7 @@ func (da *DmArray) create(dc *DmConnection) (*DmArray, error) { return da.createByArrayDescriptor(desc, dc) } -func (da *DmArray) createByArrayDescriptor(arrDesc *ArrayDescriptor, conn *DmConnection) (*DmArray, error) { +func (da *DmArray) createByArrayDescriptor(arrDesc *ArrayDescriptor, _ *DmConnection) (*DmArray, error) { if nil == arrDesc { return nil, ECGO_INVALID_PARAMETER_VALUE.throw() diff --git a/dm8/k.go b/dm8/k.go index 8347e10..4011a3e 100644 --- a/dm8/k.go +++ b/dm8/k.go @@ -47,20 +47,20 @@ func newBlobFromDB(value []byte, conn *DmConnection, column *column, fetchAll bo blob.tabId = column.lobTabId blob.colId = column.lobColId - blob.inRow = Dm_build_1331.Dm_build_1424(value, NBLOB_HEAD_IN_ROW_FLAG) == LOB_IN_ROW - blob.blobId = Dm_build_1331.Dm_build_1438(value, NBLOB_HEAD_BLOBID) + blob.inRow = Dm_build_1.Dm_build_94(value, NBLOB_HEAD_IN_ROW_FLAG) == LOB_IN_ROW + blob.blobId = Dm_build_1.Dm_build_108(value, NBLOB_HEAD_BLOBID) if !blob.inRow { - blob.groupId = Dm_build_1331.Dm_build_1428(value, NBLOB_HEAD_OUTROW_GROUPID) - blob.fileId = Dm_build_1331.Dm_build_1428(value, NBLOB_HEAD_OUTROW_FILEID) - blob.pageNo = Dm_build_1331.Dm_build_1433(value, NBLOB_HEAD_OUTROW_PAGENO) + blob.groupId = Dm_build_1.Dm_build_98(value, NBLOB_HEAD_OUTROW_GROUPID) + blob.fileId = Dm_build_1.Dm_build_98(value, NBLOB_HEAD_OUTROW_FILEID) + blob.pageNo = Dm_build_1.Dm_build_103(value, NBLOB_HEAD_OUTROW_PAGENO) } if conn.NewLobFlag { - blob.tabId = Dm_build_1331.Dm_build_1433(value, NBLOB_EX_HEAD_TABLE_ID) - blob.colId = Dm_build_1331.Dm_build_1428(value, NBLOB_EX_HEAD_COL_ID) - blob.rowId = Dm_build_1331.Dm_build_1438(value, NBLOB_EX_HEAD_ROW_ID) - blob.exGroupId = Dm_build_1331.Dm_build_1428(value, NBLOB_EX_HEAD_FPA_GRPID) - blob.exFileId = Dm_build_1331.Dm_build_1428(value, NBLOB_EX_HEAD_FPA_FILEID) - blob.exPageNo = Dm_build_1331.Dm_build_1433(value, NBLOB_EX_HEAD_FPA_PAGENO) + blob.tabId = Dm_build_1.Dm_build_103(value, NBLOB_EX_HEAD_TABLE_ID) + blob.colId = Dm_build_1.Dm_build_98(value, NBLOB_EX_HEAD_COL_ID) + blob.rowId = Dm_build_1.Dm_build_108(value, NBLOB_EX_HEAD_ROW_ID) + blob.exGroupId = Dm_build_1.Dm_build_98(value, NBLOB_EX_HEAD_FPA_GRPID) + blob.exFileId = Dm_build_1.Dm_build_98(value, NBLOB_EX_HEAD_FPA_FILEID) + blob.exPageNo = Dm_build_1.Dm_build_103(value, NBLOB_EX_HEAD_FPA_PAGENO) } blob.resetCurrentInfo() @@ -68,9 +68,9 @@ func newBlobFromDB(value []byte, conn *DmConnection, column *column, fetchAll bo if blob.inRow { blob.data = make([]byte, blob.length) if conn.NewLobFlag { - Dm_build_1331.Dm_build_1387(blob.data, 0, value, NBLOB_EX_HEAD_SIZE, len(blob.data)) + Dm_build_1.Dm_build_57(blob.data, 0, value, NBLOB_EX_HEAD_SIZE, len(blob.data)) } else { - Dm_build_1331.Dm_build_1387(blob.data, 0, value, NBLOB_INROW_HEAD_SIZE, len(blob.data)) + Dm_build_1.Dm_build_57(blob.data, 0, value, NBLOB_INROW_HEAD_SIZE, len(blob.data)) } } else if fetchAll { blob.loadAllData() @@ -154,7 +154,7 @@ func (blob *DmBlob) Write(pos int, src []byte) (n int, err error) { if err = blob.connection.checkClosed(); err != nil { return -1, err } - var writeLen, err = blob.connection.Access.dm_build_627(blob, pos, src) + var writeLen, err = blob.connection.Access.dm_build_912(blob, pos, src) if err != nil { return -1, err } @@ -191,20 +191,20 @@ func (blob *DmBlob) Truncate(length int64) error { return nil } tmp := make([]byte, length) - Dm_build_1331.Dm_build_1387(tmp, 0, blob.data, 0, len(tmp)) + Dm_build_1.Dm_build_57(tmp, 0, blob.data, 0, len(tmp)) blob.data = tmp blob.length = int64(len(tmp)) } else { if err = blob.connection.checkClosed(); err != nil { return err } - blob.length, err = blob.connection.Access.dm_build_641(&blob.lob, int(length)) + blob.length, err = blob.connection.Access.dm_build_926(&blob.lob, int(length)) if err != nil { return err } if blob.groupId == -1 { tmp := make([]byte, blob.length) - Dm_build_1331.Dm_build_1387(tmp, 0, blob.data, 0, int(blob.length)) + Dm_build_1.Dm_build_57(tmp, 0, blob.data, 0, int(blob.length)) blob.data = tmp } } @@ -264,7 +264,7 @@ func (blob *DmBlob) getBytes(pos int64, length int32) ([]byte, error) { return blob.data[pos : pos+int64(length)], nil } else { - return blob.connection.Access.dm_build_588(blob, int32(pos), length) + return blob.connection.Access.dm_build_873(blob, int32(pos), length) } } @@ -281,11 +281,11 @@ func (blob *DmBlob) loadAllData() { func (blob *DmBlob) setLocalData(pos int, p []byte) { if pos+len(p) >= int(blob.length) { var tmp = make([]byte, pos+len(p)) - Dm_build_1331.Dm_build_1387(tmp, 0, blob.data, 0, pos) - Dm_build_1331.Dm_build_1387(tmp, pos, p, 0, len(p)) + Dm_build_1.Dm_build_57(tmp, 0, blob.data, 0, pos) + Dm_build_1.Dm_build_57(tmp, pos, p, 0, len(p)) blob.data = tmp } else { - Dm_build_1331.Dm_build_1387(blob.data, pos, p, 0, len(p)) + Dm_build_1.Dm_build_57(blob.data, pos, p, 0, len(p)) } blob.length = int64(len(blob.data)) } diff --git a/dm8/l.go b/dm8/l.go index 25a80e4..947a4ed 100644 --- a/dm8/l.go +++ b/dm8/l.go @@ -46,29 +46,29 @@ func newClobFromDB(value []byte, conn *DmConnection, column *column, fetchAll bo clob.tabId = column.lobTabId clob.colId = column.lobColId - clob.inRow = Dm_build_1331.Dm_build_1424(value, NBLOB_HEAD_IN_ROW_FLAG) == LOB_IN_ROW - clob.blobId = Dm_build_1331.Dm_build_1438(value, NBLOB_HEAD_BLOBID) + clob.inRow = Dm_build_1.Dm_build_94(value, NBLOB_HEAD_IN_ROW_FLAG) == LOB_IN_ROW + clob.blobId = Dm_build_1.Dm_build_108(value, NBLOB_HEAD_BLOBID) if !clob.inRow { - clob.groupId = Dm_build_1331.Dm_build_1428(value, NBLOB_HEAD_OUTROW_GROUPID) - clob.fileId = Dm_build_1331.Dm_build_1428(value, NBLOB_HEAD_OUTROW_FILEID) - clob.pageNo = Dm_build_1331.Dm_build_1433(value, NBLOB_HEAD_OUTROW_PAGENO) + clob.groupId = Dm_build_1.Dm_build_98(value, NBLOB_HEAD_OUTROW_GROUPID) + clob.fileId = Dm_build_1.Dm_build_98(value, NBLOB_HEAD_OUTROW_FILEID) + clob.pageNo = Dm_build_1.Dm_build_103(value, NBLOB_HEAD_OUTROW_PAGENO) } if conn.NewLobFlag { - clob.tabId = Dm_build_1331.Dm_build_1433(value, NBLOB_EX_HEAD_TABLE_ID) - clob.colId = Dm_build_1331.Dm_build_1428(value, NBLOB_EX_HEAD_COL_ID) - clob.rowId = Dm_build_1331.Dm_build_1438(value, NBLOB_EX_HEAD_ROW_ID) - clob.exGroupId = Dm_build_1331.Dm_build_1428(value, NBLOB_EX_HEAD_FPA_GRPID) - clob.exFileId = Dm_build_1331.Dm_build_1428(value, NBLOB_EX_HEAD_FPA_FILEID) - clob.exPageNo = Dm_build_1331.Dm_build_1433(value, NBLOB_EX_HEAD_FPA_PAGENO) + clob.tabId = Dm_build_1.Dm_build_103(value, NBLOB_EX_HEAD_TABLE_ID) + clob.colId = Dm_build_1.Dm_build_98(value, NBLOB_EX_HEAD_COL_ID) + clob.rowId = Dm_build_1.Dm_build_108(value, NBLOB_EX_HEAD_ROW_ID) + clob.exGroupId = Dm_build_1.Dm_build_98(value, NBLOB_EX_HEAD_FPA_GRPID) + clob.exFileId = Dm_build_1.Dm_build_98(value, NBLOB_EX_HEAD_FPA_FILEID) + clob.exPageNo = Dm_build_1.Dm_build_103(value, NBLOB_EX_HEAD_FPA_PAGENO) } clob.resetCurrentInfo() clob.serverEncoding = conn.getServerEncoding() if clob.inRow { if conn.NewLobFlag { - clob.data = []rune(Dm_build_1331.Dm_build_1488(value, NBLOB_EX_HEAD_SIZE, int(clob.getLengthFromHead(value)), clob.serverEncoding, conn)) + clob.data = []rune(Dm_build_1.Dm_build_158(value, NBLOB_EX_HEAD_SIZE, int(clob.getLengthFromHead(value)), clob.serverEncoding, conn)) } else { - clob.data = []rune(Dm_build_1331.Dm_build_1488(value, NBLOB_INROW_HEAD_SIZE, int(clob.getLengthFromHead(value)), clob.serverEncoding, conn)) + clob.data = []rune(Dm_build_1.Dm_build_158(value, NBLOB_INROW_HEAD_SIZE, int(clob.getLengthFromHead(value)), clob.serverEncoding, conn)) } clob.length = int64(len(clob.data)) } else if fetchAll { @@ -137,7 +137,7 @@ func (clob *DmClob) WriteString(pos int, s string) (n int, err error) { if err = clob.connection.checkClosed(); err != nil { return -1, err } - var writeLen, err = clob.connection.Access.dm_build_611(clob, pos, s, clob.serverEncoding) + var writeLen, err = clob.connection.Access.dm_build_896(clob, pos, s, clob.serverEncoding) if err != nil { return -1, err } @@ -178,7 +178,7 @@ func (clob *DmClob) Truncate(length int64) error { if err = clob.connection.checkClosed(); err != nil { return err } - clob.length, err = clob.connection.Access.dm_build_641(&clob.lob, int(length)) + clob.length, err = clob.connection.Access.dm_build_926(&clob.lob, int(length)) if err != nil { return err } @@ -248,7 +248,7 @@ func (clob *DmClob) getSubString(pos int64, len int32) (string, error) { return string(clob.data[pos : pos+int64(len)]), nil } else { - return clob.connection.Access.dm_build_599(clob, int32(pos), len) + return clob.connection.Access.dm_build_884(clob, int32(pos), len) } } diff --git a/dm8/m.go b/dm8/m.go index a8e84ff..53e96e8 100644 --- a/dm8/m.go +++ b/dm8/m.go @@ -24,7 +24,7 @@ type DmConnection struct { mu sync.Mutex dmConnector *DmConnector - Access *dm_build_414 + Access *dm_build_696 stmtMap map[int32]*DmStatement lastExecInfo *execRetInfo @@ -87,73 +87,73 @@ type DmConnection struct { closed atomicBool } -func (conn *DmConnection) setTrxFinish(status int32) { - switch status & Dm_build_814 { - case Dm_build_811, Dm_build_812, Dm_build_813: - conn.trxFinish = true +func (dc *DmConnection) setTrxFinish(status int32) { + switch status & Dm_build_1099 { + case Dm_build_1096, Dm_build_1097, Dm_build_1098: + dc.trxFinish = true default: - conn.trxFinish = false - } -} - -func (conn *DmConnection) init() { - - conn.stmtMap = make(map[int32]*DmStatement) - conn.DbTimezone = 0 - conn.GlobalServerSeries = 0 - conn.MaxRowSize = 0 - conn.LobEmptyCompOrcl = false - conn.ReadOnly = false - conn.DDLAutoCommit = false - conn.ConstParaOpt = false - conn.IsoLevel = -1 - conn.Malini2 = true - conn.NewLobFlag = true - conn.Execute2 = true - conn.serverEncoding = ENCODING_GB18030 - conn.TrxStatus = Dm_build_762 - conn.setTrxFinish(conn.TrxStatus) - conn.OracleDateLanguage = byte(Locale) - conn.lastExecInfo = NewExceInfo() - conn.MsgVersion = Dm_build_695 - - conn.idGenerator = dmConnIDGenerator -} - -func (conn *DmConnection) reset() { - conn.DbTimezone = 0 - conn.GlobalServerSeries = 0 - conn.MaxRowSize = 0 - conn.LobEmptyCompOrcl = false - conn.ReadOnly = false - conn.DDLAutoCommit = false - conn.ConstParaOpt = false - conn.IsoLevel = -1 - conn.Malini2 = true - conn.NewLobFlag = true - conn.Execute2 = true - conn.serverEncoding = ENCODING_GB18030 - conn.TrxStatus = Dm_build_762 - conn.setTrxFinish(conn.TrxStatus) -} - -func (conn *DmConnection) checkClosed() error { - if conn.closed.IsSet() { + dc.trxFinish = false + } +} + +func (dc *DmConnection) init() { + + dc.stmtMap = make(map[int32]*DmStatement) + dc.DbTimezone = 0 + dc.GlobalServerSeries = 0 + dc.MaxRowSize = 0 + dc.LobEmptyCompOrcl = false + dc.ReadOnly = false + dc.DDLAutoCommit = false + dc.ConstParaOpt = false + dc.IsoLevel = -1 + dc.Malini2 = true + dc.NewLobFlag = true + dc.Execute2 = true + dc.serverEncoding = ENCODING_GB18030 + dc.TrxStatus = Dm_build_1047 + dc.setTrxFinish(dc.TrxStatus) + dc.OracleDateLanguage = byte(Locale) + dc.lastExecInfo = NewExceInfo() + dc.MsgVersion = Dm_build_980 + + dc.idGenerator = dmConnIDGenerator +} + +func (dc *DmConnection) reset() { + dc.DbTimezone = 0 + dc.GlobalServerSeries = 0 + dc.MaxRowSize = 0 + dc.LobEmptyCompOrcl = false + dc.ReadOnly = false + dc.DDLAutoCommit = false + dc.ConstParaOpt = false + dc.IsoLevel = -1 + dc.Malini2 = true + dc.NewLobFlag = true + dc.Execute2 = true + dc.serverEncoding = ENCODING_GB18030 + dc.TrxStatus = Dm_build_1047 + dc.setTrxFinish(dc.TrxStatus) +} + +func (dc *DmConnection) checkClosed() error { + if dc.closed.IsSet() { return driver.ErrBadConn } return nil } -func (conn *DmConnection) executeInner(query string, execType int16) (interface{}, error) { +func (dc *DmConnection) executeInner(query string, execType int16) (interface{}, error) { - stmt, err := NewDmStmt(conn, query) + stmt, err := NewDmStmt(dc, query) if err != nil { return nil, err } - if execType == Dm_build_779 { + if execType == Dm_build_1064 { defer func(stmt *DmStatement) { _ = stmt.close() }(stmt) @@ -179,7 +179,7 @@ func (conn *DmConnection) executeInner(query string, execType int16) (interface{ } } - if execType == Dm_build_778 && conn.dmConnector.enRsCache { + if execType == Dm_build_1063 && dc.dmConnector.enRsCache { rpv, err := rp.get(stmt, query) if err != nil { return nil, err @@ -187,7 +187,7 @@ func (conn *DmConnection) executeInner(query string, execType int16) (interface{ if rpv != nil { stmt.execInfo = rpv.execInfo - conn.lastExecInfo = rpv.execInfo + dc.lastExecInfo = rpv.execInfo return newDmRows(rpv.getResultSet(stmt)), nil } } @@ -195,22 +195,22 @@ func (conn *DmConnection) executeInner(query string, execType int16) (interface{ var info *execRetInfo if optParamList != nil && len(optParamList) > 0 { - info, err = conn.Access.Dm_build_494(stmt, optParamList) + info, err = dc.Access.Dm_build_779(stmt, optParamList) if err != nil { stmt.nativeSql = query - info, err = conn.Access.Dm_build_500(stmt, execType) + info, err = dc.Access.Dm_build_785(stmt, execType) } } else { - info, err = conn.Access.Dm_build_500(stmt, execType) + info, err = dc.Access.Dm_build_785(stmt, execType) } if err != nil { _ = stmt.close() return nil, err } - conn.lastExecInfo = info + dc.lastExecInfo = info - if execType == Dm_build_778 && info.hasResultSet { + if execType == Dm_build_1063 && info.hasResultSet { return newDmRows(newInnerRows(0, stmt, info)), nil } else { return newDmResult(stmt, info), nil @@ -220,164 +220,160 @@ func (conn *DmConnection) executeInner(query string, execType int16) (interface{ func g2dbIsoLevel(isoLevel int32) int32 { switch isoLevel { case 1: - return Dm_build_766 + return Dm_build_1051 case 2: - return Dm_build_767 + return Dm_build_1052 case 4: - return Dm_build_768 + return Dm_build_1053 case 6: - return Dm_build_769 + return Dm_build_1054 default: return -1 } } -func (conn *DmConnection) Begin() (driver.Tx, error) { - if len(conn.filterChain.filters) == 0 { - return conn.begin() +func (dc *DmConnection) Begin() (driver.Tx, error) { + if len(dc.filterChain.filters) == 0 { + return dc.begin() } else { - return conn.filterChain.reset().DmConnectionBegin(conn) + return dc.filterChain.reset().DmConnectionBegin(dc) } } -func (conn *DmConnection) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) { - if len(conn.filterChain.filters) == 0 { - return conn.beginTx(ctx, opts) +func (dc *DmConnection) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) { + if len(dc.filterChain.filters) == 0 { + return dc.beginTx(ctx, opts) } - return conn.filterChain.reset().DmConnectionBeginTx(conn, ctx, opts) + return dc.filterChain.reset().DmConnectionBeginTx(dc, ctx, opts) } -func (conn *DmConnection) Commit() error { - if len(conn.filterChain.filters) == 0 { - return conn.commit() +func (dc *DmConnection) Commit() error { + if len(dc.filterChain.filters) == 0 { + return dc.commit() } else { - return conn.filterChain.reset().DmConnectionCommit(conn) + return dc.filterChain.reset().DmConnectionCommit(dc) } } -func (conn *DmConnection) Rollback() error { - if len(conn.filterChain.filters) == 0 { - return conn.rollback() +func (dc *DmConnection) Rollback() error { + if len(dc.filterChain.filters) == 0 { + return dc.rollback() } else { - return conn.filterChain.reset().DmConnectionRollback(conn) + return dc.filterChain.reset().DmConnectionRollback(dc) } } -func (conn *DmConnection) Close() error { - if len(conn.filterChain.filters) == 0 { - return conn.close() +func (dc *DmConnection) Close() error { + if len(dc.filterChain.filters) == 0 { + return dc.close() } else { - return conn.filterChain.reset().DmConnectionClose(conn) + return dc.filterChain.reset().DmConnectionClose(dc) } } -func (conn *DmConnection) Ping(ctx context.Context) error { - if len(conn.filterChain.filters) == 0 { - return conn.ping(ctx) +func (dc *DmConnection) Ping(ctx context.Context) error { + if len(dc.filterChain.filters) == 0 { + return dc.ping(ctx) } else { - return conn.filterChain.reset().DmConnectionPing(conn, ctx) + return dc.filterChain.reset().DmConnectionPing(dc, ctx) } } -func (conn *DmConnection) Exec(query string, args []driver.Value) (driver.Result, error) { - if len(conn.filterChain.filters) == 0 { - return conn.exec(query, args) +func (dc *DmConnection) Exec(query string, args []driver.Value) (driver.Result, error) { + if len(dc.filterChain.filters) == 0 { + return dc.exec(query, args) } - return conn.filterChain.reset().DmConnectionExec(conn, query, args) + return dc.filterChain.reset().DmConnectionExec(dc, query, args) } -func (conn *DmConnection) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) { - if len(conn.filterChain.filters) == 0 { - return conn.execContext(ctx, query, args) +func (dc *DmConnection) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) { + if len(dc.filterChain.filters) == 0 { + return dc.execContext(ctx, query, args) } - return conn.filterChain.reset().DmConnectionExecContext(conn, ctx, query, args) + return dc.filterChain.reset().DmConnectionExecContext(dc, ctx, query, args) } -func (conn *DmConnection) Query(query string, args []driver.Value) (driver.Rows, error) { - if len(conn.filterChain.filters) == 0 { - return conn.query(query, args) +func (dc *DmConnection) Query(query string, args []driver.Value) (driver.Rows, error) { + if len(dc.filterChain.filters) == 0 { + return dc.query(query, args) } - return conn.filterChain.reset().DmConnectionQuery(conn, query, args) + return dc.filterChain.reset().DmConnectionQuery(dc, query, args) } -func (conn *DmConnection) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) { - if len(conn.filterChain.filters) == 0 { - return conn.queryContext(ctx, query, args) +func (dc *DmConnection) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) { + if len(dc.filterChain.filters) == 0 { + return dc.queryContext(ctx, query, args) } - return conn.filterChain.reset().DmConnectionQueryContext(conn, ctx, query, args) + return dc.filterChain.reset().DmConnectionQueryContext(dc, ctx, query, args) } -func (conn *DmConnection) Prepare(query string) (driver.Stmt, error) { - if len(conn.filterChain.filters) == 0 { - return conn.prepare(query) +func (dc *DmConnection) Prepare(query string) (driver.Stmt, error) { + if len(dc.filterChain.filters) == 0 { + return dc.prepare(query) } - return conn.filterChain.reset().DmConnectionPrepare(conn, query) + return dc.filterChain.reset().DmConnectionPrepare(dc, query) } -func (conn *DmConnection) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) { - if len(conn.filterChain.filters) == 0 { - return conn.prepareContext(ctx, query) +func (dc *DmConnection) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) { + if len(dc.filterChain.filters) == 0 { + return dc.prepareContext(ctx, query) } - return conn.filterChain.reset().DmConnectionPrepareContext(conn, ctx, query) + return dc.filterChain.reset().DmConnectionPrepareContext(dc, ctx, query) } -func (conn *DmConnection) ResetSession(ctx context.Context) error { - if len(conn.filterChain.filters) == 0 { - return conn.resetSession(ctx) +func (dc *DmConnection) ResetSession(ctx context.Context) error { + if len(dc.filterChain.filters) == 0 { + return dc.resetSession(ctx) } - if err := conn.filterChain.reset().DmConnectionResetSession(conn, ctx); err != nil { + if err := dc.filterChain.reset().DmConnectionResetSession(dc, ctx); err != nil { return driver.ErrBadConn } else { return nil } } -func (conn *DmConnection) CheckNamedValue(nv *driver.NamedValue) error { - if len(conn.filterChain.filters) == 0 { - return conn.checkNamedValue(nv) +func (dc *DmConnection) CheckNamedValue(nv *driver.NamedValue) error { + if len(dc.filterChain.filters) == 0 { + return dc.checkNamedValue(nv) } - return conn.filterChain.reset().DmConnectionCheckNamedValue(conn, nv) + return dc.filterChain.reset().DmConnectionCheckNamedValue(dc, nv) } -func (conn *DmConnection) begin() (*DmConnection, error) { - return conn.beginTx(context.Background(), driver.TxOptions{Isolation: driver.IsolationLevel(sql.LevelDefault)}) +func (dc *DmConnection) begin() (*DmConnection, error) { + return dc.beginTx(context.Background(), driver.TxOptions{Isolation: driver.IsolationLevel(sql.LevelDefault)}) } -func (conn *DmConnection) beginTx(ctx context.Context, opts driver.TxOptions) (*DmConnection, error) { - if err := conn.watchCancel(ctx); err != nil { +func (dc *DmConnection) beginTx(ctx context.Context, opts driver.TxOptions) (*DmConnection, error) { + if err := dc.watchCancel(ctx); err != nil { return nil, err } - defer conn.finish() + defer dc.finish() - err := conn.checkClosed() + err := dc.checkClosed() if err != nil { return nil, err } - conn.autoCommit = false + dc.autoCommit = false - if sql.IsolationLevel(opts.Isolation) == sql.LevelDefault { - opts.Isolation = driver.IsolationLevel(sql.LevelReadCommitted) - } - - if conn.ReadOnly != opts.ReadOnly { - conn.ReadOnly = opts.ReadOnly + if dc.ReadOnly != opts.ReadOnly { + dc.ReadOnly = opts.ReadOnly var readonly = 0 if opts.ReadOnly { readonly = 1 } - _, _ = conn.exec(fmt.Sprintf("SP_SET_SESSION_READONLY(%d)", readonly), nil) + _, _ = dc.exec(fmt.Sprintf("SP_SET_SESSION_READONLY(%d)", readonly), nil) } - if conn.IsoLevel != int32(opts.Isolation) { + if dc.IsoLevel != int32(opts.Isolation) { switch sql.IsolationLevel(opts.Isolation) { - case sql.LevelDefault, sql.LevelReadUncommitted: - return conn, nil - case sql.LevelReadCommitted, sql.LevelSerializable: - conn.IsoLevel = int32(opts.Isolation) + case sql.LevelDefault: + dc.IsoLevel = int32(sql.LevelReadCommitted) + case sql.LevelReadUncommitted, sql.LevelReadCommitted, sql.LevelSerializable: + dc.IsoLevel = int32(opts.Isolation) case sql.LevelRepeatableRead: - if conn.CompatibleMysql() { - conn.IsoLevel = int32(sql.LevelReadCommitted) + if dc.CompatibleMysql() { + dc.IsoLevel = int32(sql.LevelReadCommitted) } else { return nil, ECGO_INVALID_TRAN_ISOLATION.throw() } @@ -385,76 +381,76 @@ func (conn *DmConnection) beginTx(ctx context.Context, opts driver.TxOptions) (* return nil, ECGO_INVALID_TRAN_ISOLATION.throw() } - err = conn.Access.Dm_build_554(conn) + err = dc.Access.Dm_build_839(dc) if err != nil { return nil, err } } - return conn, nil + return dc, nil } -func (conn *DmConnection) commit() error { - err := conn.checkClosed() +func (dc *DmConnection) commit() error { + err := dc.checkClosed() if err != nil { return err } defer func() { - conn.autoCommit = conn.dmConnector.autoCommit - if conn.ReadOnly { - _, _ = conn.exec("SP_SET_SESSION_READONLY(0)", nil) + dc.autoCommit = dc.dmConnector.autoCommit + if dc.ReadOnly { + _, _ = dc.exec("SP_SET_SESSION_READONLY(0)", nil) } }() - if !conn.autoCommit { - err = conn.Access.Commit() + if !dc.autoCommit { + err = dc.Access.Commit() if err != nil { return err } - conn.trxFinish = true + dc.trxFinish = true return nil - } else if !conn.dmConnector.alwayseAllowCommit { + } else if !dc.dmConnector.alwayseAllowCommit { return ECGO_COMMIT_IN_AUTOCOMMIT_MODE.throw() } return nil } -func (conn *DmConnection) rollback() error { - err := conn.checkClosed() +func (dc *DmConnection) rollback() error { + err := dc.checkClosed() if err != nil { return err } defer func() { - conn.autoCommit = conn.dmConnector.autoCommit - if conn.ReadOnly { - _, _ = conn.exec("SP_SET_SESSION_READONLY(0)", nil) + dc.autoCommit = dc.dmConnector.autoCommit + if dc.ReadOnly { + _, _ = dc.exec("SP_SET_SESSION_READONLY(0)", nil) } }() - if !conn.autoCommit { - err = conn.Access.Rollback() + if !dc.autoCommit { + err = dc.Access.Rollback() if err != nil { return err } - conn.trxFinish = true + dc.trxFinish = true return nil - } else if !conn.dmConnector.alwayseAllowCommit { + } else if !dc.dmConnector.alwayseAllowCommit { return ECGO_ROLLBACK_IN_AUTOCOMMIT_MODE.throw() } return nil } -func (conn *DmConnection) reconnect() error { - err := conn.Access.Close() +func (dc *DmConnection) reconnect() error { + err := dc.Access.Close() if err != nil { return err } - for _, stmt := range conn.stmtMap { + for _, stmt := range dc.stmtMap { for id, rs := range stmt.rsMap { _ = rs.Close() @@ -463,24 +459,24 @@ func (conn *DmConnection) reconnect() error { } var newConn *DmConnection - if conn.dmConnector.group != nil { - if newConn, err = conn.dmConnector.group.connect(conn.dmConnector); err != nil { + if dc.dmConnector.group != nil { + if newConn, err = dc.dmConnector.group.connect(dc.dmConnector); err != nil { return err } } else { - newConn, err = conn.dmConnector.connect(context.Background()) + newConn, err = dc.dmConnector.connect(context.Background()) } - oldMap := conn.stmtMap - newConn.mu = conn.mu - newConn.filterable = conn.filterable - *conn = *newConn + oldMap := dc.stmtMap + newConn.mu = dc.mu + newConn.filterable = dc.filterable + *dc = *newConn for _, stmt := range oldMap { if stmt.closed { continue } - err = conn.Access.Dm_build_472(stmt) + err = dc.Access.Dm_build_757(stmt) if err != nil { _ = stmt.free() continue @@ -492,71 +488,71 @@ func (conn *DmConnection) reconnect() error { } } - conn.stmtMap[stmt.id] = stmt + dc.stmtMap[stmt.id] = stmt } return nil } -func (conn *DmConnection) cleanup() { - _ = conn.close() +func (dc *DmConnection) cleanup() { + _ = dc.close() } -func (conn *DmConnection) close() error { - if !conn.closed.TrySet(true) { +func (dc *DmConnection) close() error { + if !dc.closed.TrySet(true) { return nil } util.AbsorbPanic(func() { - close(conn.closech) + close(dc.closech) }) - if conn.Access == nil { + if dc.Access == nil { return nil } - _ = conn.rollback() + _ = dc.rollback() - for _, stmt := range conn.stmtMap { + for _, stmt := range dc.stmtMap { _ = stmt.free() } - _ = conn.Access.Close() + _ = dc.Access.Close() return nil } -func (conn *DmConnection) ping(ctx context.Context) error { - if err := conn.watchCancel(ctx); err != nil { +func (dc *DmConnection) ping(ctx context.Context) error { + if err := dc.watchCancel(ctx); err != nil { return err } - defer conn.finish() + defer dc.finish() - rows, err := conn.query("select 1", nil) + rows, err := dc.query("select 1", nil) if err != nil { return err } return rows.close() } -func (conn *DmConnection) exec(query string, args []driver.Value) (*DmResult, error) { - err := conn.checkClosed() +func (dc *DmConnection) exec(query string, args []driver.Value) (*DmResult, error) { + err := dc.checkClosed() if err != nil { return nil, err } if args != nil && len(args) > 0 { - stmt, err := conn.prepare(query) - defer func(stmt *DmStatement) { - _ = stmt.close() - }(stmt) + stmt, err := dc.prepare(query) if err != nil { return nil, err } - conn.lastExecInfo = stmt.execInfo + defer func(stmt *DmStatement) { + _ = stmt.close() + }(stmt) + dc.lastExecInfo = stmt.execInfo return stmt.exec(args) } else { - r1, err := conn.executeInner(query, Dm_build_779) + r1, err := dc.executeInner(query, Dm_build_1064) if err != nil { return nil, err } @@ -569,33 +565,33 @@ func (conn *DmConnection) exec(query string, args []driver.Value) (*DmResult, er } } -func (conn *DmConnection) execContext(ctx context.Context, query string, args []driver.NamedValue) (*DmResult, error) { - if err := conn.watchCancel(ctx); err != nil { +func (dc *DmConnection) execContext(ctx context.Context, query string, args []driver.NamedValue) (*DmResult, error) { + if err := dc.watchCancel(ctx); err != nil { return nil, err } - defer conn.finish() + defer dc.finish() - err := conn.checkClosed() + err := dc.checkClosed() if err != nil { return nil, err } if args != nil && len(args) > 0 { - stmt, err := conn.prepare(query) - defer func(stmt *DmStatement) { - _ = stmt.close() - }(stmt) + stmt, err := dc.prepare(query) if err != nil { return nil, err } - conn.lastExecInfo = stmt.execInfo + defer func(stmt *DmStatement) { + _ = stmt.close() + }(stmt) + dc.lastExecInfo = stmt.execInfo dargs, err := namedValueToValue(stmt, args) if err != nil { return nil, err } return stmt.exec(dargs) } else { - r1, err := conn.executeInner(query, Dm_build_779) + r1, err := dc.executeInner(query, Dm_build_1064) if err != nil { return nil, err } @@ -608,26 +604,25 @@ func (conn *DmConnection) execContext(ctx context.Context, query string, args [] } } -func (conn *DmConnection) query(query string, args []driver.Value) (*DmRows, error) { +func (dc *DmConnection) query(query string, args []driver.Value) (*DmRows, error) { - err := conn.checkClosed() + err := dc.checkClosed() if err != nil { return nil, err } if args != nil && len(args) > 0 { - stmt, err := conn.prepare(query) + stmt, err := dc.prepare(query) if err != nil { - _ = stmt.close() return nil, err } - conn.lastExecInfo = stmt.execInfo + dc.lastExecInfo = stmt.execInfo stmt.innerUsed = true return stmt.query(args) } else { - r1, err := conn.executeInner(query, Dm_build_778) + r1, err := dc.executeInner(query, Dm_build_1063) if err != nil { return nil, err } @@ -640,26 +635,23 @@ func (conn *DmConnection) query(query string, args []driver.Value) (*DmRows, err } } -func (conn *DmConnection) queryContext(ctx context.Context, query string, args []driver.NamedValue) (*DmRows, error) { - if err := conn.watchCancel(ctx); err != nil { +func (dc *DmConnection) queryContext(ctx context.Context, query string, args []driver.NamedValue) (*DmRows, error) { + if err := dc.watchCancel(ctx); err != nil { return nil, err } - defer conn.finish() + defer dc.finish() - err := conn.checkClosed() + err := dc.checkClosed() if err != nil { return nil, err } if args != nil && len(args) > 0 { - stmt, err := conn.prepare(query) + stmt, err := dc.prepare(query) if err != nil { - if stmt != nil { - _ = stmt.close() - } return nil, err } - conn.lastExecInfo = stmt.execInfo + dc.lastExecInfo = stmt.execInfo stmt.innerUsed = true dargs, err := namedValueToValue(stmt, args) @@ -669,7 +661,7 @@ func (conn *DmConnection) queryContext(ctx context.Context, query string, args [ return stmt.query(dargs) } else { - r1, err := conn.executeInner(query, Dm_build_778) + r1, err := dc.executeInner(query, Dm_build_1063) if err != nil { return nil, err } @@ -683,33 +675,37 @@ func (conn *DmConnection) queryContext(ctx context.Context, query string, args [ } -func (conn *DmConnection) prepare(query string) (stmt *DmStatement, err error) { - if err = conn.checkClosed(); err != nil { +func (dc *DmConnection) prepare(query string) (stmt *DmStatement, err error) { + if err = dc.checkClosed(); err != nil { + return + } + if stmt, err = NewDmStmt(dc, query); err != nil { return } - if stmt, err = NewDmStmt(conn, query); err != nil { + if err = stmt.prepare(); err != nil { + _ = stmt.close() + stmt = nil return } - err = stmt.prepare() return } -func (conn *DmConnection) prepareContext(ctx context.Context, query string) (*DmStatement, error) { - if err := conn.watchCancel(ctx); err != nil { +func (dc *DmConnection) prepareContext(ctx context.Context, query string) (*DmStatement, error) { + if err := dc.watchCancel(ctx); err != nil { return nil, err } - defer conn.finish() + defer dc.finish() - return conn.prepare(query) + return dc.prepare(query) } -func (conn *DmConnection) resetSession(ctx context.Context) error { - if err := conn.watchCancel(ctx); err != nil { +func (dc *DmConnection) resetSession(ctx context.Context) error { + if err := dc.watchCancel(ctx); err != nil { return err } - defer conn.finish() + defer dc.finish() - err := conn.checkClosed() + err := dc.checkClosed() if err != nil { return err } @@ -717,108 +713,108 @@ func (conn *DmConnection) resetSession(ctx context.Context) error { return nil } -func (conn *DmConnection) checkNamedValue(nv *driver.NamedValue) error { +func (dc *DmConnection) checkNamedValue(nv *driver.NamedValue) error { var err error - var cvt = converter{conn, false} + var cvt = converter{dc, false} nv.Value, err = cvt.ConvertValue(nv.Value) - conn.isBatch = cvt.isBatch + dc.isBatch = cvt.isBatch return err } -func (conn *DmConnection) driverQuery(query string) (*DmStatement, *DmRows, error) { - stmt, err := NewDmStmt(conn, query) +func (dc *DmConnection) driverQuery(query string) (*DmStatement, *DmRows, error) { + stmt, err := NewDmStmt(dc, query) if err != nil { return nil, nil, err } stmt.innerUsed = true stmt.innerExec = true - info, err := conn.Access.Dm_build_500(stmt, Dm_build_778) + info, err := dc.Access.Dm_build_785(stmt, Dm_build_1063) if err != nil { return nil, nil, err } - conn.lastExecInfo = info + dc.lastExecInfo = info stmt.innerExec = false return stmt, newDmRows(newInnerRows(0, stmt, info)), nil } -func (conn *DmConnection) getIndexOnEPGroup() int32 { - if conn.dmConnector.group == nil || conn.dmConnector.group.epList == nil { +func (dc *DmConnection) getIndexOnEPGroup() int32 { + if dc.dmConnector.group == nil || dc.dmConnector.group.epList == nil { return -1 } - for i := 0; i < len(conn.dmConnector.group.epList); i++ { - ep := conn.dmConnector.group.epList[i] - if conn.dmConnector.host == ep.host && conn.dmConnector.port == ep.port { + for i := 0; i < len(dc.dmConnector.group.epList); i++ { + ep := dc.dmConnector.group.epList[i] + if dc.dmConnector.host == ep.host && dc.dmConnector.port == ep.port { return int32(i) } } return -1 } -func (conn *DmConnection) getServerEncoding() string { - if conn.dmConnector.charCode != "" { - return conn.dmConnector.charCode +func (dc *DmConnection) getServerEncoding() string { + if dc.dmConnector.charCode != "" { + return dc.dmConnector.charCode } - return conn.serverEncoding + return dc.serverEncoding } -func (conn *DmConnection) lobFetchAll() bool { - return conn.dmConnector.lobMode == 2 +func (dc *DmConnection) lobFetchAll() bool { + return dc.dmConnector.lobMode == 2 } -func (conn *DmConnection) CompatibleOracle() bool { - return conn.dmConnector.compatibleMode == COMPATIBLE_MODE_ORACLE +func (dc *DmConnection) CompatibleOracle() bool { + return dc.dmConnector.compatibleMode == COMPATIBLE_MODE_ORACLE } -func (conn *DmConnection) CompatibleMysql() bool { - return conn.dmConnector.compatibleMode == COMPATIBLE_MODE_MYSQL +func (dc *DmConnection) CompatibleMysql() bool { + return dc.dmConnector.compatibleMode == COMPATIBLE_MODE_MYSQL } -func (conn *DmConnection) cancel(err error) { - conn.canceled.Set(err) - _ = conn.close() +func (dc *DmConnection) cancel(err error) { + dc.canceled.Set(err) + _ = dc.close() } -func (conn *DmConnection) finish() { - if !conn.watching || conn.finished == nil { +func (dc *DmConnection) finish() { + if !dc.watching || dc.finished == nil { return } select { - case conn.finished <- struct{}{}: - conn.watching = false - case <-conn.closech: + case dc.finished <- struct{}{}: + dc.watching = false + case <-dc.closech: } } -func (conn *DmConnection) startWatcher() { +func (dc *DmConnection) startWatcher() { watcher := make(chan context.Context, 1) - conn.watcher = watcher + dc.watcher = watcher finished := make(chan struct{}) - conn.finished = finished + dc.finished = finished go func() { for { var ctx context.Context select { case ctx = <-watcher: - case <-conn.closech: + case <-dc.closech: return } select { case <-ctx.Done(): - conn.cancel(ctx.Err()) + dc.cancel(ctx.Err()) case <-finished: - case <-conn.closech: + case <-dc.closech: return } } }() } -func (conn *DmConnection) watchCancel(ctx context.Context) error { - if conn.watching { +func (dc *DmConnection) watchCancel(ctx context.Context) error { + if dc.watching { - conn.cleanup() + dc.cleanup() return nil } @@ -830,12 +826,12 @@ func (conn *DmConnection) watchCancel(ctx context.Context) error { return nil } - if conn.watcher == nil { + if dc.watcher == nil { return nil } - conn.watching = true - conn.watcher <- ctx + dc.watching = true + dc.watcher <- ctx return nil } diff --git a/dm8/n.go b/dm8/n.go index 066003b..bfaa878 100644 --- a/dm8/n.go +++ b/dm8/n.go @@ -6,6 +6,7 @@ package dm8 import ( + "bytes" "context" "database/sql/driver" "net" @@ -76,6 +77,7 @@ const ( PortKey = "port" UserKey = "user" PasswordKey = "password" + DialNameKey = "dialName" RwStandbyKey = "rwStandby" IsCompressKey = "isCompress" RwHAKey = "rwHA" @@ -155,14 +157,16 @@ const ( LANGUAGE_EN int = 1 + LANGUAGE_CNT_HK = 2 + COLUMN_NAME_NATURAL_CASE = 0 COLUMN_NAME_UPPER_CASE = 1 COLUMN_NAME_LOWER_CASE = 2 - compressDef = Dm_build_773 - compressIDDef = Dm_build_774 + compressDef = Dm_build_1058 + compressIDDef = Dm_build_1059 charCodeDef = "" @@ -216,7 +220,7 @@ const ( sessionTimeoutDef = 0 - osAuthTypeDef = Dm_build_756 + osAuthTypeDef = Dm_build_1041 continueBatchOnErrorDef = false @@ -226,7 +230,7 @@ const ( maxRowsDef = 0 - rowPrefetchDef = Dm_build_757 + rowPrefetchDef = Dm_build_1042 bufPrefetchDef = 0 @@ -322,6 +326,8 @@ type DmConnector struct { password string + dialName string + host string group *epGroup @@ -507,10 +513,11 @@ func (c *DmConnector) setAttributes(props *Properties) error { c.port = int32(props.GetInt(PortKey, int(c.port), 0, 65535)) c.user = props.GetString(UserKey, c.user) c.password = props.GetString(PasswordKey, c.password) + c.dialName = props.GetString(DialNameKey, "") c.rwStandby = props.GetBool(RwStandbyKey, c.rwStandby) if b := props.GetBool(IsCompressKey, false); b { - c.compress = Dm_build_772 + c.compress = Dm_build_1057 } c.compress = props.GetInt(CompressKey, c.compress, 0, 2) @@ -528,6 +535,7 @@ func (c *DmConnector) setAttributes(props *Properties) error { c.loginEncrypt = props.GetBool(LoginEncryptKey, c.loginEncrypt) c.loginCertificate = props.GetTrimString(LoginCertificateKey, c.loginCertificate) c.dec2Double = props.GetBool(Dec2DoubleKey, c.dec2Double) + parseLanguage(props.GetString(LanguageKey, "")) c.rwSeparate = props.GetBool(RwSeparateKey, c.rwSeparate) c.rwAutoDistribute = props.GetBool(RwAutoDistributeKey, c.rwAutoDistribute) @@ -563,7 +571,7 @@ func (c *DmConnector) setAttributes(props *Properties) error { c.autoCommit = props.GetBool(AutoCommitKey, c.autoCommit) c.maxRows = props.GetInt(MaxRowsKey, c.maxRows, 0, int(INT32_MAX)) c.rowPrefetch = props.GetInt(RowPrefetchKey, c.rowPrefetch, 0, int(INT32_MAX)) - c.bufPrefetch = props.GetInt(BufPrefetchKey, c.bufPrefetch, int(Dm_build_758), int(Dm_build_759)) + c.bufPrefetch = props.GetInt(BufPrefetchKey, c.bufPrefetch, int(Dm_build_1043), int(Dm_build_1044)) c.lobMode = props.GetInt(LobModeKey, c.lobMode, 1, 2) c.stmtPoolMaxSize = props.GetInt(StmtPoolSizeKey, c.stmtPoolMaxSize, 0, int(INT32_MAX)) c.ignoreCase = props.GetBool(IgnoreCaseKey, c.ignoreCase) @@ -632,26 +640,26 @@ func (c *DmConnector) parseOsAuthType(props *Properties) error { value := props.GetString(OsAuthTypeKey, "") if value != "" && !util.StringUtil.IsDigit(value) { if util.StringUtil.EqualsIgnoreCase(value, "ON") { - c.osAuthType = Dm_build_756 + c.osAuthType = Dm_build_1041 } else if util.StringUtil.EqualsIgnoreCase(value, "SYSDBA") { - c.osAuthType = Dm_build_752 + c.osAuthType = Dm_build_1037 } else if util.StringUtil.EqualsIgnoreCase(value, "SYSAUDITOR") { - c.osAuthType = Dm_build_754 + c.osAuthType = Dm_build_1039 } else if util.StringUtil.EqualsIgnoreCase(value, "SYSSSO") { - c.osAuthType = Dm_build_753 + c.osAuthType = Dm_build_1038 } else if util.StringUtil.EqualsIgnoreCase(value, "AUTO") { - c.osAuthType = Dm_build_755 + c.osAuthType = Dm_build_1040 } else if util.StringUtil.EqualsIgnoreCase(value, "OFF") { - c.osAuthType = Dm_build_751 + c.osAuthType = Dm_build_1036 } } else { c.osAuthType = byte(props.GetInt(OsAuthTypeKey, int(c.osAuthType), 0, 4)) } - if c.user == "" && c.osAuthType == Dm_build_751 { + if c.user == "" && c.osAuthType == Dm_build_1036 { c.user = "SYSDBA" - } else if c.osAuthType != Dm_build_751 && c.user != "" { + } else if c.osAuthType != Dm_build_1036 && c.user != "" { return ECGO_OSAUTH_ERROR.throw() - } else if c.osAuthType != Dm_build_751 { + } else if c.osAuthType != Dm_build_1036 { c.user = os.Getenv("user") c.password = "" } @@ -701,25 +709,60 @@ func (c *DmConnector) parseCluster(props *Properties) { func (c *DmConnector) parseDSN(dsn string) (*Properties, string, error) { var dsnProps = NewProperties() - dsnUrl, err := url.Parse(dsn) + urlParsed, err := url.Parse(dsn) if err != nil { return nil, "", err } - if dsnUrl.Scheme != "dm" { + if urlParsed.Scheme != "dm" { return nil, "", DSN_INVALID_SCHEMA } - if dsnUrl.User != nil { - c.user = dsnUrl.User.Username() - c.password, _ = dsnUrl.User.Password() + if urlParsed.User != nil { + c.user = urlParsed.User.Username() + c.password, _ = urlParsed.User.Password() } - q := dsnUrl.Query() + q := urlParsed.Query() for k := range q { dsnProps.Set(k, q.Get(k)) } - return dsnProps, dsnUrl.Host, nil + return dsnProps, urlParsed.Host, nil +} + +func (c *DmConnector) BuildDSN() string { + var buf bytes.Buffer + + buf.WriteString("dm://") + + if len(c.user) > 0 { + buf.WriteString(url.QueryEscape(c.user)) + if len(c.password) > 0 { + buf.WriteByte(':') + buf.WriteString(url.QueryEscape(c.password)) + } + buf.WriteByte('@') + } + + if len(c.host) > 0 { + buf.WriteString(c.host) + if c.port > 0 { + buf.WriteByte(':') + buf.WriteString(strconv.Itoa(int(c.port))) + } + } + + //hasParam := false + if c.connectTimeout > 0 { + //if hasParam { + // buf.WriteString("&timeout=") + //} else { + buf.WriteString("?timeout=") + // hasParam = true + //} + buf.WriteString(strconv.Itoa(c.connectTimeout)) + } + return buf.String() } func (c *DmConnector) mergeConfigs(dsn string) error { @@ -743,15 +786,32 @@ func (c *DmConnector) mergeConfigs(dsn string) error { c.user = c.remap(c.user, userRemapStr) - if group, ok := ServerGroupMap[strings.ToLower(host)]; ok { - c.group = group + if a := props.GetTrimString(host, ""); a != "" { + + if strings.HasPrefix(a, "(") && strings.HasSuffix(a, ")") { + a = strings.TrimSpace(a[1 : len(a)-1]) + } + c.group = parseServerName(host, a) + if c.group != nil { + c.group.props = NewProperties() + c.group.props.SetProperties(GlobalProperties) + } + } else if group, ok := ServerGroupMap.Load(strings.ToLower(host)); ok { + + c.group = group.(*epGroup) } else { host, port, err := net.SplitHostPort(host) - if err != nil || net.ParseIP(host) == nil { - c.host = hostDef - } else { - c.host = host + if err == nil { + ip := net.ParseIP(host) + var v4InV6Prefix = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff} + if ip != nil && len(ip) == net.IPv6len && !bytes.Equal(ip[0:12], v4InV6Prefix) { + + host = "[" + host + "]" + } } + + c.host = host + tmpPort, err := strconv.Atoi(port) if err != nil { c.port = portDef @@ -830,7 +890,7 @@ func (c *DmConnector) connectSingle(ctx context.Context) (*DmConnection, error) dc.objId = -1 dc.init() - dc.Access, err = dm_build_426(dc) + dc.Access, err = dm_build_708(ctx, dc) if err != nil { return nil, err } @@ -841,7 +901,7 @@ func (c *DmConnector) connectSingle(ctx context.Context) (*DmConnection, error) } defer dc.finish() - if err = dc.Access.dm_build_468(); err != nil { + if err = dc.Access.dm_build_753(); err != nil { if !dc.closed.IsSet() { close(dc.closech) diff --git a/dm8/o.go b/dm8/o.go index 77ee5b3..5159b19 100644 --- a/dm8/o.go +++ b/dm8/o.go @@ -41,16 +41,16 @@ func NewDecimalFromInt64(x int64) (*DmDecimal, error) { return NewDecimalFromBigInt(big.NewInt(x)) } -func (d DmDecimal) ToInt64() int64 { - return d.ToBigInt().Int64() +func (dest DmDecimal) ToInt64() int64 { + return dest.ToBigInt().Int64() } func NewDecimalFromFloat64(x float64) (*DmDecimal, error) { return NewDecimalFromBigFloat(big.NewFloat(x)) } -func (d DmDecimal) ToFloat64() float64 { - f, _ := d.ToBigFloat().Float64() +func (dest DmDecimal) ToFloat64() float64 { + f, _ := dest.ToBigFloat().Float64() return f } @@ -58,26 +58,26 @@ func NewDecimalFromBigInt(bigInt *big.Int) (*DmDecimal, error) { return newDecimal(bigInt, len(bigInt.String()), 0) } -func (d DmDecimal) ToBigInt() *big.Int { - if d.isZero() { +func (dest DmDecimal) ToBigInt() *big.Int { + if dest.isZero() { return big.NewInt(0) } - var digits = d.digits - if d.sign < 0 { + var digits = dest.digits + if dest.sign < 0 { digits = "-" + digits } i1, ok := new(big.Int).SetString(digits, 10) if !ok { return nil } - if d.weight > 0 { - i2, ok := new(big.Int).SetString("1"+strings.Repeat("0", d.weight), 10) + if dest.weight > 0 { + i2, ok := new(big.Int).SetString("1"+strings.Repeat("0", dest.weight), 10) if !ok { return nil } i1.Mul(i1, i2) - } else if d.weight < 0 { - i2, ok := new(big.Int).SetString("1"+strings.Repeat("0", -d.weight), 10) + } else if dest.weight < 0 { + i2, ok := new(big.Int).SetString("1"+strings.Repeat("0", -dest.weight), 10) if !ok { return nil } @@ -90,26 +90,26 @@ func NewDecimalFromBigFloat(bigFloat *big.Float) (*DmDecimal, error) { return newDecimal(bigFloat, int(bigFloat.Prec()), int(bigFloat.Prec())) } -func (d DmDecimal) ToBigFloat() *big.Float { - if d.isZero() { +func (dest DmDecimal) ToBigFloat() *big.Float { + if dest.isZero() { return big.NewFloat(0.0) } - var digits = d.digits - if d.sign < 0 { + var digits = dest.digits + if dest.sign < 0 { digits = "-" + digits } f1, ok := new(big.Float).SetString(digits) if !ok { return nil } - if d.weight > 0 { - f2, ok := new(big.Float).SetString("1" + strings.Repeat("0", d.weight)) + if dest.weight > 0 { + f2, ok := new(big.Float).SetString("1" + strings.Repeat("0", dest.weight)) if !ok { return nil } f1.Mul(f1, f2) - } else if d.weight < 0 { - f2, ok := new(big.Float).SetString("1" + strings.Repeat("0", -d.weight)) + } else if dest.weight < 0 { + f2, ok := new(big.Float).SetString("1" + strings.Repeat("0", -dest.weight)) if !ok { return nil } @@ -126,19 +126,19 @@ func NewDecimalFromString(s string) (*DmDecimal, error) { return NewDecimalFromBigFloat(num) } -func (d DmDecimal) String() string { +func (dest DmDecimal) String() string { - if d.isZero() { + if dest.isZero() { return "0" } - digitsStr := d.digits - if d.weight > 0 { - digitsStr = digitsStr + strings.Repeat("0", d.weight) - } else if d.weight < 0 { - if len(digitsStr) < -d.weight { - digitsStr = strings.Repeat("0", -d.weight-len(digitsStr)+1) + digitsStr + digitsStr := dest.digits + if dest.weight > 0 { + digitsStr = digitsStr + strings.Repeat("0", dest.weight) + } else if dest.weight < 0 { + if len(digitsStr) < -dest.weight { + digitsStr = strings.Repeat("0", -dest.weight-len(digitsStr)+1) + digitsStr } - indexOfDot := len(digitsStr) + d.weight + indexOfDot := len(digitsStr) + dest.weight digitsStr = digitsStr[:indexOfDot] + "." + digitsStr[indexOfDot:] } @@ -150,68 +150,68 @@ func (d DmDecimal) String() string { digitsStr = digitsStr[0 : len(digitsStr)-1] } - if d.sign < 0 { + if dest.sign < 0 { digitsStr = "-" + digitsStr } return digitsStr } -func (d DmDecimal) Sign() int { - return d.sign +func (dest DmDecimal) Sign() int { + return dest.sign } -func (d *DmDecimal) Scan(src interface{}) error { - if d == nil { +func (dest *DmDecimal) Scan(src interface{}) error { + if dest == nil { return ECGO_STORE_IN_NIL_POINTER.throw() } switch src := src.(type) { case nil: - *d = *new(DmDecimal) + *dest = *new(DmDecimal) - (*d).Valid = false + (*dest).Valid = false return nil case int, int8, int16, int32, int64: - dNew, err := NewDecimalFromInt64(reflect.ValueOf(src).Int()) + d, err := NewDecimalFromInt64(reflect.ValueOf(src).Int()) if err != nil { return err } - *d = *dNew + *dest = *d return nil case uint, uint8, uint16, uint32, uint64: - dNew, err := NewDecimalFromBigInt(new(big.Int).SetUint64(reflect.ValueOf(src).Uint())) + d, err := NewDecimalFromBigInt(new(big.Int).SetUint64(reflect.ValueOf(src).Uint())) if err != nil { return err } - *d = *dNew + *dest = *d return nil case float32, float64: - dNew, err := NewDecimalFromFloat64(reflect.ValueOf(src).Float()) + d, err := NewDecimalFromFloat64(reflect.ValueOf(src).Float()) if err != nil { return err } - *d = *dNew + *dest = *d return nil case string: - dNew, err := NewDecimalFromString(src) + d, err := NewDecimalFromString(src) if err != nil { return err } - *d = *dNew + *dest = *d return nil case *DmDecimal: - *d = *src + *dest = *src return nil default: return UNSUPPORTED_SCAN } } -func (d DmDecimal) Value() (driver.Value, error) { - if !d.Valid { +func (dest DmDecimal) Value() (driver.Value, error) { + if !dest.Valid { return nil, nil } - return d, nil + return dest, nil } func newDecimal(dec interface{}, prec int, scale int) (*DmDecimal, error) { @@ -315,27 +315,27 @@ func newDecimal(dec interface{}, prec int, scale int) (*DmDecimal, error) { return d, nil } -func (d DmDecimal) encodeDecimal() ([]byte, error) { - if d.isZero() { +func (dest DmDecimal) encodeDecimal() ([]byte, error) { + if dest.isZero() { return []byte{byte(FLAG_ZERO)}, nil } - exp := (d.weight+len(d.digits))/2 - 1 + exp := (dest.weight+len(dest.digits))/2 - 1 if exp > EXP_MAX || exp < EXP_MIN { return nil, ECGO_DATA_TOO_LONG.throw() } - validLen := len(d.digits)/2 + 1 + validLen := len(dest.digits)/2 + 1 - if d.sign < 0 && validLen >= XDEC_SIZE { + if dest.sign < 0 && validLen >= XDEC_SIZE { validLen = XDEC_SIZE - 1 } else if validLen > XDEC_SIZE { validLen = XDEC_SIZE } retLen := validLen - if d.sign < 0 { + if dest.sign < 0 { retLen = validLen + 1 } retBytes := make([]byte, retLen) - if d.sign > 0 { + if dest.sign > 0 { retBytes[0] = byte(exp + FLAG_POSITIVE) } else { retBytes[0] = byte(FLAG_NEGTIVE - exp) @@ -343,26 +343,26 @@ func (d DmDecimal) encodeDecimal() ([]byte, error) { ibytes := 1 for ichar := 0; ibytes < validLen; { - digit1, err := strconv.Atoi(string(d.digits[ichar])) + digit1, err := strconv.Atoi(string(dest.digits[ichar])) if err != nil { return nil, err } ichar++ - digit2, err := strconv.Atoi(string(d.digits[ichar])) + digit2, err := strconv.Atoi(string(dest.digits[ichar])) ichar++ if err != nil { return nil, err } digit := digit1*10 + digit2 - if d.sign > 0 { + if dest.sign > 0 { retBytes[ibytes] = byte(digit + NUM_POSITIVE) } else { retBytes[ibytes] = byte(NUM_NEGTIVE - digit) } ibytes++ } - if d.sign < 0 && ibytes < retLen { + if dest.sign < 0 && ibytes < retLen { retBytes[ibytes] = 0x66 ibytes++ } @@ -392,7 +392,7 @@ func decodeDecimal(values []byte, prec int, scale int) (*DmDecimal, error) { decimal.sign = -1 } - var flag = int(Dm_build_1331.Dm_build_1451(values, 0)) + var flag = int(Dm_build_1.Dm_build_121(values, 0)) var exp int if decimal.sign > 0 { exp = flag - FLAG_POSITIVE @@ -421,8 +421,8 @@ func decodeDecimal(values []byte, prec int, scale int) (*DmDecimal, error) { return decimal, nil } -func (d DmDecimal) isZero() bool { - return d.sign == 0 +func (dest DmDecimal) isZero() bool { + return dest.sign == 0 } func checkPrec(len int, prec int) error { @@ -436,13 +436,13 @@ func isOdd(val int) bool { return val%2 != 0 } -func (d *DmDecimal) checkValid() error { - if !d.Valid { +func (dest *DmDecimal) checkValid() error { + if !dest.Valid { return ECGO_IS_NULL.throw() } return nil } -func (d *DmDecimal) GormDataType() string { +func (dest *DmDecimal) GormDataType() string { return "DECIMAL" } diff --git a/dm8/p.go b/dm8/p.go index 6a7a81f..3627408 100644 --- a/dm8/p.go +++ b/dm8/p.go @@ -9,20 +9,27 @@ import ( "context" "database/sql" "database/sql/driver" + "net" "sync" "github.com/godoes/gorm-dameng/dm8/i18n" ) // 发版标记 -var version = "8.1.3.12" -var build_date = "2023.04.17" -var svn = "16532" +var ( + version = "8.1.3.140" + build_date = "2024.03.20" + svn = "22766" +) var globalDmDriver = newDmDriver() func init() { sql.Register("dm", globalDmDriver) + + i18n.InitConfig(i18n.Messages_zh_CN) + i18n.InitConfig(i18n.Messages_en_US) + i18n.InitConfig(i18n.Messages_zh_HK) } func driverInit(svcConfPath string) { @@ -31,15 +38,6 @@ func driverInit(svcConfPath string) { setDriverAttributes(GlobalProperties) } globalDmDriver.createFilterChain(nil, GlobalProperties) - - switch Locale { - case 0: - i18n.InitConfig(i18n.Messages_zh_CN) - case 1: - i18n.InitConfig(i18n.Messages_en_US) - case 2: - i18n.InitConfig(i18n.Messages_zh_TW) - } } type DmDriver struct { @@ -54,6 +52,34 @@ func newDmDriver() *DmDriver { return d } +// DialFunc 支持自定义连接网络地址,返回标准net.Conn对象,相关数据库操作的消息包都将发送到该对象 +type DialFunc func(addr string) (net.Conn, error) + +// DialContextFunc 支持自定义连接网络地址,返回标准net.Conn对象,相关数据库操作的消息包都将发送到该对象 +type DialContextFunc func(ctx context.Context, addr string) (net.Conn, error) + +var ( + dialsLock sync.RWMutex + dials map[string]DialContextFunc +) + +// RegisterDial 注册自定义连接方法 +func RegisterDial(dialName string, dial DialFunc) { + RegisterDialContext(dialName, func(_ context.Context, addr string) (net.Conn, error) { + return dial(addr) + }) +} + +// RegisterDialContext 注册自定义连接方法 +func RegisterDialContext(dialName string, dial DialContextFunc) { + dialsLock.Lock() + defer dialsLock.Unlock() + if dials == nil { + dials = make(map[string]DialContextFunc) + } + dials[dialName] = dial +} + /************************************************************* ** PUBLIC METHODS AND FUNCTIONS *************************************************************/ diff --git a/dm8/parser/zu.go b/dm8/parser/zu.go index cafd040..a77f830 100644 --- a/dm8/parser/zu.go +++ b/dm8/parser/zu.go @@ -369,7 +369,7 @@ func (lexer *Lexer) Reset(in io.RuneReader) *Lexer { return lexer } -func (lexer *Lexer) debug(info string) { +func (lexer *Lexer) debug(_ string) { if !lexer.debugFlag { return } diff --git a/dm8/q.go b/dm8/q.go index fa817a1..dae8d45 100644 --- a/dm8/q.go +++ b/dm8/q.go @@ -68,18 +68,18 @@ type DmIntervalDT struct { Valid bool } -func (dt *DmIntervalDT) init() { - dt._type = QUA_D - dt.leadScale = 2 - dt.secScale = 6 - dt.negative = false - dt.days = 0 - dt.hours = 0 - dt.minutes = 0 - dt.seconds = 0 - dt.fraction = 0 - dt.scaleForSvr = 0 - dt.Valid = true +func (dest *DmIntervalDT) init() { + dest._type = QUA_D + dest.leadScale = 2 + dest.secScale = 6 + dest.negative = false + dest.days = 0 + dest.hours = 0 + dest.minutes = 0 + dest.seconds = 0 + dest.fraction = 0 + dest.scaleForSvr = 0 + dest.Valid = true } func newDmIntervalDTByBytes(bytes []byte) *DmIntervalDT { @@ -87,45 +87,45 @@ func newDmIntervalDTByBytes(bytes []byte) *DmIntervalDT { dt.init() dt._type = bytes[21] - dt.scaleForSvr = int(Dm_build_1331.Dm_build_1433(bytes, 20)) + dt.scaleForSvr = int(Dm_build_1.Dm_build_103(bytes, 20)) dt.leadScale = (dt.scaleForSvr >> 4) & 0x0000000F dt.secScale = dt.scaleForSvr & 0x0000000F switch dt._type { case QUA_D: - dt.days = int(Dm_build_1331.Dm_build_1433(bytes, 0)) + dt.days = int(Dm_build_1.Dm_build_103(bytes, 0)) case QUA_DH: - dt.days = int(Dm_build_1331.Dm_build_1433(bytes, 0)) - dt.hours = int(Dm_build_1331.Dm_build_1433(bytes, 4)) + dt.days = int(Dm_build_1.Dm_build_103(bytes, 0)) + dt.hours = int(Dm_build_1.Dm_build_103(bytes, 4)) case QUA_DHM: - dt.days = int(Dm_build_1331.Dm_build_1433(bytes, 0)) - dt.hours = int(Dm_build_1331.Dm_build_1433(bytes, 4)) - dt.minutes = int(Dm_build_1331.Dm_build_1433(bytes, 8)) + dt.days = int(Dm_build_1.Dm_build_103(bytes, 0)) + dt.hours = int(Dm_build_1.Dm_build_103(bytes, 4)) + dt.minutes = int(Dm_build_1.Dm_build_103(bytes, 8)) case QUA_DHMS: - dt.days = int(Dm_build_1331.Dm_build_1433(bytes, 0)) - dt.hours = int(Dm_build_1331.Dm_build_1433(bytes, 4)) - dt.minutes = int(Dm_build_1331.Dm_build_1433(bytes, 8)) - dt.seconds = int(Dm_build_1331.Dm_build_1433(bytes, 12)) - dt.fraction = int(Dm_build_1331.Dm_build_1433(bytes, 16)) + dt.days = int(Dm_build_1.Dm_build_103(bytes, 0)) + dt.hours = int(Dm_build_1.Dm_build_103(bytes, 4)) + dt.minutes = int(Dm_build_1.Dm_build_103(bytes, 8)) + dt.seconds = int(Dm_build_1.Dm_build_103(bytes, 12)) + dt.fraction = int(Dm_build_1.Dm_build_103(bytes, 16)) case QUA_H: - dt.hours = int(Dm_build_1331.Dm_build_1433(bytes, 4)) + dt.hours = int(Dm_build_1.Dm_build_103(bytes, 4)) case QUA_HM: - dt.hours = int(Dm_build_1331.Dm_build_1433(bytes, 4)) - dt.minutes = int(Dm_build_1331.Dm_build_1433(bytes, 8)) + dt.hours = int(Dm_build_1.Dm_build_103(bytes, 4)) + dt.minutes = int(Dm_build_1.Dm_build_103(bytes, 8)) case QUA_HMS: - dt.hours = int(Dm_build_1331.Dm_build_1433(bytes, 4)) - dt.minutes = int(Dm_build_1331.Dm_build_1433(bytes, 8)) - dt.seconds = int(Dm_build_1331.Dm_build_1433(bytes, 12)) - dt.fraction = int(Dm_build_1331.Dm_build_1433(bytes, 16)) + dt.hours = int(Dm_build_1.Dm_build_103(bytes, 4)) + dt.minutes = int(Dm_build_1.Dm_build_103(bytes, 8)) + dt.seconds = int(Dm_build_1.Dm_build_103(bytes, 12)) + dt.fraction = int(Dm_build_1.Dm_build_103(bytes, 16)) case QUA_M: - dt.minutes = int(Dm_build_1331.Dm_build_1433(bytes, 8)) + dt.minutes = int(Dm_build_1.Dm_build_103(bytes, 8)) case QUA_MS: - dt.minutes = int(Dm_build_1331.Dm_build_1433(bytes, 8)) - dt.seconds = int(Dm_build_1331.Dm_build_1433(bytes, 12)) - dt.fraction = int(Dm_build_1331.Dm_build_1433(bytes, 16)) + dt.minutes = int(Dm_build_1.Dm_build_103(bytes, 8)) + dt.seconds = int(Dm_build_1.Dm_build_103(bytes, 12)) + dt.fraction = int(Dm_build_1.Dm_build_103(bytes, 16)) case QUA_S: - dt.seconds = int(Dm_build_1331.Dm_build_1433(bytes, 12)) - dt.fraction = int(Dm_build_1331.Dm_build_1433(bytes, 16)) + dt.seconds = int(Dm_build_1.Dm_build_103(bytes, 12)) + dt.fraction = int(Dm_build_1.Dm_build_103(bytes, 16)) } if dt.days < 0 { dt.days = -dt.days @@ -319,48 +319,48 @@ func NewDmIntervalDTByString(str string) (dt *DmIntervalDT, err error) { return nil, ECGO_INVALID_TIME_INTERVAL.throw() } -func (dt *DmIntervalDT) GetDay() int { - return dt.days +func (dest *DmIntervalDT) GetDay() int { + return dest.days } -func (dt *DmIntervalDT) GetHour() int { - return dt.hours +func (dest *DmIntervalDT) GetHour() int { + return dest.hours } -func (dt *DmIntervalDT) GetMinute() int { - return dt.minutes +func (dest *DmIntervalDT) GetMinute() int { + return dest.minutes } -func (dt *DmIntervalDT) GetSecond() int { - return dt.seconds +func (dest *DmIntervalDT) GetSecond() int { + return dest.seconds } -func (dt *DmIntervalDT) GetMsec() int { - return dt.fraction +func (dest *DmIntervalDT) GetMsec() int { + return dest.fraction } -func (dt *DmIntervalDT) GetDTType() byte { - return dt._type +func (dest *DmIntervalDT) GetDTType() byte { + return dest._type } -func (dt *DmIntervalDT) String() string { - if !dt.Valid { +func (dest *DmIntervalDT) String() string { + if !dest.Valid { return "" } var l, destLen int var dStr, hStr, mStr, sStr, nStr string interval := "INTERVAL " - switch dt._type { + switch dest._type { case QUA_D: - dStr := strconv.FormatInt(int64(float64(dt.days)), 10) - if dt.negative { + dStr := strconv.FormatInt(int64(float64(dest.days)), 10) + if dest.negative { interval += "-" } - if len(dStr) < dt.leadScale { + if len(dStr) < dest.leadScale { l = len(dStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { dStr = "0" + dStr @@ -368,18 +368,18 @@ func (dt *DmIntervalDT) String() string { } } - interval += "'" + dStr + "' DAY(" + strconv.FormatInt(int64(dt.leadScale), 10) + ")" + interval += "'" + dStr + "' DAY(" + strconv.FormatInt(int64(dest.leadScale), 10) + ")" case QUA_DH: - dStr = strconv.FormatInt(int64(float64(dt.days)), 10) - hStr = strconv.FormatInt(int64(float64(dt.hours)), 10) + dStr = strconv.FormatInt(int64(float64(dest.days)), 10) + hStr = strconv.FormatInt(int64(float64(dest.hours)), 10) - if dt.negative { + if dest.negative { interval += "-" } - if len(dStr) < dt.leadScale { + if len(dStr) < dest.leadScale { l = len(dStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { dStr = "0" + dStr @@ -391,19 +391,19 @@ func (dt *DmIntervalDT) String() string { hStr = "0" + hStr } - interval += "'" + dStr + " " + hStr + "' DAY(" + strconv.FormatInt(int64(dt.leadScale), 10) + ") TO HOUR" + interval += "'" + dStr + " " + hStr + "' DAY(" + strconv.FormatInt(int64(dest.leadScale), 10) + ") TO HOUR" case QUA_DHM: - dStr = strconv.FormatInt(int64(float64(dt.days)), 10) - hStr = strconv.FormatInt(int64(float64(dt.hours)), 10) - mStr = strconv.FormatInt(int64(float64(dt.minutes)), 10) + dStr = strconv.FormatInt(int64(float64(dest.days)), 10) + hStr = strconv.FormatInt(int64(float64(dest.hours)), 10) + mStr = strconv.FormatInt(int64(float64(dest.minutes)), 10) - if dt.negative { + if dest.negative { interval += "-" } - if len(dStr) < dt.leadScale { + if len(dStr) < dest.leadScale { l = len(dStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { dStr = "0" + dStr @@ -416,20 +416,20 @@ func (dt *DmIntervalDT) String() string { if len(mStr) < 2 { mStr = "0" + mStr } - interval += "'" + dStr + " " + hStr + ":" + mStr + "' DAY(" + strconv.FormatInt(int64(dt.leadScale), 10) + ") TO MINUTE" + interval += "'" + dStr + " " + hStr + ":" + mStr + "' DAY(" + strconv.FormatInt(int64(dest.leadScale), 10) + ") TO MINUTE" case QUA_DHMS: - dStr = strconv.FormatInt(int64(float64(dt.days)), 10) - hStr = strconv.FormatInt(int64(float64(dt.hours)), 10) - mStr = strconv.FormatInt(int64(float64(dt.minutes)), 10) - sStr = strconv.FormatInt(int64(float64(dt.seconds)), 10) - nStr = dt.getMsecString() - if dt.negative { + dStr = strconv.FormatInt(int64(float64(dest.days)), 10) + hStr = strconv.FormatInt(int64(float64(dest.hours)), 10) + mStr = strconv.FormatInt(int64(float64(dest.minutes)), 10) + sStr = strconv.FormatInt(int64(float64(dest.seconds)), 10) + nStr = dest.getMsecString() + if dest.negative { interval += "-" } - if len(dStr) < dt.leadScale { + if len(dStr) < dest.leadScale { l = len(dStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { dStr = "0" + dStr @@ -450,16 +450,16 @@ func (dt *DmIntervalDT) String() string { interval += "." + nStr } - interval += "' DAY(" + strconv.FormatInt(int64(dt.leadScale), 10) + ") TO SECOND(" + strconv.FormatInt(int64(dt.secScale), 10) + ")" + interval += "' DAY(" + strconv.FormatInt(int64(dest.leadScale), 10) + ") TO SECOND(" + strconv.FormatInt(int64(dest.secScale), 10) + ")" case QUA_H: - hStr = strconv.FormatInt(int64(float64(dt.hours)), 10) - if dt.negative { + hStr = strconv.FormatInt(int64(float64(dest.hours)), 10) + if dest.negative { interval += "-" } - if len(hStr) < dt.leadScale { + if len(hStr) < dest.leadScale { l = len(hStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { hStr = "0" + hStr @@ -467,18 +467,18 @@ func (dt *DmIntervalDT) String() string { } } - interval += "'" + hStr + "' HOUR(" + strconv.FormatInt(int64(dt.leadScale), 10) + ")" + interval += "'" + hStr + "' HOUR(" + strconv.FormatInt(int64(dest.leadScale), 10) + ")" case QUA_HM: - hStr = strconv.FormatInt(int64(float64(dt.hours)), 10) - mStr = strconv.FormatInt(int64(float64(dt.minutes)), 10) + hStr = strconv.FormatInt(int64(float64(dest.hours)), 10) + mStr = strconv.FormatInt(int64(float64(dest.minutes)), 10) - if dt.negative { + if dest.negative { interval += "-" } - if len(hStr) < dt.leadScale { + if len(hStr) < dest.leadScale { l = len(hStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { hStr = "0" + hStr @@ -489,20 +489,20 @@ func (dt *DmIntervalDT) String() string { mStr = "0" + mStr } - interval += "'" + hStr + ":" + mStr + "' HOUR(" + strconv.FormatInt(int64(dt.leadScale), 10) + ") TO MINUTE" + interval += "'" + hStr + ":" + mStr + "' HOUR(" + strconv.FormatInt(int64(dest.leadScale), 10) + ") TO MINUTE" case QUA_HMS: - nStr = dt.getMsecString() - hStr = strconv.FormatInt(int64(float64(dt.hours)), 10) - mStr = strconv.FormatInt(int64(float64(dt.minutes)), 10) - sStr = strconv.FormatInt(int64(float64(dt.seconds)), 10) + nStr = dest.getMsecString() + hStr = strconv.FormatInt(int64(float64(dest.hours)), 10) + mStr = strconv.FormatInt(int64(float64(dest.minutes)), 10) + sStr = strconv.FormatInt(int64(float64(dest.seconds)), 10) - if dt.negative { + if dest.negative { interval += "-" } - if len(hStr) < dt.leadScale { + if len(hStr) < dest.leadScale { l = len(hStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { hStr = "0" + hStr @@ -521,18 +521,18 @@ func (dt *DmIntervalDT) String() string { interval += "." + nStr } - interval += "' HOUR(" + strconv.FormatInt(int64(dt.leadScale), 10) + ") TO SECOND(" + strconv.FormatInt(int64(dt.secScale), 10) + ")" + interval += "' HOUR(" + strconv.FormatInt(int64(dest.leadScale), 10) + ") TO SECOND(" + strconv.FormatInt(int64(dest.secScale), 10) + ")" case QUA_M: - mStr = strconv.FormatInt(int64(float64(dt.minutes)), 10) + mStr = strconv.FormatInt(int64(float64(dest.minutes)), 10) - if dt.negative { + if dest.negative { interval += "-" } - if len(mStr) < dt.leadScale { + if len(mStr) < dest.leadScale { l = len(mStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { mStr = "0" + mStr @@ -540,19 +540,19 @@ func (dt *DmIntervalDT) String() string { } } - interval += "'" + mStr + "' MINUTE(" + strconv.FormatInt(int64(dt.leadScale), 10) + ")" + interval += "'" + mStr + "' MINUTE(" + strconv.FormatInt(int64(dest.leadScale), 10) + ")" case QUA_MS: - nStr = dt.getMsecString() - mStr = strconv.FormatInt(int64(float64(dt.minutes)), 10) - sStr = strconv.FormatInt(int64(float64(dt.seconds)), 10) + nStr = dest.getMsecString() + mStr = strconv.FormatInt(int64(float64(dest.minutes)), 10) + sStr = strconv.FormatInt(int64(float64(dest.seconds)), 10) - if dt.negative { + if dest.negative { interval += "-" } - if len(mStr) < dt.leadScale { + if len(mStr) < dest.leadScale { l = len(mStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { mStr = "0" + mStr @@ -567,18 +567,18 @@ func (dt *DmIntervalDT) String() string { interval += "." + nStr } - interval += "' MINUTE(" + strconv.FormatInt(int64(dt.leadScale), 10) + ") TO SECOND(" + strconv.FormatInt(int64(dt.secScale), 10) + ")" + interval += "' MINUTE(" + strconv.FormatInt(int64(dest.leadScale), 10) + ") TO SECOND(" + strconv.FormatInt(int64(dest.secScale), 10) + ")" case QUA_S: - nStr = dt.getMsecString() - sStr = strconv.FormatInt(int64(float64(dt.seconds)), 10) + nStr = dest.getMsecString() + sStr = strconv.FormatInt(int64(float64(dest.seconds)), 10) - if dt.negative { + if dest.negative { interval += "-" } - if len(sStr) < dt.leadScale { + if len(sStr) < dest.leadScale { l = len(sStr) - destLen = dt.leadScale + destLen = dest.leadScale for destLen > l { sStr = "0" + sStr @@ -592,133 +592,133 @@ func (dt *DmIntervalDT) String() string { interval += "." + nStr } - interval += "' SECOND(" + strconv.FormatInt(int64(dt.leadScale), 10) + ", " + strconv.FormatInt(int64(dt.secScale), 10) + ")" + interval += "' SECOND(" + strconv.FormatInt(int64(dest.leadScale), 10) + ", " + strconv.FormatInt(int64(dest.secScale), 10) + ")" } return interval } -func (dt *DmIntervalDT) Scan(src interface{}) error { - if dt == nil { +func (dest *DmIntervalDT) Scan(src interface{}) error { + if dest == nil { return ECGO_STORE_IN_NIL_POINTER.throw() } switch src := src.(type) { case nil: - *dt = *new(DmIntervalDT) + *dest = *new(DmIntervalDT) - (*dt).Valid = false + (*dest).Valid = false return nil case *DmIntervalDT: - *dt = *src + *dest = *src return nil case string: ret, err := NewDmIntervalDTByString(src) if err != nil { return err } - *dt = *ret + *dest = *ret return nil default: return UNSUPPORTED_SCAN } } -func (dt DmIntervalDT) Value() (driver.Value, error) { - if !dt.Valid { +func (dest DmIntervalDT) Value() (driver.Value, error) { + if !dest.Valid { return nil, nil } - return dt, nil + return dest, nil } -func (dt *DmIntervalDT) checkScale(leadScale int) (int, error) { - switch dt._type { +func (dest *DmIntervalDT) checkScale(leadScale int) (int, error) { + switch dest._type { case QUA_D: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.days))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.days))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.days))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.days))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_DH: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.days))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.days))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.days))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.days))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } - if int64(math.Abs(float64(dt.hours))) > 23 { + if int64(math.Abs(float64(dest.hours))) > 23 { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_DHM: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.days))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.days))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.days))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.days))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } - if int64(math.Abs(float64(dt.hours))) > 23 || int64(math.Abs(float64(dt.minutes))) > 59 { + if int64(math.Abs(float64(dest.hours))) > 23 || int64(math.Abs(float64(dest.minutes))) > 59 { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_DHMS: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.days))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.days))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.days))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.days))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } - if int64(math.Abs(float64(dt.hours))) > 23 || int64(math.Abs(float64(dt.minutes))) > 59 || - int64(math.Abs(float64(dt.seconds))) > 59 { + if int64(math.Abs(float64(dest.hours))) > 23 || int64(math.Abs(float64(dest.minutes))) > 59 || + int64(math.Abs(float64(dest.seconds))) > 59 { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_H: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.hours))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.hours))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.hours))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.hours))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_HM: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.hours))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.hours))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.hours))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.hours))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } - if int64(math.Abs(float64(dt.minutes))) > 59 { + if int64(math.Abs(float64(dest.minutes))) > 59 { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_HMS: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.hours))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.hours))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.hours))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.hours))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } - if int64(math.Abs(float64(dt.minutes))) > 59 || int64(math.Abs(float64(dt.seconds))) > 59 { + if int64(math.Abs(float64(dest.minutes))) > 59 || int64(math.Abs(float64(dest.seconds))) > 59 { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_M: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.minutes))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.minutes))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.minutes))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.minutes))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_MS: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.minutes))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.minutes))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.minutes))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.minutes))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } - if int64(math.Abs(float64(dt.seconds))) > 59 { + if int64(math.Abs(float64(dest.seconds))) > 59 { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } case QUA_S: if leadScale == -1 { - leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dt.minutes))), 10)) - } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dt.minutes))), 10)) { + leadScale = len(strconv.FormatInt(int64(math.Abs(float64(dest.minutes))), 10)) + } else if leadScale < len(strconv.FormatInt(int64(math.Abs(float64(dest.minutes))), 10)) { return 0, ECGO_INVALID_TIME_INTERVAL.throw() } } @@ -729,7 +729,7 @@ func (dt *DmIntervalDT) checkScale(leadScale int) (int, error) { return leadScale, nil } -func (dt *DmIntervalDT) parsePrec(leadStr string) (int, error) { +func (dest *DmIntervalDT) parsePrec(leadStr string) (int, error) { leftBtId := strings.Index(leadStr, "(") rightBtId := strings.Index(leadStr, ")") var prec int64 = -1 @@ -746,117 +746,117 @@ func (dt *DmIntervalDT) parsePrec(leadStr string) (int, error) { return int(prec), nil } -func (dt *DmIntervalDT) setPrecForSvr(_ string, leadScale string, secScale string) error { - prec, err := dt.parsePrec(leadScale) +func (dest *DmIntervalDT) setPrecForSvr(_ string, leadScale string, secScale string) error { + prec, err := dest.parsePrec(leadScale) if err != nil { return err } - prec, err = dt.checkScale(prec) + prec, err = dest.checkScale(prec) if err != nil { return err } if prec < LOADPREC_DEFAULT { - dt.leadScale = LOADPREC_DEFAULT + dest.leadScale = LOADPREC_DEFAULT } else { - dt.leadScale = prec + dest.leadScale = prec } - prec, err = dt.parsePrec(secScale) + prec, err = dest.parsePrec(secScale) if err != nil { return err } if prec >= 0 && prec < SECDPREC_MAX { - dt.secScale = prec + dest.secScale = prec } else { - dt.secScale = SECDPREC_DEFAULT + dest.secScale = SECDPREC_DEFAULT } - dt.scaleForSvr = (int(dt._type) << 8) + (dt.leadScale << 4) + dt.secScale + dest.scaleForSvr = (int(dest._type) << 8) + (dest.leadScale << 4) + dest.secScale return nil } -func (dt *DmIntervalDT) checkSign(str string) string { +func (dest *DmIntervalDT) checkSign(str string) string { if str[0] == '-' { str = strings.TrimSpace(str[1:]) - dt.negative = true + dest.negative = true } else if str[0] == '+' { str = strings.TrimSpace(str[1:]) - dt.negative = false + dest.negative = false } return str } -func (dt *DmIntervalDT) setDay(value string) error { +func (dest *DmIntervalDT) setDay(value string) error { list := util.Split(value, " :.") if len(list) > 1 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_D + dest._type = QUA_D i, err := strconv.ParseInt(value, 10, 32) if err != nil { return err } if i < 0 { - dt.days = int(-i) - dt.negative = true + dest.days = int(-i) + dest.negative = true } else { - dt.days = int(i) + dest.days = int(i) } return nil } -func (dt *DmIntervalDT) setHour(value string) error { +func (dest *DmIntervalDT) setHour(value string) error { list := util.Split(value, " :.") if len(list) > 1 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_H + dest._type = QUA_H i, err := strconv.ParseInt(value, 10, 32) if err != nil { return err } if i < 0 { - dt.hours = int(-i) - dt.negative = true + dest.hours = int(-i) + dest.negative = true } else { - dt.hours = int(i) + dest.hours = int(i) } return nil } -func (dt *DmIntervalDT) setMinute(value string) error { +func (dest *DmIntervalDT) setMinute(value string) error { list := util.Split(value, " :.") if len(list) > 1 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_M + dest._type = QUA_M i, err := strconv.ParseInt(value, 10, 32) if err != nil { return err } if i < 0 { - dt.minutes = int(-i) - dt.negative = true + dest.minutes = int(-i) + dest.negative = true } else { - dt.minutes = int(i) + dest.minutes = int(i) } return nil } -func (dt *DmIntervalDT) setSecond(value string) error { +func (dest *DmIntervalDT) setSecond(value string) error { list := util.Split(value, " :.") if len(list) > 2 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_S + dest._type = QUA_S i, err := strconv.ParseInt(list[0], 10, 32) if err != nil { return err @@ -869,33 +869,33 @@ func (dt *DmIntervalDT) setSecond(value string) error { if err != nil { return err } - nx := math.Pow10(dt.secScale) + nx := math.Pow10(dest.secScale) nano = (int)(d_v * nx) } if i < 0 { - dt.seconds = int(-i) + dest.seconds = int(-i) } else { - dt.seconds = int(i) + dest.seconds = int(i) } if nano < 0 { - dt.fraction = -nano + dest.fraction = -nano } else { - dt.fraction = nano + dest.fraction = nano } if i < 0 || nano < 0 { - dt.negative = true + dest.negative = true } return nil } -func (dt *DmIntervalDT) setHourToSecond(value string) error { +func (dest *DmIntervalDT) setHourToSecond(value string) error { list := util.Split(value, " :.") if len(list) > 4 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_HMS + dest._type = QUA_HMS h, err := strconv.ParseInt(list[0], 10, 32) if err != nil { @@ -918,43 +918,43 @@ func (dt *DmIntervalDT) setHourToSecond(value string) error { if err != nil { return err } - nx := math.Pow10(dt.secScale) + nx := math.Pow10(dest.secScale) nano = (int)(d_v * nx) } if h < 0 { - dt.hours = int(-h) + dest.hours = int(-h) } else { - dt.hours = int(h) + dest.hours = int(h) } if m < 0 { - dt.minutes = int(-m) + dest.minutes = int(-m) } else { - dt.minutes = int(m) + dest.minutes = int(m) } if s < 0 { - dt.seconds = int(-s) + dest.seconds = int(-s) } else { - dt.seconds = int(s) + dest.seconds = int(s) } if nano < 0 { - dt.fraction = -nano + dest.fraction = -nano } else { - dt.fraction = nano + dest.fraction = nano } if h < 0 || m < 0 || s < 0 || nano < 0 { - dt.negative = true + dest.negative = true } return nil } -func (dt *DmIntervalDT) setHourToMinute(value string) error { +func (dest *DmIntervalDT) setHourToMinute(value string) error { value = strings.TrimSpace(value) list := util.Split(value, " :.") if len(list) > 2 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_HM + dest._type = QUA_HM h, err := strconv.ParseInt(list[0], 10, 32) if err != nil { @@ -967,27 +967,27 @@ func (dt *DmIntervalDT) setHourToMinute(value string) error { } if h < 0 { - dt.hours = int(-h) + dest.hours = int(-h) } else { - dt.hours = int(h) + dest.hours = int(h) } if m < 0 { - dt.minutes = int(-m) + dest.minutes = int(-m) } else { - dt.minutes = int(m) + dest.minutes = int(m) } if h < 0 || m < 0 { - dt.negative = true + dest.negative = true } return nil } -func (dt *DmIntervalDT) setMinuteToSecond(value string) error { +func (dest *DmIntervalDT) setMinuteToSecond(value string) error { list := util.Split(value, " :.") if len(list) > 3 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_MS + dest._type = QUA_MS m, err := strconv.ParseInt(list[0], 10, 32) if err != nil { @@ -1007,37 +1007,37 @@ func (dt *DmIntervalDT) setMinuteToSecond(value string) error { return err } - nx := math.Pow10(dt.secScale) + nx := math.Pow10(dest.secScale) nano = (int)(d_v * nx) } if m < 0 { - dt.minutes = int(-m) + dest.minutes = int(-m) } else { - dt.minutes = int(m) + dest.minutes = int(m) } if s < 0 { - dt.seconds = int(-s) + dest.seconds = int(-s) } else { - dt.seconds = int(s) + dest.seconds = int(s) } if nano < 0 { - dt.fraction = -nano + dest.fraction = -nano } else { - dt.fraction = nano + dest.fraction = nano } if m < 0 || s < 0 || nano < 0 { - dt.negative = true + dest.negative = true } return nil } -func (dt *DmIntervalDT) setDayToHour(value string) error { +func (dest *DmIntervalDT) setDayToHour(value string) error { list := util.Split(value, " :.") if len(list) > 2 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_DH + dest._type = QUA_DH d, err := strconv.ParseInt(list[0], 10, 32) if err != nil { @@ -1050,27 +1050,27 @@ func (dt *DmIntervalDT) setDayToHour(value string) error { } if d < 0 { - dt.days = int(-d) + dest.days = int(-d) } else { - dt.days = int(d) + dest.days = int(d) } if h < 0 { - dt.hours = int(-h) + dest.hours = int(-h) } else { - dt.hours = int(h) + dest.hours = int(h) } if d < 0 || h < 0 { - dt.negative = true + dest.negative = true } return nil } -func (dt *DmIntervalDT) setDayToMinute(value string) error { +func (dest *DmIntervalDT) setDayToMinute(value string) error { list := util.Split(value, " :.") if len(list) > 3 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_DHM + dest._type = QUA_DHM d, err := strconv.ParseInt(list[0], 10, 32) if err != nil { @@ -1088,32 +1088,32 @@ func (dt *DmIntervalDT) setDayToMinute(value string) error { } if d < 0 { - dt.days = int(-d) + dest.days = int(-d) } else { - dt.days = int(d) + dest.days = int(d) } if h < 0 { - dt.hours = int(-h) + dest.hours = int(-h) } else { - dt.hours = int(h) + dest.hours = int(h) } if m < 0 { - dt.minutes = int(-m) + dest.minutes = int(-m) } else { - dt.minutes = int(m) + dest.minutes = int(m) } if d < 0 || h < 0 || m < 0 { - dt.negative = true + dest.negative = true } return nil } -func (dt *DmIntervalDT) setDayToSecond(value string) error { +func (dest *DmIntervalDT) setDayToSecond(value string) error { list := util.Split(value, " :.") if len(list) > 5 { return ECGO_INVALID_TIME_INTERVAL.throw() } - dt._type = QUA_DHMS + dest._type = QUA_DHMS d, err := strconv.ParseInt(list[0], 10, 32) if err != nil { @@ -1143,93 +1143,93 @@ func (dt *DmIntervalDT) setDayToSecond(value string) error { return err } - nx := math.Pow10(dt.secScale) + nx := math.Pow10(dest.secScale) nano = (int)(d_v * nx) } if d < 0 { - dt.days = int(-d) + dest.days = int(-d) } else { - dt.days = int(d) + dest.days = int(d) } if h < 0 { - dt.hours = int(-h) + dest.hours = int(-h) } else { - dt.hours = int(h) + dest.hours = int(h) } if m < 0 { - dt.minutes = int(-m) + dest.minutes = int(-m) } else { - dt.minutes = int(m) + dest.minutes = int(m) } if s < 0 { - dt.seconds = int(-s) + dest.seconds = int(-s) } else { - dt.seconds = int(s) + dest.seconds = int(s) } if nano < 0 { - dt.fraction = -nano + dest.fraction = -nano } else { - dt.fraction = nano + dest.fraction = nano } if d < 0 || h < 0 || m < 0 || s < 0 || nano < 0 { - dt.negative = true + dest.negative = true } return nil } -func (dt *DmIntervalDT) getMsecString() string { - nano := strconv.Itoa(dt.fraction) +func (dest *DmIntervalDT) getMsecString() string { + nano := strconv.Itoa(dest.fraction) for i := 6 - len(nano); i > 0; i-- { nano = "0" + nano } - if len(nano) > dt.secScale { - nano = nano[:dt.secScale] + if len(nano) > dest.secScale { + nano = nano[:dest.secScale] } return nano } -func (dt *DmIntervalDT) encode(scale int) ([]byte, error) { +func (dest *DmIntervalDT) encode(scale int) ([]byte, error) { if scale == 0 { - scale = dt.scaleForSvr + scale = dest.scaleForSvr } - day, hour, minute, second, f := dt.days, dt.hours, dt.minutes, dt.seconds, dt.fraction - if scale != dt.scaleForSvr { - convertDT, err := dt.convertTo(scale) + day, hour, minute, second, f := dest.days, dest.hours, dest.minutes, dest.seconds, dest.fraction + if scale != dest.scaleForSvr { + convertDT, err := dest.convertTo(scale) if err != nil { return nil, err } day, hour, minute, second, f = convertDT.days, convertDT.hours, convertDT.minutes, convertDT.seconds, convertDT.fraction } else { loadPrec := (scale >> 4) & 0x0000000F - if _, err := dt.checkScale(loadPrec); err != nil { + if _, err := dest.checkScale(loadPrec); err != nil { return nil, err } } bytes := make([]byte, 24) - if dt.negative { - Dm_build_1331.Dm_build_1347(bytes, 0, int32(-day)) - Dm_build_1331.Dm_build_1347(bytes, 4, int32(-hour)) - Dm_build_1331.Dm_build_1347(bytes, 8, int32(-minute)) - Dm_build_1331.Dm_build_1347(bytes, 12, int32(-second)) - Dm_build_1331.Dm_build_1347(bytes, 16, int32(-f)) - Dm_build_1331.Dm_build_1347(bytes, 20, int32(scale)) + if dest.negative { + Dm_build_1.Dm_build_17(bytes, 0, int32(-day)) + Dm_build_1.Dm_build_17(bytes, 4, int32(-hour)) + Dm_build_1.Dm_build_17(bytes, 8, int32(-minute)) + Dm_build_1.Dm_build_17(bytes, 12, int32(-second)) + Dm_build_1.Dm_build_17(bytes, 16, int32(-f)) + Dm_build_1.Dm_build_17(bytes, 20, int32(scale)) } else { - Dm_build_1331.Dm_build_1347(bytes, 0, int32(day)) - Dm_build_1331.Dm_build_1347(bytes, 4, int32(hour)) - Dm_build_1331.Dm_build_1347(bytes, 8, int32(minute)) - Dm_build_1331.Dm_build_1347(bytes, 12, int32(second)) - Dm_build_1331.Dm_build_1347(bytes, 16, int32(f)) - Dm_build_1331.Dm_build_1347(bytes, 20, int32(scale)) + Dm_build_1.Dm_build_17(bytes, 0, int32(day)) + Dm_build_1.Dm_build_17(bytes, 4, int32(hour)) + Dm_build_1.Dm_build_17(bytes, 8, int32(minute)) + Dm_build_1.Dm_build_17(bytes, 12, int32(second)) + Dm_build_1.Dm_build_17(bytes, 16, int32(f)) + Dm_build_1.Dm_build_17(bytes, 20, int32(scale)) } return bytes, nil } -func (dt *DmIntervalDT) convertTo(scale int) (*DmIntervalDT, error) { +func (dest *DmIntervalDT) convertTo(scale int) (*DmIntervalDT, error) { destType := (scale & 0x0000FF00) >> 8 leadPrec := (scale >> 4) & 0x0000000F secScale := scale & 0x0000000F @@ -1241,51 +1241,51 @@ func (dt *DmIntervalDT) convertTo(scale int) (*DmIntervalDT, error) { orgDT := make([]int, 5) destDT := make([]int, 5) - switch dt._type { + switch dest._type { case QUA_D: - orgDT[dayIndex] = dt.days + orgDT[dayIndex] = dest.days case QUA_DH: - orgDT[dayIndex] = dt.days - orgDT[hourIndex] = dt.hours + orgDT[dayIndex] = dest.days + orgDT[hourIndex] = dest.hours case QUA_DHM: - orgDT[dayIndex] = dt.days - orgDT[hourIndex] = dt.hours - orgDT[minuteIndex] = dt.minutes + orgDT[dayIndex] = dest.days + orgDT[hourIndex] = dest.hours + orgDT[minuteIndex] = dest.minutes case QUA_DHMS: - orgDT[dayIndex] = dt.days - orgDT[hourIndex] = dt.hours - orgDT[minuteIndex] = dt.minutes - orgDT[secondIndex] = dt.seconds - orgDT[fractionIndex] = dt.fraction + orgDT[dayIndex] = dest.days + orgDT[hourIndex] = dest.hours + orgDT[minuteIndex] = dest.minutes + orgDT[secondIndex] = dest.seconds + orgDT[fractionIndex] = dest.fraction case QUA_H: - orgDT[dayIndex] = dt.hours / 24 - orgDT[hourIndex] = dt.hours % 24 + orgDT[dayIndex] = dest.hours / 24 + orgDT[hourIndex] = dest.hours % 24 case QUA_HM: - orgDT[dayIndex] = dt.hours / 24 - orgDT[hourIndex] = dt.hours % 24 - orgDT[minuteIndex] = dt.minutes + orgDT[dayIndex] = dest.hours / 24 + orgDT[hourIndex] = dest.hours % 24 + orgDT[minuteIndex] = dest.minutes case QUA_HMS: - orgDT[dayIndex] = dt.hours / 24 - orgDT[hourIndex] = dt.hours % 24 - orgDT[minuteIndex] = dt.minutes - orgDT[secondIndex] = dt.seconds - orgDT[fractionIndex] = dt.fraction + orgDT[dayIndex] = dest.hours / 24 + orgDT[hourIndex] = dest.hours % 24 + orgDT[minuteIndex] = dest.minutes + orgDT[secondIndex] = dest.seconds + orgDT[fractionIndex] = dest.fraction case QUA_M: - orgDT[dayIndex] = dt.minutes / (24 * 60) - orgDT[hourIndex] = (dt.minutes % (24 * 60)) / 60 - orgDT[minuteIndex] = (dt.minutes % (24 * 60)) % 60 + orgDT[dayIndex] = dest.minutes / (24 * 60) + orgDT[hourIndex] = (dest.minutes % (24 * 60)) / 60 + orgDT[minuteIndex] = (dest.minutes % (24 * 60)) % 60 case QUA_MS: - orgDT[dayIndex] = dt.minutes / (24 * 60) - orgDT[hourIndex] = (dt.minutes % (24 * 60)) / 60 - orgDT[minuteIndex] = (dt.minutes % (24 * 60)) % 60 - orgDT[secondIndex] = dt.seconds - orgDT[fractionIndex] = dt.fraction + orgDT[dayIndex] = dest.minutes / (24 * 60) + orgDT[hourIndex] = (dest.minutes % (24 * 60)) / 60 + orgDT[minuteIndex] = (dest.minutes % (24 * 60)) % 60 + orgDT[secondIndex] = dest.seconds + orgDT[fractionIndex] = dest.fraction case QUA_S: - orgDT[dayIndex] = dt.seconds / (24 * 60 * 60) - orgDT[hourIndex] = (dt.seconds % (24 * 60 * 60)) / (60 * 60) - orgDT[minuteIndex] = ((dt.seconds % (24 * 60 * 60)) % (60 * 60)) / 60 - orgDT[secondIndex] = ((dt.seconds % (24 * 60 * 60)) % (60 * 60)) % 60 - orgDT[fractionIndex] = dt.fraction + orgDT[dayIndex] = dest.seconds / (24 * 60 * 60) + orgDT[hourIndex] = (dest.seconds % (24 * 60 * 60)) / (60 * 60) + orgDT[minuteIndex] = ((dest.seconds % (24 * 60 * 60)) % (60 * 60)) / 60 + orgDT[secondIndex] = ((dest.seconds % (24 * 60 * 60)) % (60 * 60)) % 60 + orgDT[fractionIndex] = dest.fraction } switch byte(destType) { @@ -1322,7 +1322,7 @@ func (dt *DmIntervalDT) convertTo(scale int) (*DmIntervalDT, error) { destDT[minuteIndex] = orgDT[minuteIndex] destDT[secondIndex] = orgDT[secondIndex] destDT[fractionIndex] = orgDT[fractionIndex] - dt.convertMSecond(QUA_DHMS, destDT, secScale) + dest.convertMSecond(QUA_DHMS, destDT, secScale) if leadPrec < len(strconv.Itoa(int(math.Abs(float64(destDT[dayIndex]))))) { return nil, ECGO_INTERVAL_OVERFLOW.throw() } @@ -1348,7 +1348,7 @@ func (dt *DmIntervalDT) convertTo(scale int) (*DmIntervalDT, error) { destDT[minuteIndex] = orgDT[minuteIndex] destDT[secondIndex] = orgDT[secondIndex] destDT[fractionIndex] = orgDT[fractionIndex] - dt.convertMSecond(QUA_HMS, destDT, secScale) + dest.convertMSecond(QUA_HMS, destDT, secScale) if leadPrec < len(strconv.Itoa(int(math.Abs(float64(destDT[hourIndex]))))) { return nil, ECGO_INTERVAL_OVERFLOW.throw() } @@ -1364,14 +1364,14 @@ func (dt *DmIntervalDT) convertTo(scale int) (*DmIntervalDT, error) { destDT[minuteIndex] = orgDT[dayIndex]*24*60 + orgDT[hourIndex]*60 + orgDT[minuteIndex] destDT[secondIndex] = orgDT[secondIndex] destDT[fractionIndex] = orgDT[fractionIndex] - dt.convertMSecond(QUA_MS, destDT, secScale) + dest.convertMSecond(QUA_MS, destDT, secScale) if leadPrec < len(strconv.Itoa(int(math.Abs(float64(destDT[minuteIndex]))))) { return nil, ECGO_INTERVAL_OVERFLOW.throw() } case QUA_S: destDT[secondIndex] = orgDT[dayIndex]*24*60*60 + orgDT[hourIndex]*60*60 + orgDT[minuteIndex]*60 + orgDT[secondIndex] destDT[fractionIndex] = orgDT[fractionIndex] - dt.convertMSecond(QUA_S, destDT, secScale) + dest.convertMSecond(QUA_S, destDT, secScale) if leadPrec < len(strconv.Itoa(int(math.Abs(float64(destDT[secondIndex]))))) { return nil, ECGO_INTERVAL_OVERFLOW.throw() } @@ -1379,7 +1379,7 @@ func (dt *DmIntervalDT) convertTo(scale int) (*DmIntervalDT, error) { return &DmIntervalDT{ _type: byte(destType), - negative: dt.negative, + negative: dest.negative, leadScale: (scale >> 4) & 0x0000000F, secScale: scale & 0x0000000F, scaleForSvr: scale, @@ -1392,10 +1392,10 @@ func (dt *DmIntervalDT) convertTo(scale int) (*DmIntervalDT, error) { }, nil } -func (dt DmIntervalDT) convertMSecond(destType byte, destDT []int, destSecScale int) { +func (dest DmIntervalDT) convertMSecond(destType byte, destDT []int, destSecScale int) { fractionIndex := 4 orgFraction := destDT[fractionIndex] - if destSecScale == 0 || destSecScale < dt.secScale { + if destSecScale == 0 || destSecScale < dest.secScale { n := int(math.Pow(10, 6-float64(destSecScale)-1)) f := orgFraction / n / 10 @@ -1444,13 +1444,13 @@ func incrementSecond(destType byte, dt []int) { } } -func (dt *DmIntervalDT) checkValid() error { - if !dt.Valid { +func (dest *DmIntervalDT) checkValid() error { + if !dest.Valid { return ECGO_IS_NULL.throw() } return nil } -func (dt *DmIntervalDT) GormDataType() string { +func (dest *DmIntervalDT) GormDataType() string { return "INTERVAL DAY TO SECOND" } diff --git a/dm8/r.go b/dm8/r.go index 8684268..6047d37 100644 --- a/dm8/r.go +++ b/dm8/r.go @@ -54,17 +54,17 @@ func NewDmIntervalYMByString(str string) (ym *DmIntervalYM, err error) { func newDmIntervalYMByBytes(bytes []byte) *DmIntervalYM { ym := newDmIntervalYM() - ym.scaleForSvr = int(Dm_build_1331.Dm_build_1433(bytes, 8)) + ym.scaleForSvr = int(Dm_build_1.Dm_build_103(bytes, 8)) ym.leadScale = (ym.scaleForSvr >> 4) & 0x0000000F ym._type = bytes[9] switch ym._type { case QUA_Y: - ym.years = int(Dm_build_1331.Dm_build_1433(bytes, 0)) + ym.years = int(Dm_build_1.Dm_build_103(bytes, 0)) case QUA_YM: - ym.years = int(Dm_build_1331.Dm_build_1433(bytes, 0)) - ym.months = int(Dm_build_1331.Dm_build_1433(bytes, 4)) + ym.years = int(Dm_build_1.Dm_build_103(bytes, 0)) + ym.months = int(Dm_build_1.Dm_build_103(bytes, 4)) case QUA_MO: - ym.months = int(Dm_build_1331.Dm_build_1433(bytes, 4)) + ym.months = int(Dm_build_1.Dm_build_103(bytes, 4)) } return ym } @@ -437,9 +437,9 @@ func (ym *DmIntervalYM) encode(scale int) ([]byte, error) { } bytes := make([]byte, 12) - Dm_build_1331.Dm_build_1347(bytes, 0, int32(year)) - Dm_build_1331.Dm_build_1347(bytes, 4, int32(month)) - Dm_build_1331.Dm_build_1347(bytes, 8, int32(scale)) + Dm_build_1.Dm_build_17(bytes, 0, int32(year)) + Dm_build_1.Dm_build_17(bytes, 4, int32(month)) + Dm_build_1.Dm_build_17(bytes, 8, int32(scale)) return bytes, nil } diff --git a/dm8/security/zzi.go b/dm8/security/zzi.go index ae53991..e8f2194 100644 --- a/dm8/security/zzi.go +++ b/dm8/security/zzi.go @@ -17,7 +17,7 @@ import ( var dmHome = flag.String("DM_HOME", "", "Where DMDB installed") var flagLock = sync.Mutex{} -func NewTLSFromTCP(conn *net.TCPConn, sslCertPath string, sslKeyPath string, user string) (*tls.Conn, error) { +func NewTLSFromTCP(conn net.Conn, sslCertPath string, sslKeyPath string, user string) (*tls.Conn, error) { if sslCertPath == "" && sslKeyPath == "" { // 为什么从os.getEnv改为flag? 参照JDBC,它通过System.getProperty()获取命令中的-DDM_HOME=值 // flag非协程安全,内部存在并发写map的操作 diff --git a/dm8/t.go b/dm8/t.go index 901cbcd..6e58902 100644 --- a/dm8/t.go +++ b/dm8/t.go @@ -305,7 +305,7 @@ func (innerRows *innerRows) HasNextResultSet() bool { return innerRows.nextExecInfo.hasResultSet } - innerRows.nextExecInfo, err = innerRows.dmStmt.dmConn.Access.Dm_build_532(innerRows.dmStmt, 0) + innerRows.nextExecInfo, err = innerRows.dmStmt.dmConn.Access.Dm_build_817(innerRows.dmStmt, 0) if err != nil { return false } @@ -464,7 +464,7 @@ func (innerRows *innerRows) checkIndex(index int) *column { } func (innerRows *innerRows) fetchData(startPos int64) bool { - execInfo, err := innerRows.dmStmt.dmConn.Access.Dm_build_539(innerRows, startPos) + execInfo, err := innerRows.dmStmt.dmConn.Access.Dm_build_824(innerRows, startPos) if err != nil { return false } @@ -486,7 +486,7 @@ func (innerRows *innerRows) getRowData(dest []driver.Value) (err error) { if i <= len(dest)-1 { if column.colType == CURSOR { var tmpExecInfo *execRetInfo - tmpExecInfo, err = innerRows.dmStmt.dmConn.Access.Dm_build_532(innerRows.dmStmt, 1) + tmpExecInfo, err = innerRows.dmStmt.dmConn.Access.Dm_build_817(innerRows.dmStmt, 1) if err != nil { return err } diff --git a/dm8/u.go b/dm8/u.go index fdd45d9..94045bd 100644 --- a/dm8/u.go +++ b/dm8/u.go @@ -141,7 +141,7 @@ func (rpv rsPoolValue) refreshed(conn *DmConnection) (bool, error) { return false, nil } - tss, err := conn.Access.Dm_build_565(interface{}(rpv.m_TbIds).([]uint32)) + tss, err := conn.Access.Dm_build_850(interface{}(rpv.m_TbIds).([]uint32)) if err != nil { return false, err } @@ -338,7 +338,7 @@ func (stmt *DmStatement) prepare() error { } } - stmt.execInfo, err = stmt.dmConn.Access.Dm_build_490(stmt, Dm_build_777) + stmt.execInfo, err = stmt.dmConn.Access.Dm_build_775(stmt, Dm_build_1062) if err != nil { return err } @@ -387,7 +387,7 @@ func (stmt *DmStatement) exec(args []driver.Value) (*DmResult, error) { } err = stmt.executeBatch(tmpArg) } else { - err = stmt.executeInner(args, Dm_build_779) + err = stmt.executeInner(args, Dm_build_1064) } if err != nil { return nil, err @@ -413,7 +413,7 @@ func (stmt *DmStatement) execContext(ctx context.Context, args []driver.NamedVal func (stmt *DmStatement) query(args []driver.Value) (*DmRows, error) { var err error stmt.inUse = true - err = stmt.executeInner(args, Dm_build_778) + err = stmt.executeInner(args, Dm_build_1063) if err != nil { return nil, err } @@ -449,26 +449,26 @@ func (stmt *DmStatement) queryContext(ctx context.Context, args []driver.NamedVa func NewDmStmt(conn *DmConnection, sql string) (*DmStatement, error) { var s *DmStatement - if s == nil { - s = new(DmStatement) - s.resetFilterable(&conn.filterable) - s.objId = -1 - s.idGenerator = dmStmtIDGenerator - s.dmConn = conn - s.maxRows = int64(conn.dmConnector.maxRows) - s.nativeSql = sql - s.rsMap = make(map[int16]*innerRows) - s.inUse = true - s.isBatch = conn.isBatch - - err := conn.Access.Dm_build_472(s) - if err != nil { - return nil, err - } - - conn.stmtMap[s.id] = s + //if s == nil { + s = new(DmStatement) + s.resetFilterable(&conn.filterable) + s.objId = -1 + s.idGenerator = dmStmtIDGenerator + s.dmConn = conn + s.maxRows = int64(conn.dmConnector.maxRows) + s.nativeSql = sql + s.rsMap = make(map[int16]*innerRows) + s.inUse = true + s.isBatch = conn.isBatch + + err := conn.Access.Dm_build_757(s) + if err != nil { + return nil, err } + conn.stmtMap[s.id] = s + //} + return s, nil } @@ -489,7 +489,7 @@ func (stmt *DmStatement) free() error { _ = rs.Close() } - err := stmt.dmConn.Access.Dm_build_477(stmt.id) + err := stmt.dmConn.Access.Dm_build_762(stmt.id) if err != nil { return err } @@ -619,7 +619,7 @@ func bindOutParam(stmt *DmStatement, i int, dtype int32) error { if bindParam.cursorStmt == nil { bindParam.cursorStmt = &DmStatement{dmConn: stmt.dmConn} bindParam.cursorStmt.resetFilterable(&stmt.dmConn.filterable) - err = bindParam.cursorStmt.dmConn.Access.Dm_build_472(bindParam.cursorStmt) + err = bindParam.cursorStmt.dmConn.Access.Dm_build_757(bindParam.cursorStmt) } } } @@ -645,7 +645,7 @@ func encodeArgs(stmt *DmStatement, args []driver.Value, firstRow bool) ([]interf if stmt.bindParams[i].cursorStmt == nil { stmt.bindParams[i].cursorStmt = &DmStatement{dmConn: stmt.dmConn} stmt.bindParams[i].cursorStmt.resetFilterable(&stmt.dmConn.filterable) - err = stmt.bindParams[i].cursorStmt.dmConn.Access.Dm_build_472(stmt.bindParams[i].cursorStmt) + err = stmt.bindParams[i].cursorStmt.dmConn.Access.Dm_build_757(stmt.bindParams[i].cursorStmt) } stmt.bindParams[i].ioType = IO_TYPE_INOUT continue @@ -822,7 +822,7 @@ func encodeArgs(stmt *DmStatement, args []driver.Value, firstRow bool) ([]interf if stmt.bindParams[i].cursorStmt == nil { stmt.bindParams[i].cursorStmt = &DmStatement{dmConn: stmt.dmConn} stmt.bindParams[i].cursorStmt.resetFilterable(&stmt.dmConn.filterable) - err = stmt.bindParams[i].cursorStmt.dmConn.Access.Dm_build_472(stmt.bindParams[i].cursorStmt) + err = stmt.bindParams[i].cursorStmt.dmConn.Access.Dm_build_757(stmt.bindParams[i].cursorStmt) } } case io.Reader: @@ -951,6 +951,7 @@ func (c *converter) ConvertValue(v interface{}) (driver.Value, error) { return nil, fmt.Errorf("unsupported type %T, a slice of %s", v, ek) case reflect.String: return rv.String(), nil + default: } return nil, fmt.Errorf("unsupported type %T, a %s", v, rv.Kind()) } @@ -987,7 +988,7 @@ func namedValueToValue(stmt *DmStatement, named []driver.NamedValue) ([]driver.V return dargs, nil } -func (stmt *DmStatement) executeInner(args []driver.Value, executeType int16) (err error) { +func (stmt *DmStatement) executeInner(args []driver.Value, _ int16) (err error) { var bytes []interface{} @@ -997,7 +998,7 @@ func (stmt *DmStatement) executeInner(args []driver.Value, executeType int16) (e return err } } - stmt.execInfo, err = stmt.dmConn.Access.Dm_build_522(stmt, bytes, false) + stmt.execInfo, err = stmt.dmConn.Access.Dm_build_807(stmt, bytes, false) if err != nil { return err } @@ -1068,7 +1069,7 @@ func (stmt *DmStatement) executeInner(args []driver.Value, executeType int16) (e v, err = TypeDataSV.bytesToObj(outParamData, nil, stmt.bindParams[i].typeDescriptor) case CURSOR: var tmpExecInfo *execRetInfo - if tmpExecInfo, err = stmt.dmConn.Access.Dm_build_532(stmt.bindParams[i].cursorStmt, 1); err != nil { + if tmpExecInfo, err = stmt.dmConn.Access.Dm_build_817(stmt.bindParams[i].cursorStmt, 1); err != nil { return err } if tmpExecInfo.hasResultSet { @@ -1394,7 +1395,7 @@ func (stmt *DmStatement) executeInner(args []driver.Value, executeType int16) (e case *driver.Rows: if stmt.bindParams[i].colType == CURSOR { var tmpExecInfo *execRetInfo - tmpExecInfo, err = stmt.dmConn.Access.Dm_build_532(stmt.bindParams[i].cursorStmt, 1) + tmpExecInfo, err = stmt.dmConn.Access.Dm_build_817(stmt.bindParams[i].cursorStmt, 1) if err != nil { return err } @@ -1444,14 +1445,14 @@ func (stmt *DmStatement) executeBatch(args []driver.Value) (err error) { var bytes [][]interface{} - if stmt.execInfo.retSqlType == Dm_build_792 || stmt.execInfo.retSqlType == Dm_build_797 { + if stmt.execInfo.retSqlType == Dm_build_1077 || stmt.execInfo.retSqlType == Dm_build_1082 { return ECGO_INVALID_SQL_TYPE.throw() } if stmt.paramCount > 0 && args != nil && len(args) > 0 { if len(args) == 1 || stmt.dmConn.dmConnector.batchType == 2 || - (stmt.dmConn.dmConnector.batchNotOnCall && stmt.execInfo.retSqlType == Dm_build_793) { + (stmt.dmConn.dmConnector.batchNotOnCall && stmt.execInfo.retSqlType == Dm_build_1078) { return stmt.executeBatchByRow(args) } else { for i, arg := range args { @@ -1465,7 +1466,7 @@ func (stmt *DmStatement) executeBatch(args []driver.Value) (err error) { } bytes = append(bytes, tmpBytes) } - stmt.execInfo, err = stmt.dmConn.Access.Dm_build_511(stmt, bytes, stmt.preExec) + stmt.execInfo, err = stmt.dmConn.Access.Dm_build_796(stmt, bytes, stmt.preExec) } } return err @@ -1477,7 +1478,7 @@ func (stmt *DmStatement) executeBatchByRow(args []driver.Value) (err error) { stmt.execInfo.updateCounts = make([]int64, count) var sqlErrBuilder strings.Builder for i := 0; i < count; i++ { - tmpExecInfo, err := stmt.dmConn.Access.Dm_build_522(stmt, args[i].([]interface{}), stmt.preExec || i != 0) + tmpExecInfo, err := stmt.dmConn.Access.Dm_build_807(stmt, args[i].([]interface{}), stmt.preExec || i != 0) if err == nil { stmt.execInfo.union(tmpExecInfo, i, 1) } else { diff --git a/dm8/zc.go b/dm8/zc.go index 9d4e093..41edf92 100644 --- a/dm8/zc.go +++ b/dm8/zc.go @@ -106,7 +106,7 @@ func runLog() { flushFreq: LogFlushFreq, filePath: LogDir, filePrefix: "dm_go", - buffer: Dm_build_4(), + buffer: Dm_build_286(), } go goMap["log"].doRun() } diff --git a/dm8/zi.go b/dm8/zi.go index 787744c..fdfa798 100644 --- a/dm8/zi.go +++ b/dm8/zi.go @@ -107,9 +107,9 @@ func (G2DB g2db) fromBool(val bool, param parameter, conn *DmConnection) ([]byte } case BINARY, VARBINARY, BLOB: if val { - return Dm_build_1331.Dm_build_1509(byte(1)), nil + return Dm_build_1.Dm_build_179(byte(1)), nil } else { - return Dm_build_1331.Dm_build_1509(byte(0)), nil + return Dm_build_1.Dm_build_179(byte(0)), nil } } return nil, ECGO_DATA_CONVERTION_ERROR.throw() @@ -120,10 +120,10 @@ func (G2DB g2db) fromInt64(val int64, param parameter, conn *DmConnection) ([]by switch param.colType { case BOOLEAN, BIT: if val == 0 { - return Dm_build_1331.Dm_build_1509(byte(0)), nil + return Dm_build_1.Dm_build_179(byte(0)), nil } - return Dm_build_1331.Dm_build_1509(byte(1)), nil + return Dm_build_1.Dm_build_179(byte(1)), nil case TINYINT: err := G2DB.checkTinyint(float64(val)) @@ -132,7 +132,7 @@ func (G2DB g2db) fromInt64(val int64, param parameter, conn *DmConnection) ([]by return nil, err } - return Dm_build_1331.Dm_build_1509(byte(val)), nil + return Dm_build_1.Dm_build_179(byte(val)), nil case SMALLINT: err := G2DB.checkSmallint(float64(val)) @@ -140,7 +140,7 @@ func (G2DB g2db) fromInt64(val int64, param parameter, conn *DmConnection) ([]by return nil, err } - return Dm_build_1331.Dm_build_1515(int16(val)), nil + return Dm_build_1.Dm_build_185(int16(val)), nil case INT: err := G2DB.checkInt(float64(val)) @@ -148,7 +148,7 @@ func (G2DB g2db) fromInt64(val int64, param parameter, conn *DmConnection) ([]by return nil, err } - return Dm_build_1331.Dm_build_1518(int32(val)), nil + return Dm_build_1.Dm_build_188(int32(val)), nil case BIGINT: err := G2DB.checkBigint(float64(val)) @@ -156,7 +156,7 @@ func (G2DB g2db) fromInt64(val int64, param parameter, conn *DmConnection) ([]by return nil, err } - return Dm_build_1331.Dm_build_1521(val), nil + return Dm_build_1.Dm_build_191(val), nil case REAL: err := G2DB.checkReal(float64(val)) @@ -164,9 +164,9 @@ func (G2DB g2db) fromInt64(val int64, param parameter, conn *DmConnection) ([]by return nil, err } - return Dm_build_1331.Dm_build_1524(float32(val)), nil + return Dm_build_1.Dm_build_194(float32(val)), nil case DOUBLE: - return Dm_build_1331.Dm_build_1527(float64(val)), nil + return Dm_build_1.Dm_build_197(float64(val)), nil case DECIMAL: d, err := newDecimal(big.NewInt(val), int(param.prec), int(param.scale)) if err != nil { @@ -174,7 +174,7 @@ func (G2DB g2db) fromInt64(val int64, param parameter, conn *DmConnection) ([]by } return d.encodeDecimal() case CHAR, VARCHAR2, VARCHAR, CLOB: - return Dm_build_1331.Dm_build_1547(strconv.FormatInt(val, 10), conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(strconv.FormatInt(val, 10), conn.getServerEncoding(), conn), nil case BINARY, VARBINARY, BLOB: return G2DB.ToBinary(val, int(param.prec)), nil case DATE, TIME, DATETIME, DATETIME2: @@ -209,36 +209,36 @@ func (G2DB g2db) fromFloat32(val float32, param parameter, conn *DmConnection) ( switch param.colType { case BOOLEAN, BIT: if val == 0.0 { - return Dm_build_1331.Dm_build_1509(0), nil + return Dm_build_1.Dm_build_179(0), nil } - return Dm_build_1331.Dm_build_1509(1), nil + return Dm_build_1.Dm_build_179(1), nil case TINYINT: if err := G2DB.checkTinyint(float64(val)); err != nil { return nil, err } - return Dm_build_1331.Dm_build_1509(byte(val)), nil + return Dm_build_1.Dm_build_179(byte(val)), nil case SMALLINT: if err := G2DB.checkSmallint(float64(val)); err != nil { return nil, err } - return Dm_build_1331.Dm_build_1515(int16(val)), nil + return Dm_build_1.Dm_build_185(int16(val)), nil case INT: if err := G2DB.checkInt(float64(val)); err != nil { return nil, err } - return Dm_build_1331.Dm_build_1518(int32(val)), nil + return Dm_build_1.Dm_build_188(int32(val)), nil case BIGINT: if err := G2DB.checkBigint(float64(val)); err != nil { return nil, err } - return Dm_build_1331.Dm_build_1521(int64(val)), nil + return Dm_build_1.Dm_build_191(int64(val)), nil case REAL: if err := G2DB.checkReal(float64(val)); err != nil { return nil, err } - return Dm_build_1331.Dm_build_1524(val), nil + return Dm_build_1.Dm_build_194(val), nil case DOUBLE: - return Dm_build_1331.Dm_build_1527(float64(val)), nil + return Dm_build_1.Dm_build_197(float64(val)), nil case DECIMAL: d, err := newDecimal(big.NewFloat(float64(val)), int(param.prec), int(param.scale)) if err != nil { @@ -246,7 +246,7 @@ func (G2DB g2db) fromFloat32(val float32, param parameter, conn *DmConnection) ( } return d.encodeDecimal() case CHAR, VARCHAR2, VARCHAR, CLOB: - return Dm_build_1331.Dm_build_1547(strconv.FormatFloat(float64(val), 'f', -1, 32), conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(strconv.FormatFloat(float64(val), 'f', -1, 32), conn.getServerEncoding(), conn), nil } return nil, ECGO_DATA_CONVERTION_ERROR.throw() } @@ -256,9 +256,9 @@ func (G2DB g2db) fromFloat64(val float64, param parameter, conn *DmConnection) ( switch param.colType { case BOOLEAN, BIT: if val == 0.0 { - return Dm_build_1331.Dm_build_1509(0), nil + return Dm_build_1.Dm_build_179(0), nil } - return Dm_build_1331.Dm_build_1509(1), nil + return Dm_build_1.Dm_build_179(1), nil case TINYINT: err := G2DB.checkTinyint(val) @@ -267,7 +267,7 @@ func (G2DB g2db) fromFloat64(val float64, param parameter, conn *DmConnection) ( return nil, err } - return Dm_build_1331.Dm_build_1509(byte(val)), nil + return Dm_build_1.Dm_build_179(byte(val)), nil case SMALLINT: err := G2DB.checkSmallint(val) @@ -275,7 +275,7 @@ func (G2DB g2db) fromFloat64(val float64, param parameter, conn *DmConnection) ( return nil, err } - return Dm_build_1331.Dm_build_1515(int16(val)), nil + return Dm_build_1.Dm_build_185(int16(val)), nil case INT: err := G2DB.checkInt(val) @@ -283,7 +283,7 @@ func (G2DB g2db) fromFloat64(val float64, param parameter, conn *DmConnection) ( return nil, err } - return Dm_build_1331.Dm_build_1518(int32(val)), nil + return Dm_build_1.Dm_build_188(int32(val)), nil case BIGINT: err := G2DB.checkBigint(val) @@ -291,7 +291,7 @@ func (G2DB g2db) fromFloat64(val float64, param parameter, conn *DmConnection) ( return nil, err } - return Dm_build_1331.Dm_build_1521(int64(val)), nil + return Dm_build_1.Dm_build_191(int64(val)), nil case REAL: err := G2DB.checkReal(val) @@ -299,9 +299,9 @@ func (G2DB g2db) fromFloat64(val float64, param parameter, conn *DmConnection) ( return nil, err } - return Dm_build_1331.Dm_build_1524(float32(val)), nil + return Dm_build_1.Dm_build_194(float32(val)), nil case DOUBLE: - return Dm_build_1331.Dm_build_1527(val), nil + return Dm_build_1.Dm_build_197(val), nil case DECIMAL: d, err := newDecimal(big.NewFloat(val), int(param.prec), int(param.scale)) if err != nil { @@ -309,7 +309,7 @@ func (G2DB g2db) fromFloat64(val float64, param parameter, conn *DmConnection) ( } return d.encodeDecimal() case CHAR, VARCHAR2, VARCHAR, CLOB: - return Dm_build_1331.Dm_build_1547(strconv.FormatFloat(val, 'f', -1, 64), conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(strconv.FormatFloat(val, 'f', -1, 64), conn.getServerEncoding(), conn), nil } return nil, ECGO_DATA_CONVERTION_ERROR.throw() } @@ -358,20 +358,20 @@ func (G2DB g2db) toVarchar(bsArr []byte) ([]byte, error) { } func (G2DB g2db) toChar(bt byte) ([]byte, error) { - bts := make([]byte, 2) + b := make([]byte, 2) var err error - bts[0], err = G2DB.getCharByNumVal((bt >> 4) & 0x0F) + b[0], err = G2DB.getCharByNumVal((bt >> 4) & 0x0F) if err != nil { return nil, err } - bts[1], err = G2DB.getCharByNumVal(bt & 0x0F) + b[1], err = G2DB.getCharByNumVal(bt & 0x0F) if err != nil { return nil, err } - return bts, nil + return b, nil } func (G2DB g2db) getCharByNumVal(val byte) (byte, error) { @@ -379,7 +379,7 @@ func (G2DB g2db) getCharByNumVal(val byte) (byte, error) { return val + '0', nil } - if val >= 0x0a && val <= 0x0F { + if val <= 0x0F { return val + 'A' - 0x0a, nil } return 0, ECGO_INVALID_HEX.throw() @@ -394,9 +394,9 @@ func (G2DB g2db) fromString(val string, param parameter, conn *DmConnection) (in } if ret { - return Dm_build_1331.Dm_build_1509(byte(1)), nil + return Dm_build_1.Dm_build_179(byte(1)), nil } else { - return Dm_build_1331.Dm_build_1509(byte(0)), nil + return Dm_build_1.Dm_build_179(byte(0)), nil } case TINYINT, SMALLINT, INT, BIGINT: @@ -423,7 +423,7 @@ func (G2DB g2db) fromString(val string, param parameter, conn *DmConnection) (in if param.mask == MASK_BFILE && !isValidBFileStr(val) { return nil, ECGO_INVALID_BFILE_STR.throw() } - return Dm_build_1331.Dm_build_1547(val, conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(val, conn.getServerEncoding(), conn), nil case CLOB: return G2DB.string2Clob(val, param, conn) case BINARY, VARBINARY: @@ -518,9 +518,9 @@ func (G2DB g2db) fromBigInt(val *big.Int, param parameter, conn *DmConnection) ( switch param.colType { case BOOLEAN, BIT: if val.Sign() == 0 { - ret = Dm_build_1331.Dm_build_1509(0) + ret = Dm_build_1.Dm_build_179(0) } else { - ret = Dm_build_1331.Dm_build_1509(1) + ret = Dm_build_1.Dm_build_179(1) } case TINYINT: err := G2DB.checkTinyint(float64(val.Int64())) @@ -529,7 +529,7 @@ func (G2DB g2db) fromBigInt(val *big.Int, param parameter, conn *DmConnection) ( return nil, err } - ret = Dm_build_1331.Dm_build_1509(byte(val.Int64())) + ret = Dm_build_1.Dm_build_179(byte(val.Int64())) case SMALLINT: err := G2DB.checkSmallint(float64(val.Int64())) @@ -537,7 +537,7 @@ func (G2DB g2db) fromBigInt(val *big.Int, param parameter, conn *DmConnection) ( return nil, err } - ret = Dm_build_1331.Dm_build_1515(int16(val.Int64())) + ret = Dm_build_1.Dm_build_185(int16(val.Int64())) case INT: err := G2DB.checkInt(float64(val.Int64())) @@ -545,7 +545,7 @@ func (G2DB g2db) fromBigInt(val *big.Int, param parameter, conn *DmConnection) ( return nil, err } - ret = Dm_build_1331.Dm_build_1518(int32(val.Int64())) + ret = Dm_build_1.Dm_build_188(int32(val.Int64())) case BIGINT: err := G2DB.checkBigint(float64(val.Int64())) @@ -553,7 +553,7 @@ func (G2DB g2db) fromBigInt(val *big.Int, param parameter, conn *DmConnection) ( return nil, err } - ret = Dm_build_1331.Dm_build_1521(val.Int64()) + ret = Dm_build_1.Dm_build_191(val.Int64()) case REAL: err := G2DB.checkReal(float64(val.Int64())) @@ -561,9 +561,9 @@ func (G2DB g2db) fromBigInt(val *big.Int, param parameter, conn *DmConnection) ( return nil, err } - ret = Dm_build_1331.Dm_build_1524(float32(val.Int64())) + ret = Dm_build_1.Dm_build_194(float32(val.Int64())) case DOUBLE: - ret = Dm_build_1331.Dm_build_1527(float64(val.Int64())) + ret = Dm_build_1.Dm_build_197(float64(val.Int64())) case DECIMAL, BINARY, VARBINARY, BLOB: d, err := newDecimal(val, int(param.prec), int(param.scale)) if err != nil { @@ -574,7 +574,7 @@ func (G2DB g2db) fromBigInt(val *big.Int, param parameter, conn *DmConnection) ( return nil, err } case CHAR, VARCHAR2, VARCHAR, CLOB: - ret = Dm_build_1331.Dm_build_1547(val.String(), conn.getServerEncoding(), conn) + ret = Dm_build_1.Dm_build_217(val.String(), conn.getServerEncoding(), conn) default: return nil, ECGO_DATA_CONVERTION_ERROR.throw() } @@ -586,9 +586,9 @@ func (G2DB g2db) fromBigFloat(val *big.Float, param parameter, conn *DmConnectio switch param.colType { case BOOLEAN, BIT: if val.Sign() == 0 { - ret = Dm_build_1331.Dm_build_1509(0) + ret = Dm_build_1.Dm_build_179(0) } else { - ret = Dm_build_1331.Dm_build_1509(1) + ret = Dm_build_1.Dm_build_179(1) } case TINYINT: f, _ := val.Float64() @@ -599,7 +599,7 @@ func (G2DB g2db) fromBigFloat(val *big.Float, param parameter, conn *DmConnectio return nil, err } - ret = Dm_build_1331.Dm_build_1509(byte(f)) + ret = Dm_build_1.Dm_build_179(byte(f)) case SMALLINT: f, _ := val.Float64() @@ -609,7 +609,7 @@ func (G2DB g2db) fromBigFloat(val *big.Float, param parameter, conn *DmConnectio return nil, err } - ret = Dm_build_1331.Dm_build_1515(int16(f)) + ret = Dm_build_1.Dm_build_185(int16(f)) case INT: f, _ := val.Float64() @@ -619,7 +619,7 @@ func (G2DB g2db) fromBigFloat(val *big.Float, param parameter, conn *DmConnectio return nil, err } - ret = Dm_build_1331.Dm_build_1518(int32(f)) + ret = Dm_build_1.Dm_build_188(int32(f)) case BIGINT: f, _ := val.Float64() @@ -629,7 +629,7 @@ func (G2DB g2db) fromBigFloat(val *big.Float, param parameter, conn *DmConnectio return nil, err } - ret = Dm_build_1331.Dm_build_1521(int64(f)) + ret = Dm_build_1.Dm_build_191(int64(f)) case REAL: f, _ := val.Float64() @@ -639,10 +639,10 @@ func (G2DB g2db) fromBigFloat(val *big.Float, param parameter, conn *DmConnectio return nil, err } - ret = Dm_build_1331.Dm_build_1524(float32(f)) + ret = Dm_build_1.Dm_build_194(float32(f)) case DOUBLE: f, _ := val.Float64() - ret = Dm_build_1331.Dm_build_1527(f) + ret = Dm_build_1.Dm_build_197(f) case DECIMAL: d, err := newDecimal(val, int(param.prec), int(param.scale)) if err != nil { @@ -653,7 +653,7 @@ func (G2DB g2db) fromBigFloat(val *big.Float, param parameter, conn *DmConnectio return nil, err } case CHAR, VARCHAR2, VARCHAR, CLOB: - ret = Dm_build_1331.Dm_build_1547(val.Text('f', int(param.scale)), conn.getServerEncoding(), conn) + ret = Dm_build_1.Dm_build_217(val.Text('f', int(param.scale)), conn.getServerEncoding(), conn) default: return nil, ECGO_DATA_CONVERTION_ERROR.throw() } @@ -665,39 +665,39 @@ func (G2DB g2db) fromDecimal(val DmDecimal, param parameter, conn *DmConnection) switch param.colType { case BOOLEAN, BIT: if val.Sign() == 0 { - ret = Dm_build_1331.Dm_build_1509(0) + ret = Dm_build_1.Dm_build_179(0) } else { - ret = Dm_build_1331.Dm_build_1509(1) + ret = Dm_build_1.Dm_build_179(1) } case TINYINT: if err := G2DB.checkTinyint(val); err != nil { return nil, err } - ret = Dm_build_1331.Dm_build_1509(byte(val.ToBigInt().Int64())) + ret = Dm_build_1.Dm_build_179(byte(val.ToBigInt().Int64())) case SMALLINT: if err := G2DB.checkSmallint(val); err != nil { return nil, err } - ret = Dm_build_1331.Dm_build_1515(int16(val.ToBigInt().Int64())) + ret = Dm_build_1.Dm_build_185(int16(val.ToBigInt().Int64())) case INT: if err := G2DB.checkInt(val); err != nil { return nil, err } - ret = Dm_build_1331.Dm_build_1518(int32(val.ToBigInt().Int64())) + ret = Dm_build_1.Dm_build_188(int32(val.ToBigInt().Int64())) case BIGINT: if err := G2DB.checkBigint(val); err != nil { return nil, err } - ret = Dm_build_1331.Dm_build_1521(val.ToBigInt().Int64()) + ret = Dm_build_1.Dm_build_191(val.ToBigInt().Int64()) case REAL: if err := G2DB.checkReal(val); err != nil { return nil, err } f, _ := val.ToBigFloat().Float32() - ret = Dm_build_1331.Dm_build_1524(f) + ret = Dm_build_1.Dm_build_194(f) case DOUBLE: f, _ := val.ToBigFloat().Float64() - ret = Dm_build_1331.Dm_build_1527(f) + ret = Dm_build_1.Dm_build_197(f) case DECIMAL: var err error ret, err = val.encodeDecimal() @@ -705,7 +705,7 @@ func (G2DB g2db) fromDecimal(val DmDecimal, param parameter, conn *DmConnection) return nil, err } case CHAR, VARCHAR2, VARCHAR, CLOB: - ret = Dm_build_1331.Dm_build_1547(val.ToBigFloat().Text('f', -1), conn.getServerEncoding(), conn) + ret = Dm_build_1.Dm_build_217(val.ToBigFloat().Text('f', -1), conn.getServerEncoding(), conn) default: return nil, ECGO_DATA_CONVERTION_ERROR.throw() } @@ -718,7 +718,7 @@ func (G2DB g2db) fromTime(val time.Time, param parameter, conn *DmConnection) ([ case DATE, DATETIME, DATETIME_TZ, TIME, TIME_TZ, DATETIME2, DATETIME2_TZ: return encodeByTime(val, param.column, *conn) case CHAR, VARCHAR2, VARCHAR, CLOB: - return Dm_build_1331.Dm_build_1547(val.Format("2006-01-02 15:04:05.999999999 -07:00"), conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(val.Format("2006-01-02 15:04:05.999999999 -07:00"), conn.getServerEncoding(), conn), nil } return nil, ECGO_DATA_CONVERTION_ERROR.throw() @@ -727,7 +727,7 @@ func (G2DB g2db) fromTime(val time.Time, param parameter, conn *DmConnection) ([ func (G2DB g2db) fromDmIntervalDT(val DmIntervalDT, param parameter, conn *DmConnection) ([]byte, error) { switch param.colType { case CHAR, VARCHAR2, VARCHAR, CLOB: - return Dm_build_1331.Dm_build_1547(val.String(), conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(val.String(), conn.getServerEncoding(), conn), nil case INTERVAL_DT: return val.encode(int(param.scale)) default: @@ -739,7 +739,7 @@ func (G2DB g2db) fromDmdbIntervalYM(val DmIntervalYM, param parameter, conn *DmC switch param.colType { case CHAR, VARCHAR, VARCHAR2, CLOB: - return Dm_build_1331.Dm_build_1547(val.String(), conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(val.String(), conn.getServerEncoding(), conn), nil case INTERVAL_YM: return val.encode(int(param.scale)) default: @@ -809,7 +809,7 @@ func (G2DB g2db) fromReader(val io.Reader, param parameter, conn *DmConnection) if _, err := bytesBuf.ReadFrom(val); err != nil { return nil, err } - return Dm_build_1331.Dm_build_1547(string(bytesBuf.Bytes()), conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(string(bytesBuf.Bytes()), conn.getServerEncoding(), conn), nil case BINARY, VARBINARY: var bytesBuf = new(bytes.Buffer) if _, err := bytesBuf.ReadFrom(val); err != nil { @@ -830,7 +830,7 @@ func (G2DB g2db) fromReader(val io.Reader, param parameter, conn *DmConnection) } func (G2DB g2db) string2Clob(val string, param parameter, conn *DmConnection) (interface{}, error) { - return G2DB.changeOffRowData(param, Dm_build_1331.Dm_build_1547(val, conn.getServerEncoding(), conn), conn.getServerEncoding()) + return G2DB.changeOffRowData(param, Dm_build_1.Dm_build_217(val, conn.getServerEncoding(), conn), conn.getServerEncoding()) } func (G2DB g2db) bytes2Blob(val []byte, param parameter, conn *DmConnection) (interface{}, error) { @@ -854,7 +854,7 @@ func (G2DB g2db) clob2Clob(val DmClob, param parameter, conn *DmConnection) (int if str, err = val.getSubString(1, int32(length)); err != nil { return nil, err } - return Dm_build_1331.Dm_build_1547(str, conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(str, conn.getServerEncoding(), conn), nil } } @@ -884,7 +884,7 @@ func (G2DB g2db) changeOffRowData(paramDesc parameter, paramData []byte, encodin } func (G2DB g2db) isOffRow(dtype int32, length int64) bool { - return (dtype == BLOB || dtype == CLOB) && length > Dm_build_806 + return (dtype == BLOB || dtype == CLOB) && length > Dm_build_1091 } func (G2DB g2db) fromObject(mem interface{}, param parameter, conn *DmConnection) ([]byte, error) { @@ -928,7 +928,7 @@ func (G2DB g2db) fromObject(mem interface{}, param parameter, conn *DmConnection if err != nil { return nil, err } - return Dm_build_1331.Dm_build_1547(str, conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_217(str, conn.getServerEncoding(), conn), nil default: return nil, ECGO_UNSUPPORTED_TYPE.throw() } @@ -937,25 +937,25 @@ func (G2DB g2db) fromObject(mem interface{}, param parameter, conn *DmConnection func (G2DB g2db) toInt32(val int32) []byte { b := make([]byte, 4) - Dm_build_1331.Dm_build_1347(b, 0, val) + Dm_build_1.Dm_build_17(b, 0, val) return b } func (G2DB g2db) toInt64(val int64) []byte { b := make([]byte, 8) - Dm_build_1331.Dm_build_1352(b, 0, val) + Dm_build_1.Dm_build_22(b, 0, val) return b } func (G2DB g2db) toFloat32(val float32) []byte { b := make([]byte, 4) - Dm_build_1331.Dm_build_1357(b, 0, val) + Dm_build_1.Dm_build_27(b, 0, val) return b } func (G2DB g2db) toFloat64(val float64) []byte { b := make([]byte, 8) - Dm_build_1331.Dm_build_1362(b, 0, val) + Dm_build_1.Dm_build_32(b, 0, val) return b } @@ -1011,7 +1011,7 @@ func isValidBFileStr(s string) bool { if len(strs) != 2 { return false } - if len(strs[0]) > Dm_build_734 || len(strs[1]) > Dm_build_735 { + if len(strs[0]) > Dm_build_1019 || len(strs[1]) > Dm_build_1020 { return false } return true diff --git a/dm8/zn.go b/dm8/zn.go index 3c41182..76e484a 100644 --- a/dm8/zn.go +++ b/dm8/zn.go @@ -76,7 +76,7 @@ func (lob *lob) GetLength() (int64, error) { } if lob.length == -1 { - if lob.length, err = lob.connection.Access.dm_build_574(lob); err != nil { + if lob.length, err = lob.connection.Access.dm_build_859(lob); err != nil { return -1, err } } @@ -91,7 +91,7 @@ func (lob *lob) resetCurrentInfo() { } func (lob *lob) getLengthFromHead(head []byte) int64 { - return int64(Dm_build_1331.Dm_build_1433(head, NBLOB_HEAD_BLOB_LEN)) + return int64(Dm_build_1.Dm_build_103(head, NBLOB_HEAD_BLOB_LEN)) } func (lob *lob) canOptimized(connection *DmConnection) bool { @@ -104,21 +104,21 @@ func (lob *lob) buildCtlData() (bytes []byte) { } else { bytes = make([]byte, NBLOB_OUTROW_HEAD_SIZE) } - Dm_build_1331.Dm_build_1332(bytes, NBLOB_HEAD_IN_ROW_FLAG, LOB_OFF_ROW) - Dm_build_1331.Dm_build_1352(bytes, NBLOB_HEAD_BLOBID, lob.blobId) - Dm_build_1331.Dm_build_1347(bytes, NBLOB_HEAD_BLOB_LEN, -1) + Dm_build_1.Dm_build_2(bytes, NBLOB_HEAD_IN_ROW_FLAG, LOB_OFF_ROW) + Dm_build_1.Dm_build_22(bytes, NBLOB_HEAD_BLOBID, lob.blobId) + Dm_build_1.Dm_build_17(bytes, NBLOB_HEAD_BLOB_LEN, -1) - Dm_build_1331.Dm_build_1342(bytes, NBLOB_HEAD_OUTROW_GROUPID, lob.groupId) - Dm_build_1331.Dm_build_1342(bytes, NBLOB_HEAD_OUTROW_FILEID, lob.fileId) - Dm_build_1331.Dm_build_1347(bytes, NBLOB_HEAD_OUTROW_PAGENO, lob.pageNo) + Dm_build_1.Dm_build_12(bytes, NBLOB_HEAD_OUTROW_GROUPID, lob.groupId) + Dm_build_1.Dm_build_12(bytes, NBLOB_HEAD_OUTROW_FILEID, lob.fileId) + Dm_build_1.Dm_build_17(bytes, NBLOB_HEAD_OUTROW_PAGENO, lob.pageNo) if lob.connection.NewLobFlag { - Dm_build_1331.Dm_build_1347(bytes, NBLOB_EX_HEAD_TABLE_ID, lob.tabId) - Dm_build_1331.Dm_build_1342(bytes, NBLOB_EX_HEAD_COL_ID, lob.colId) - Dm_build_1331.Dm_build_1352(bytes, NBLOB_EX_HEAD_ROW_ID, lob.rowId) - Dm_build_1331.Dm_build_1342(bytes, NBLOB_EX_HEAD_FPA_GRPID, lob.exGroupId) - Dm_build_1331.Dm_build_1342(bytes, NBLOB_EX_HEAD_FPA_FILEID, lob.exFileId) - Dm_build_1331.Dm_build_1347(bytes, NBLOB_EX_HEAD_FPA_PAGENO, lob.exPageNo) + Dm_build_1.Dm_build_17(bytes, NBLOB_EX_HEAD_TABLE_ID, lob.tabId) + Dm_build_1.Dm_build_12(bytes, NBLOB_EX_HEAD_COL_ID, lob.colId) + Dm_build_1.Dm_build_22(bytes, NBLOB_EX_HEAD_ROW_ID, lob.rowId) + Dm_build_1.Dm_build_12(bytes, NBLOB_EX_HEAD_FPA_GRPID, lob.exGroupId) + Dm_build_1.Dm_build_12(bytes, NBLOB_EX_HEAD_FPA_FILEID, lob.exFileId) + Dm_build_1.Dm_build_17(bytes, NBLOB_EX_HEAD_FPA_PAGENO, lob.exPageNo) } return } diff --git a/dm8/zp.go b/dm8/zp.go index db6efd4..6775aa8 100644 --- a/dm8/zp.go +++ b/dm8/zp.go @@ -31,7 +31,7 @@ type logWriter struct { flushFreq int filePath string filePrefix string - buffer *Dm_build_0 + buffer *Dm_build_282 } func (lw *logWriter) doRun() { @@ -51,12 +51,12 @@ func (lw *logWriter) doRun() { lw.doFlush(lw.buffer) i = 0 } else { - lw.buffer.Dm_build_26(ibytes, 0, len(ibytes)) + lw.buffer.Dm_build_308(ibytes, 0, len(ibytes)) i++ } } case <-time.After(time.Duration(LogFlushFreq) * time.Millisecond): - if LogLevel != LOG_OFF && lw.buffer.Dm_build_5() > 0 { + if LogLevel != LOG_OFF && lw.buffer.Dm_build_287() > 0 { lw.doFlush(lw.buffer) i = 0 } @@ -66,13 +66,13 @@ func (lw *logWriter) doRun() { } } -func (lw *logWriter) doFlush(buffer *Dm_build_0) { +func (lw *logWriter) doFlush(buffer *Dm_build_282) { if lw.needCreateNewFile() { lw.closeCurrentFile() lw.logFile = lw.createNewFile() } if lw.logFile != nil { - buffer.Dm_build_20(lw.logFile, buffer.Dm_build_5()) + buffer.Dm_build_302(lw.logFile, buffer.Dm_build_287()) } } func (lw *logWriter) closeCurrentFile() { @@ -109,12 +109,12 @@ func (lw *logWriter) beforeExit() { close(lw.flushQueue) var ibytes []byte for ibytes = <-lw.flushQueue; ibytes != nil; ibytes = <-lw.flushQueue { - lw.buffer.Dm_build_26(ibytes, 0, len(ibytes)) - if lw.buffer.Dm_build_5() >= LogBufferSize { + lw.buffer.Dm_build_308(ibytes, 0, len(ibytes)) + if lw.buffer.Dm_build_287() >= LogBufferSize { lw.doFlush(lw.buffer) } } - if lw.buffer.Dm_build_5() > 0 { + if lw.buffer.Dm_build_287() > 0 { lw.doFlush(lw.buffer) } } diff --git a/dm8/zq.go b/dm8/zq.go index 2e06fd5..2b0f08d 100644 --- a/dm8/zq.go +++ b/dm8/zq.go @@ -16,279 +16,279 @@ import ( ) const ( - Dm_build_682 = "7.6.0.0" + Dm_build_967 = "7.6.0.0" - Dm_build_683 = "7.0.0.9" + Dm_build_968 = "7.0.0.9" - Dm_build_684 = "8.0.0.73" + Dm_build_969 = "8.0.0.73" - Dm_build_685 = "7.1.2.128" + Dm_build_970 = "7.1.2.128" - Dm_build_686 = "7.1.5.144" + Dm_build_971 = "7.1.5.144" - Dm_build_687 = "7.1.6.123" + Dm_build_972 = "7.1.6.123" - Dm_build_688 = 1 + Dm_build_973 = 1 - Dm_build_689 = 2 + Dm_build_974 = 2 - Dm_build_690 = 3 + Dm_build_975 = 3 - Dm_build_691 = 4 + Dm_build_976 = 4 - Dm_build_692 = 5 + Dm_build_977 = 5 - Dm_build_693 = 6 + Dm_build_978 = 6 - Dm_build_694 = 8 + Dm_build_979 = 8 - Dm_build_695 = Dm_build_694 + Dm_build_980 = Dm_build_979 - Dm_build_696 = 32768 - 128 + Dm_build_981 = 32768 - 128 - Dm_build_697 = 0x20000000 + Dm_build_982 = 0x20000000 - Dm_build_698 int16 = 1 + Dm_build_983 int16 = 1 - Dm_build_699 int16 = 2 + Dm_build_984 int16 = 2 - Dm_build_700 int16 = 3 + Dm_build_985 int16 = 3 - Dm_build_701 int16 = 4 + Dm_build_986 int16 = 4 - Dm_build_702 int16 = 5 + Dm_build_987 int16 = 5 - Dm_build_703 int16 = 6 + Dm_build_988 int16 = 6 - Dm_build_704 int16 = 7 + Dm_build_989 int16 = 7 - Dm_build_705 int16 = 8 + Dm_build_990 int16 = 8 - Dm_build_706 int16 = 9 + Dm_build_991 int16 = 9 - Dm_build_707 int16 = 13 + Dm_build_992 int16 = 13 - Dm_build_708 int16 = 14 + Dm_build_993 int16 = 14 - Dm_build_709 int16 = 15 + Dm_build_994 int16 = 15 - Dm_build_710 int16 = 17 + Dm_build_995 int16 = 17 - Dm_build_711 int16 = 21 + Dm_build_996 int16 = 21 - Dm_build_712 int16 = 24 + Dm_build_997 int16 = 24 - Dm_build_713 int16 = 27 + Dm_build_998 int16 = 27 - Dm_build_714 int16 = 29 + Dm_build_999 int16 = 29 - Dm_build_715 int16 = 30 + Dm_build_1000 int16 = 30 - Dm_build_716 int16 = 31 + Dm_build_1001 int16 = 31 - Dm_build_717 int16 = 32 + Dm_build_1002 int16 = 32 - Dm_build_718 int16 = 44 + Dm_build_1003 int16 = 44 - Dm_build_719 int16 = 52 + Dm_build_1004 int16 = 52 - Dm_build_720 int16 = 60 + Dm_build_1005 int16 = 60 - Dm_build_721 int16 = 71 + Dm_build_1006 int16 = 71 - Dm_build_722 int16 = 90 + Dm_build_1007 int16 = 90 - Dm_build_723 int16 = 91 + Dm_build_1008 int16 = 91 - Dm_build_724 int16 = 200 + Dm_build_1009 int16 = 200 - Dm_build_725 = 64 + Dm_build_1010 = 64 - Dm_build_726 = 20 + Dm_build_1011 = 20 - Dm_build_727 = 0 + Dm_build_1012 = 0 - Dm_build_728 = 4 + Dm_build_1013 = 4 - Dm_build_729 = 6 + Dm_build_1014 = 6 - Dm_build_730 = 10 + Dm_build_1015 = 10 - Dm_build_731 = 14 + Dm_build_1016 = 14 - Dm_build_732 = 18 + Dm_build_1017 = 18 - Dm_build_733 = 19 + Dm_build_1018 = 19 - Dm_build_734 = 128 + Dm_build_1019 = 128 - Dm_build_735 = 256 + Dm_build_1020 = 256 - Dm_build_736 int32 = 2 + Dm_build_1021 int32 = 2 - Dm_build_737 int32 = 5 + Dm_build_1022 int32 = 5 - Dm_build_738 = -1 + Dm_build_1023 = -1 - Dm_build_739 int32 = 0xFF00 + Dm_build_1024 int32 = 0xFF00 - Dm_build_740 int32 = 0xFFFE - 3 + Dm_build_1025 int32 = 0xFFFE - 3 - Dm_build_741 int32 = 0xFFFE - 4 + Dm_build_1026 int32 = 0xFFFE - 4 - Dm_build_742 int32 = 0xFFFE + Dm_build_1027 int32 = 0xFFFE - Dm_build_743 int32 = 0xFFFF + Dm_build_1028 int32 = 0xFFFF - Dm_build_744 int32 = 0x80 + Dm_build_1029 int32 = 0x80 - Dm_build_745 byte = 0x60 + Dm_build_1030 byte = 0x60 - Dm_build_746 = uint16(Dm_build_742) + Dm_build_1031 = uint16(Dm_build_1027) - Dm_build_747 = uint16(Dm_build_743) + Dm_build_1032 = uint16(Dm_build_1028) - Dm_build_748 int16 = 0x00 + Dm_build_1033 int16 = 0x00 - Dm_build_749 int16 = 0x03 + Dm_build_1034 int16 = 0x03 - Dm_build_750 int32 = 0x80 + Dm_build_1035 int32 = 0x80 - Dm_build_751 byte = 0 + Dm_build_1036 byte = 0 - Dm_build_752 byte = 1 + Dm_build_1037 byte = 1 - Dm_build_753 byte = 2 + Dm_build_1038 byte = 2 - Dm_build_754 byte = 3 + Dm_build_1039 byte = 3 - Dm_build_755 byte = 4 + Dm_build_1040 byte = 4 - Dm_build_756 = Dm_build_751 + Dm_build_1041 = Dm_build_1036 - Dm_build_757 int = 10 + Dm_build_1042 int = 10 - Dm_build_758 int32 = 32 + Dm_build_1043 int32 = 32 - Dm_build_759 int32 = 65536 + Dm_build_1044 int32 = 65536 - Dm_build_760 byte = 0 + Dm_build_1045 byte = 0 - Dm_build_761 byte = 1 + Dm_build_1046 byte = 1 - Dm_build_762 int32 = 0x00000000 + Dm_build_1047 int32 = 0x00000000 - Dm_build_763 int32 = 0x00000020 + Dm_build_1048 int32 = 0x00000020 - Dm_build_764 int32 = 0x00000040 + Dm_build_1049 int32 = 0x00000040 - Dm_build_765 int32 = 0x00000FFF + Dm_build_1050 int32 = 0x00000FFF - Dm_build_766 int32 = 0 + Dm_build_1051 int32 = 0 - Dm_build_767 int32 = 1 + Dm_build_1052 int32 = 1 - Dm_build_768 int32 = 2 + Dm_build_1053 int32 = 2 - Dm_build_769 int32 = 3 + Dm_build_1054 int32 = 3 - Dm_build_770 = 8192 + Dm_build_1055 = 8192 - Dm_build_771 = 1 + Dm_build_1056 = 1 - Dm_build_772 = 2 + Dm_build_1057 = 2 - Dm_build_773 = 0 + Dm_build_1058 = 0 - Dm_build_774 = 0 + Dm_build_1059 = 0 - Dm_build_775 = 1 + Dm_build_1060 = 1 - Dm_build_776 = -1 + Dm_build_1061 = -1 - Dm_build_777 int16 = 0 + Dm_build_1062 int16 = 0 - Dm_build_778 int16 = 1 + Dm_build_1063 int16 = 1 - Dm_build_779 int16 = 2 + Dm_build_1064 int16 = 2 - Dm_build_780 int16 = 3 + Dm_build_1065 int16 = 3 - Dm_build_781 int16 = 4 + Dm_build_1066 int16 = 4 - Dm_build_782 int16 = 127 + Dm_build_1067 int16 = 127 - Dm_build_783 = Dm_build_782 + 20 + Dm_build_1068 = Dm_build_1067 + 20 - Dm_build_784 = Dm_build_782 + 21 + Dm_build_1069 = Dm_build_1067 + 21 - Dm_build_785 = Dm_build_782 + 22 + Dm_build_1070 = Dm_build_1067 + 22 - Dm_build_786 = Dm_build_782 + 24 + Dm_build_1071 = Dm_build_1067 + 24 - Dm_build_787 = Dm_build_782 + 25 + Dm_build_1072 = Dm_build_1067 + 25 - Dm_build_788 = Dm_build_782 + 26 + Dm_build_1073 = Dm_build_1067 + 26 - Dm_build_789 = Dm_build_782 + 30 + Dm_build_1074 = Dm_build_1067 + 30 - Dm_build_790 = Dm_build_782 + 31 + Dm_build_1075 = Dm_build_1067 + 31 - Dm_build_791 = Dm_build_782 + 32 + Dm_build_1076 = Dm_build_1067 + 32 - Dm_build_792 = Dm_build_782 + 33 + Dm_build_1077 = Dm_build_1067 + 33 - Dm_build_793 = Dm_build_782 + 35 + Dm_build_1078 = Dm_build_1067 + 35 - Dm_build_794 = Dm_build_782 + 38 + Dm_build_1079 = Dm_build_1067 + 38 - Dm_build_795 = Dm_build_782 + 39 + Dm_build_1080 = Dm_build_1067 + 39 - Dm_build_796 = Dm_build_782 + 51 + Dm_build_1081 = Dm_build_1067 + 51 - Dm_build_797 = Dm_build_782 + 71 + Dm_build_1082 = Dm_build_1067 + 71 - Dm_build_798 = Dm_build_782 + 124 + Dm_build_1083 = Dm_build_1067 + 124 - Dm_build_799 = Dm_build_782 + 125 + Dm_build_1084 = Dm_build_1067 + 125 - Dm_build_800 = Dm_build_782 + 126 + Dm_build_1085 = Dm_build_1067 + 126 - Dm_build_801 = Dm_build_782 + 127 + Dm_build_1086 = Dm_build_1067 + 127 - Dm_build_802 = Dm_build_782 + 128 + Dm_build_1087 = Dm_build_1067 + 128 - Dm_build_803 = Dm_build_782 + 129 + Dm_build_1088 = Dm_build_1067 + 129 - Dm_build_804 byte = 0 + Dm_build_1089 byte = 0 - Dm_build_805 byte = 2 + Dm_build_1090 byte = 2 - Dm_build_806 = 2048 + Dm_build_1091 = 2048 - Dm_build_807 = -1 + Dm_build_1092 = -1 - Dm_build_808 = 0 + Dm_build_1093 = 0 - Dm_build_809 = 16000 + Dm_build_1094 = 16000 - Dm_build_810 = 32000 + Dm_build_1095 = 32000 - Dm_build_811 = 0x00000000 + Dm_build_1096 = 0x00000000 - Dm_build_812 = 0x00000020 + Dm_build_1097 = 0x00000020 - Dm_build_813 = 0x00000040 + Dm_build_1098 = 0x00000040 - Dm_build_814 = 0x00000FFF + Dm_build_1099 = 0x00000FFF - Dm_build_815 = 4 + Dm_build_1100 = 4 ) // fix: failed to build for windows_386: 0xffffffff (untyped int constant 4294967295) overflows int var maxValue uint32 = 0xffffffff -var Dm_build_816 = [8][256]uint32{ +var Dm_build_1101 = [8][256]uint32{ {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, @@ -642,168 +642,172 @@ var Dm_build_816 = [8][256]uint32{ 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, 0x264b06e6}} -type dm_build_817 interface { - dm_build_818() - dm_build_819() error - dm_build_820() - dm_build_821(imsg dm_build_817) error - dm_build_822() error - dm_build_823() (interface{}, error) - dm_build_824() - dm_build_825(imsg dm_build_817) (interface{}, error) - dm_build_826() - dm_build_827() error - dm_build_828() byte - dm_build_829(buffer *Dm_build_78, startOff int32, endOff int32) uint32 - dm_build_830() int32 - dm_build_831(length int32) - dm_build_832() int16 +type dm_build_1102 interface { + dm_build_1103() + dm_build_1104() error + dm_build_1105() + dm_build_1106(imsg dm_build_1102) error + dm_build_1107() error + dm_build_1108() (interface{}, error) + dm_build_1109() + dm_build_1110(imsg dm_build_1102) (interface{}, error) + dm_build_1111() + dm_build_1112() error + dm_build_1113() byte + dm_build_1114(buffer *Dm_build_360, startOff int32, endOff int32) uint32 + dm_build_1115() int32 + dm_build_1116(length int32) + dm_build_1117() int16 } -type dm_build_833 struct { - dm_build_834 *dm_build_414 +type dm_build_1118 struct { + dm_build_1119 *dm_build_696 - dm_build_835 int16 + dm_build_1120 int16 - dm_build_836 int32 + dm_build_1121 int32 - dm_build_837 *DmStatement + dm_build_1122 *DmStatement } -func (dm_build_839 *dm_build_833) dm_build_838(dm_build_840 *dm_build_414, dm_build_841 int16) *dm_build_833 { - dm_build_839.dm_build_834 = dm_build_840 - dm_build_839.dm_build_835 = dm_build_841 - return dm_build_839 +func (dm_build_1124 *dm_build_1118) dm_build_1123(dm_build_1125 *dm_build_696, dm_build_1126 int16) *dm_build_1118 { + dm_build_1124.dm_build_1119 = dm_build_1125 + dm_build_1124.dm_build_1120 = dm_build_1126 + return dm_build_1124 } -func (dm_build_843 *dm_build_833) dm_build_842(dm_build_844 *dm_build_414, dm_build_845 int16, dm_build_846 *DmStatement) *dm_build_833 { - dm_build_843.dm_build_838(dm_build_844, dm_build_845).dm_build_837 = dm_build_846 - return dm_build_843 +func (dm_build_1128 *dm_build_1118) dm_build_1127(dm_build_1129 *dm_build_696, dm_build_1130 int16, dm_build_1131 *DmStatement) *dm_build_1118 { + dm_build_1128.dm_build_1123(dm_build_1129, dm_build_1130).dm_build_1122 = dm_build_1131 + return dm_build_1128 } -func dm_build_847(dm_build_848 *dm_build_414, dm_build_849 int16) *dm_build_833 { - return new(dm_build_833).dm_build_838(dm_build_848, dm_build_849) +func dm_build_1132(dm_build_1133 *dm_build_696, dm_build_1134 int16) *dm_build_1118 { + return new(dm_build_1118).dm_build_1123(dm_build_1133, dm_build_1134) } -func dm_build_850(dm_build_851 *dm_build_414, dm_build_852 int16, dm_build_853 *DmStatement) *dm_build_833 { - return new(dm_build_833).dm_build_842(dm_build_851, dm_build_852, dm_build_853) +func dm_build_1135(dm_build_1136 *dm_build_696, dm_build_1137 int16, dm_build_1138 *DmStatement) *dm_build_1118 { + return new(dm_build_1118).dm_build_1127(dm_build_1136, dm_build_1137, dm_build_1138) } -func (dm_build_855 *dm_build_833) dm_build_818() { - dm_build_855.dm_build_834.dm_build_417.Dm_build_92(0) - dm_build_855.dm_build_834.dm_build_417.Dm_build_103(Dm_build_725, true, true) +func (dm_build_1140 *dm_build_1118) dm_build_1103() { + dm_build_1140.dm_build_1119.dm_build_699.Dm_build_374(0) + dm_build_1140.dm_build_1119.dm_build_699.Dm_build_385(Dm_build_1010, true, true) } -func (dm_build_857 *dm_build_833) dm_build_819() error { +func (dm_build_1142 *dm_build_1118) dm_build_1104() error { return nil } -func (dm_build_859 *dm_build_833) dm_build_820() { - if dm_build_859.dm_build_837 == nil { - dm_build_859.dm_build_834.dm_build_417.Dm_build_273(Dm_build_727, 0) +func (dm_build_1144 *dm_build_1118) dm_build_1105() { + if dm_build_1144.dm_build_1122 == nil { + dm_build_1144.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1012, 0) } else { - dm_build_859.dm_build_834.dm_build_417.Dm_build_273(Dm_build_727, dm_build_859.dm_build_837.id) + dm_build_1144.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1012, dm_build_1144.dm_build_1122.id) } - dm_build_859.dm_build_834.dm_build_417.Dm_build_269(Dm_build_728, dm_build_859.dm_build_835) - dm_build_859.dm_build_834.dm_build_417.Dm_build_273(Dm_build_729, int32(dm_build_859.dm_build_834.dm_build_417.Dm_build_90()-Dm_build_725)) + dm_build_1144.dm_build_1119.dm_build_699.Dm_build_551(Dm_build_1013, dm_build_1144.dm_build_1120) + dm_build_1144.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1014, int32(dm_build_1144.dm_build_1119.dm_build_699.Dm_build_372()-Dm_build_1010)) } -func (dm_build_861 *dm_build_833) dm_build_822() error { - dm_build_861.dm_build_834.dm_build_417.Dm_build_95(0) - dm_build_861.dm_build_834.dm_build_417.Dm_build_103(Dm_build_725, false, true) - return dm_build_861.dm_build_866() +func (dm_build_1146 *dm_build_1118) dm_build_1107() error { + dm_build_1146.dm_build_1119.dm_build_699.Dm_build_377(0) + dm_build_1146.dm_build_1119.dm_build_699.Dm_build_385(Dm_build_1010, false, true) + return dm_build_1146.dm_build_1151() } -func (dm_build_863 *dm_build_833) dm_build_823() (interface{}, error) { +func (dm_build_1148 *dm_build_1118) dm_build_1108() (interface{}, error) { return nil, nil } -func (dm_build_865 *dm_build_833) dm_build_824() { +func (dm_build_1150 *dm_build_1118) dm_build_1109() { } -func (dm_build_867 *dm_build_833) dm_build_866() error { - dm_build_867.dm_build_836 = dm_build_867.dm_build_834.dm_build_417.Dm_build_351(Dm_build_730) - if dm_build_867.dm_build_836 < 0 && dm_build_867.dm_build_836 != EC_RN_EXCEED_ROWSET_SIZE.ErrCode { - return (&DmError{dm_build_867.dm_build_836, dm_build_867.dm_build_868(), nil, ""}).throw() - } else if dm_build_867.dm_build_836 > 0 { +func (dm_build_1152 *dm_build_1118) dm_build_1151() error { + dm_build_1152.dm_build_1121 = dm_build_1152.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1015) + if dm_build_1152.dm_build_1121 < 0 && dm_build_1152.dm_build_1121 != EC_RN_EXCEED_ROWSET_SIZE.ErrCode { + return (&DmError{dm_build_1152.dm_build_1121, dm_build_1152.dm_build_1153(), nil, ""}).throw() + } else if dm_build_1152.dm_build_1121 > 0 { - } else if dm_build_867.dm_build_835 == Dm_build_724 || dm_build_867.dm_build_835 == Dm_build_698 { - dm_build_867.dm_build_868() + } else if dm_build_1152.dm_build_1120 == Dm_build_1009 || dm_build_1152.dm_build_1120 == Dm_build_983 { + dm_build_1152.dm_build_1153() } return nil } -func (dm_build_869 *dm_build_833) dm_build_868() string { +func (dm_build_1154 *dm_build_1118) dm_build_1153() string { - dm_build_870 := dm_build_869.dm_build_834.dm_build_418.getServerEncoding() + dm_build_1155 := dm_build_1154.dm_build_1119.dm_build_700.getServerEncoding() - if dm_build_870 == ENCODING_EUCKR && Locale != LANGUAGE_EN { - dm_build_870 = ENCODING_GB18030 + if Locale != LANGUAGE_EN && dm_build_1155 == ENCODING_EUCKR { + dm_build_1155 = ENCODING_GB18030 } - dm_build_869.dm_build_834.dm_build_417.Dm_build_103(int(dm_build_869.dm_build_834.dm_build_417.Dm_build_207()), false, true) + if Locale == LANGUAGE_CNT_HK && dm_build_1155 != ENCODING_UTF8 { + dm_build_1155 = ENCODING_BIG5 + } + + dm_build_1154.dm_build_1119.dm_build_699.Dm_build_385(int(dm_build_1154.dm_build_1119.dm_build_699.Dm_build_489()), false, true) - dm_build_869.dm_build_834.dm_build_417.Dm_build_103(int(dm_build_869.dm_build_834.dm_build_417.Dm_build_207()), false, true) + dm_build_1154.dm_build_1119.dm_build_699.Dm_build_385(int(dm_build_1154.dm_build_1119.dm_build_699.Dm_build_489()), false, true) - dm_build_869.dm_build_834.dm_build_417.Dm_build_103(int(dm_build_869.dm_build_834.dm_build_417.Dm_build_207()), false, true) + dm_build_1154.dm_build_1119.dm_build_699.Dm_build_385(int(dm_build_1154.dm_build_1119.dm_build_699.Dm_build_489()), false, true) - return dm_build_869.dm_build_834.dm_build_417.Dm_build_249(dm_build_870, dm_build_869.dm_build_834.dm_build_418) + return dm_build_1154.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1155, dm_build_1154.dm_build_1119.dm_build_700) } -func (dm_build_872 *dm_build_833) dm_build_821(dm_build_873 dm_build_817) (dm_build_874 error) { - dm_build_873.dm_build_818() - if dm_build_874 = dm_build_873.dm_build_819(); dm_build_874 != nil { - return dm_build_874 +func (dm_build_1157 *dm_build_1118) dm_build_1106(dm_build_1158 dm_build_1102) (dm_build_1159 error) { + dm_build_1158.dm_build_1103() + if dm_build_1159 = dm_build_1158.dm_build_1104(); dm_build_1159 != nil { + return dm_build_1159 } - dm_build_873.dm_build_820() + dm_build_1158.dm_build_1105() return nil } -func (dm_build_876 *dm_build_833) dm_build_825(dm_build_877 dm_build_817) (dm_build_878 interface{}, dm_build_879 error) { - dm_build_879 = dm_build_877.dm_build_822() - if dm_build_879 != nil { - return nil, dm_build_879 +func (dm_build_1161 *dm_build_1118) dm_build_1110(dm_build_1162 dm_build_1102) (dm_build_1163 interface{}, dm_build_1164 error) { + dm_build_1164 = dm_build_1162.dm_build_1107() + if dm_build_1164 != nil { + return nil, dm_build_1164 } - dm_build_878, dm_build_879 = dm_build_877.dm_build_823() - if dm_build_879 != nil { - return nil, dm_build_879 + dm_build_1163, dm_build_1164 = dm_build_1162.dm_build_1108() + if dm_build_1164 != nil { + return nil, dm_build_1164 } - dm_build_877.dm_build_824() - return dm_build_878, nil + dm_build_1162.dm_build_1109() + return dm_build_1163, nil } -func (dm_build_881 *dm_build_833) dm_build_826() { - if dm_build_881.dm_build_834.dm_build_423 { +func (dm_build_1166 *dm_build_1118) dm_build_1111() { + if dm_build_1166.dm_build_1119.dm_build_705 { - var orgLen = dm_build_881.dm_build_830() + var orgLen = dm_build_1166.dm_build_1115() - dm_build_881.dm_build_831(orgLen + Dm_build_815) - var crc = dm_build_881.dm_build_829(dm_build_881.dm_build_834.dm_build_417, 0, Dm_build_725+orgLen) - dm_build_881.dm_build_834.dm_build_417.Dm_build_145(crc) + dm_build_1166.dm_build_1116(orgLen + Dm_build_1100) + var crc = dm_build_1166.dm_build_1114(dm_build_1166.dm_build_1119.dm_build_699, 0, Dm_build_1010+orgLen) + dm_build_1166.dm_build_1119.dm_build_699.Dm_build_427(crc) } else { - dm_build_881.dm_build_834.dm_build_417.Dm_build_265(Dm_build_733, dm_build_881.dm_build_828()) + dm_build_1166.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1018, dm_build_1166.dm_build_1113()) } } -func (dm_build_883 *dm_build_833) dm_build_827() error { - if dm_build_883.dm_build_834.dm_build_423 { +func (dm_build_1168 *dm_build_1118) dm_build_1112() error { + if dm_build_1168.dm_build_1119.dm_build_705 { - var bodyLen = dm_build_883.dm_build_830() - Dm_build_815 - var msgLen = Dm_build_725 + bodyLen - var recv = dm_build_883.dm_build_834.dm_build_417.Dm_build_369(int(msgLen)) - var calc = dm_build_883.dm_build_829(dm_build_883.dm_build_834.dm_build_417, 0, msgLen) + var bodyLen = dm_build_1168.dm_build_1115() - Dm_build_1100 + var msgLen = Dm_build_1010 + bodyLen + var recv = dm_build_1168.dm_build_1119.dm_build_699.Dm_build_651(int(msgLen)) + var calc = dm_build_1168.dm_build_1114(dm_build_1168.dm_build_1119.dm_build_699, 0, msgLen) if recv != calc { return ECGO_MSG_CHECK_ERROR.throw() } - dm_build_883.dm_build_831(bodyLen) - dm_build_883.dm_build_834.dm_build_417.Dm_build_92(int(msgLen)) + dm_build_1168.dm_build_1116(bodyLen) + dm_build_1168.dm_build_1119.dm_build_699.Dm_build_374(int(msgLen)) return nil } else { - var recv = dm_build_883.dm_build_834.dm_build_417.Dm_build_345(Dm_build_733) - var calc = dm_build_883.dm_build_828() + var recv = dm_build_1168.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1018) + var calc = dm_build_1168.dm_build_1113() if recv != calc { return ECGO_MSG_CHECK_ERROR.throw() } @@ -811,290 +815,290 @@ func (dm_build_883 *dm_build_833) dm_build_827() error { } } -func (dm_build_885 *dm_build_833) dm_build_828() byte { - dm_build_886 := dm_build_885.dm_build_834.dm_build_417.Dm_build_345(0) +func (dm_build_1170 *dm_build_1118) dm_build_1113() byte { + dm_build_1171 := dm_build_1170.dm_build_1119.dm_build_699.Dm_build_627(0) - for i := 1; i < Dm_build_733; i++ { - dm_build_886 ^= dm_build_885.dm_build_834.dm_build_417.Dm_build_345(i) + for i := 1; i < Dm_build_1018; i++ { + dm_build_1171 ^= dm_build_1170.dm_build_1119.dm_build_699.Dm_build_627(i) } - return dm_build_886 + return dm_build_1171 } -func (dm_build_888 *dm_build_833) dm_build_829(dm_build_889 *Dm_build_78, dm_build_890 int32, dm_build_891 int32) uint32 { +func (dm_build_1173 *dm_build_1118) dm_build_1114(dm_build_1174 *Dm_build_360, dm_build_1175 int32, dm_build_1176 int32) uint32 { - var dm_build_892 uint32 = 0xFFFFFFFF - var dm_build_893 = dm_build_890 - var dm_build_894 = dm_build_891 - dm_build_890 - var dm_build_895, dm_build_896 uint32 + var dm_build_1177 uint32 = 0xFFFFFFFF + var dm_build_1178 = dm_build_1175 + var dm_build_1179 = dm_build_1176 - dm_build_1175 + var dm_build_1180, dm_build_1181 uint32 - for dm_build_894 >= 8 { - dm_build_895 = dm_build_889.Dm_build_369(int(dm_build_893)) ^ dm_build_892 - dm_build_893 += ULINT_SIZE + for dm_build_1179 >= 8 { + dm_build_1180 = dm_build_1174.Dm_build_651(int(dm_build_1178)) ^ dm_build_1177 + dm_build_1178 += ULINT_SIZE - dm_build_896 = dm_build_889.Dm_build_369(int(dm_build_893)) - dm_build_893 += ULINT_SIZE + dm_build_1181 = dm_build_1174.Dm_build_651(int(dm_build_1178)) + dm_build_1178 += ULINT_SIZE - dm_build_892 = Dm_build_816[7][dm_build_895&0xFF] ^ Dm_build_816[6][(dm_build_895>>8)&0xFF] ^ - Dm_build_816[5][(dm_build_895>>16)&0xFF] ^ Dm_build_816[4][(dm_build_895>>24)&0xFF] ^ - Dm_build_816[3][dm_build_896&0xFF] ^ Dm_build_816[2][(dm_build_896>>8)&0xFF] ^ - Dm_build_816[1][(dm_build_896>>16)&0xFF] ^ Dm_build_816[0][(dm_build_896>>24)&0xFF] - dm_build_894 -= 8 + dm_build_1177 = Dm_build_1101[7][dm_build_1180&0xFF] ^ Dm_build_1101[6][(dm_build_1180>>8)&0xFF] ^ + Dm_build_1101[5][(dm_build_1180>>16)&0xFF] ^ Dm_build_1101[4][(dm_build_1180>>24)&0xFF] ^ + Dm_build_1101[3][dm_build_1181&0xFF] ^ Dm_build_1101[2][(dm_build_1181>>8)&0xFF] ^ + Dm_build_1101[1][(dm_build_1181>>16)&0xFF] ^ Dm_build_1101[0][(dm_build_1181>>24)&0xFF] + dm_build_1179 -= 8 } - for dm_build_894 > 0 { - dm_build_892 = ((dm_build_892 >> 8) & 0x00FFFFFF) ^ Dm_build_816[0][(dm_build_892&0xFF)^uint32(dm_build_889.Dm_build_363(int(dm_build_893)))] - dm_build_893++ - dm_build_894-- + for dm_build_1179 > 0 { + dm_build_1177 = ((dm_build_1177 >> 8) & 0x00FFFFFF) ^ Dm_build_1101[0][(dm_build_1177&0xFF)^uint32(dm_build_1174.Dm_build_645(int(dm_build_1178)))] + dm_build_1178++ + dm_build_1179-- } - return ^dm_build_892 + return ^dm_build_1177 } -func (dm_build_898 *dm_build_833) dm_build_830() int32 { - return dm_build_898.dm_build_834.dm_build_417.Dm_build_351(Dm_build_729) +func (dm_build_1183 *dm_build_1118) dm_build_1115() int32 { + return dm_build_1183.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1014) } -func (dm_build_900 *dm_build_833) dm_build_831(dm_build_901 int32) { - dm_build_900.dm_build_834.dm_build_417.Dm_build_273(Dm_build_729, dm_build_901) +func (dm_build_1185 *dm_build_1118) dm_build_1116(dm_build_1186 int32) { + dm_build_1185.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1014, dm_build_1186) } -func (dm_build_903 *dm_build_833) dm_build_832() int16 { - return dm_build_903.dm_build_835 +func (dm_build_1188 *dm_build_1118) dm_build_1117() int16 { + return dm_build_1188.dm_build_1120 } -type dm_build_904 struct { - dm_build_833 +type dm_build_1189 struct { + dm_build_1118 } -func dm_build_905(dm_build_906 *dm_build_414) *dm_build_904 { - dm_build_907 := new(dm_build_904) - dm_build_907.dm_build_838(dm_build_906, Dm_build_705) - return dm_build_907 +func dm_build_1190(dm_build_1191 *dm_build_696) *dm_build_1189 { + dm_build_1192 := new(dm_build_1189) + dm_build_1192.dm_build_1123(dm_build_1191, Dm_build_990) + return dm_build_1192 } -type dm_build_908 struct { - dm_build_833 - dm_build_909 string +type dm_build_1193 struct { + dm_build_1118 + dm_build_1194 string } -func dm_build_910(dm_build_911 *dm_build_414, dm_build_912 *DmStatement, dm_build_913 string) *dm_build_908 { - dm_build_914 := new(dm_build_908) - dm_build_914.dm_build_842(dm_build_911, Dm_build_713, dm_build_912) - dm_build_914.dm_build_909 = dm_build_913 - dm_build_914.dm_build_837.cursorName = dm_build_913 - return dm_build_914 +func dm_build_1195(dm_build_1196 *dm_build_696, dm_build_1197 *DmStatement, dm_build_1198 string) *dm_build_1193 { + dm_build_1199 := new(dm_build_1193) + dm_build_1199.dm_build_1127(dm_build_1196, Dm_build_998, dm_build_1197) + dm_build_1199.dm_build_1194 = dm_build_1198 + dm_build_1199.dm_build_1122.cursorName = dm_build_1198 + return dm_build_1199 } -func (dm_build_916 *dm_build_908) dm_build_819() error { - dm_build_916.dm_build_834.dm_build_417.Dm_build_195(dm_build_916.dm_build_909, dm_build_916.dm_build_834.dm_build_418.getServerEncoding(), dm_build_916.dm_build_834.dm_build_418) - dm_build_916.dm_build_834.dm_build_417.Dm_build_133(1) +func (dm_build_1201 *dm_build_1193) dm_build_1104() error { + dm_build_1201.dm_build_1119.dm_build_699.Dm_build_477(dm_build_1201.dm_build_1194, dm_build_1201.dm_build_1119.dm_build_700.getServerEncoding(), dm_build_1201.dm_build_1119.dm_build_700) + dm_build_1201.dm_build_1119.dm_build_699.Dm_build_415(1) return nil } -const Dm_build_917 = 62 +const Dm_build_1202 = 62 -type Dm_build_918 struct { - dm_build_941 - dm_build_919 []OptParameter +type Dm_build_1203 struct { + dm_build_1226 + dm_build_1204 []OptParameter } -func dm_build_920(dm_build_921 *dm_build_414, dm_build_922 *DmStatement, dm_build_923 []OptParameter) *Dm_build_918 { - dm_build_924 := new(Dm_build_918) - dm_build_924.dm_build_842(dm_build_921, Dm_build_723, dm_build_922) - dm_build_924.dm_build_919 = dm_build_923 - return dm_build_924 +func dm_build_1205(dm_build_1206 *dm_build_696, dm_build_1207 *DmStatement, dm_build_1208 []OptParameter) *Dm_build_1203 { + dm_build_1209 := new(Dm_build_1203) + dm_build_1209.dm_build_1127(dm_build_1206, Dm_build_1008, dm_build_1207) + dm_build_1209.dm_build_1204 = dm_build_1208 + return dm_build_1209 } -func (dm_build_926 *Dm_build_918) dm_build_819() error { - dm_build_927 := len(dm_build_926.dm_build_919) +func (dm_build_1211 *Dm_build_1203) dm_build_1104() error { + dm_build_1212 := len(dm_build_1211.dm_build_1204) - if err := dm_build_926.dm_build_957(int32(dm_build_927), 1); err != nil { + if err := dm_build_1211.dm_build_1242(int32(dm_build_1212), 1); err != nil { return err } - dm_build_926.dm_build_834.dm_build_417.Dm_build_265(Dm_build_917, 0) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1202, 0) - if dm_build_926.dm_build_834.dm_build_418.MsgVersion >= Dm_build_690 { - dm_build_926.dm_build_972() - dm_build_926.dm_build_834.dm_build_417.Dm_build_265(Dm_build_939, byte(dm_build_926.dm_build_944)) + if dm_build_1211.dm_build_1119.dm_build_700.MsgVersion >= Dm_build_975 { + dm_build_1211.dm_build_1257() + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1224, byte(dm_build_1211.dm_build_1229)) } - dm_build_926.dm_build_834.dm_build_417.Dm_build_195(dm_build_926.dm_build_837.nativeSql, dm_build_926.dm_build_837.dmConn.getServerEncoding(), dm_build_926.dm_build_837.dmConn) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_477(dm_build_1211.dm_build_1122.nativeSql, dm_build_1211.dm_build_1122.dmConn.getServerEncoding(), dm_build_1211.dm_build_1122.dmConn) - for _, param := range dm_build_926.dm_build_919 { - dm_build_926.dm_build_834.dm_build_417.Dm_build_121(param.ioType) - dm_build_926.dm_build_834.dm_build_417.Dm_build_133(int32(param.tp)) - dm_build_926.dm_build_834.dm_build_417.Dm_build_133(int32(param.prec)) - dm_build_926.dm_build_834.dm_build_417.Dm_build_133(int32(param.scale)) + for _, param := range dm_build_1211.dm_build_1204 { + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_403(param.ioType) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_415(int32(param.tp)) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_415(int32(param.prec)) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_415(int32(param.scale)) } - for _, param := range dm_build_926.dm_build_919 { + for _, param := range dm_build_1211.dm_build_1204 { if param.bytes == nil { - dm_build_926.dm_build_834.dm_build_417.Dm_build_141(uint16(Dm_build_742)) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_423(uint16(Dm_build_1027)) } else { var dataBytes = param.bytes[:len(param.bytes)] - if len(dataBytes) > int(Dm_build_739) { - if dm_build_926.dm_build_834.dm_build_418.MsgVersion >= Dm_build_693 && len(dataBytes) < int(maxValue) && + if len(dataBytes) > int(Dm_build_1024) { + if dm_build_1211.dm_build_1119.dm_build_700.MsgVersion >= Dm_build_978 && len(dataBytes) < int(maxValue) && isComplexType(param.tp, param.scale) { - dm_build_926.dm_build_834.dm_build_417.Dm_build_141(uint16(Dm_build_743)) - dm_build_926.dm_build_834.dm_build_417.Dm_build_165(dataBytes) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_423(uint16(Dm_build_1028)) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_447(dataBytes) continue } return ECGO_DATA_TOO_LONG.throw() } - dm_build_926.dm_build_834.dm_build_417.Dm_build_171(dataBytes) + dm_build_1211.dm_build_1119.dm_build_699.Dm_build_453(dataBytes) } } return nil } -func (dm_build_929 *Dm_build_918) dm_build_823() (interface{}, error) { - return dm_build_929.dm_build_941.dm_build_823() +func (dm_build_1214 *Dm_build_1203) dm_build_1108() (interface{}, error) { + return dm_build_1214.dm_build_1226.dm_build_1108() } const ( - Dm_build_930 int = 0x01 + Dm_build_1215 int = 0x01 - Dm_build_931 int = 0x02 + Dm_build_1216 int = 0x02 - Dm_build_932 int = 0x04 + Dm_build_1217 int = 0x04 - Dm_build_933 int = 0x08 + Dm_build_1218 int = 0x08 - Dm_build_934 int = 0x0100 + Dm_build_1219 int = 0x0100 - Dm_build_935 int32 = 0x00 + Dm_build_1220 int32 = 0x00 - Dm_build_936 int32 = 0x01 + Dm_build_1221 int32 = 0x01 - Dm_build_937 int32 = 0x02 + Dm_build_1222 int32 = 0x02 - Dm_build_938 int32 = 0x03 + Dm_build_1223 int32 = 0x03 - Dm_build_939 = 48 + Dm_build_1224 = 48 - Dm_build_940 = 59 + Dm_build_1225 = 59 ) -type dm_build_941 struct { - dm_build_833 - dm_build_942 [][]interface{} - dm_build_943 []parameter +type dm_build_1226 struct { + dm_build_1118 + dm_build_1227 [][]interface{} + dm_build_1228 []parameter - dm_build_944 int32 - dm_build_945 int32 - dm_build_946 int32 + dm_build_1229 int32 + dm_build_1230 int32 + dm_build_1231 int32 } -func dm_build_947(dm_build_948 *dm_build_414, dm_build_949 int16, dm_build_950 *DmStatement) *dm_build_941 { - dm_build_951 := new(dm_build_941) - dm_build_951.dm_build_842(dm_build_948, dm_build_949, dm_build_950) +func dm_build_1232(dm_build_1233 *dm_build_696, dm_build_1234 int16, dm_build_1235 *DmStatement) *dm_build_1226 { + dm_build_1236 := new(dm_build_1226) + dm_build_1236.dm_build_1127(dm_build_1233, dm_build_1234, dm_build_1235) - return dm_build_951 + return dm_build_1236 } -func dm_build_952(dm_build_953 *dm_build_414, dm_build_954 *DmStatement, dm_build_955 [][]interface{}) *dm_build_941 { - dm_build_956 := new(dm_build_941) +func dm_build_1237(dm_build_1238 *dm_build_696, dm_build_1239 *DmStatement, dm_build_1240 [][]interface{}) *dm_build_1226 { + dm_build_1241 := new(dm_build_1226) - if dm_build_953.dm_build_418.Execute2 { - dm_build_956.dm_build_842(dm_build_953, Dm_build_707, dm_build_954) + if dm_build_1238.dm_build_700.Execute2 { + dm_build_1241.dm_build_1127(dm_build_1238, Dm_build_992, dm_build_1239) } else { - dm_build_956.dm_build_842(dm_build_953, Dm_build_703, dm_build_954) + dm_build_1241.dm_build_1127(dm_build_1238, Dm_build_988, dm_build_1239) } - dm_build_956.dm_build_943 = dm_build_954.bindParams - dm_build_956.dm_build_942 = dm_build_955 + dm_build_1241.dm_build_1228 = dm_build_1239.bindParams + dm_build_1241.dm_build_1227 = dm_build_1240 - return dm_build_956 + return dm_build_1241 } -func (dm_build_958 *dm_build_941) dm_build_957(dm_build_959 int32, dm_build_960 int64) error { +func (dm_build_1243 *dm_build_1226) dm_build_1242(dm_build_1244 int32, dm_build_1245 int64) error { - dm_build_961 := Dm_build_726 + dm_build_1246 := Dm_build_1011 - if dm_build_958.dm_build_834.dm_build_418.autoCommit { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 1) + if dm_build_1243.dm_build_1119.dm_build_700.autoCommit { + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 1) } else { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 0) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 0) } - if dm_build_959 > PARAM_COUNT_LIMIT { + if dm_build_1244 > PARAM_COUNT_LIMIT { return ECGO_PARAM_COUNT_LIMIT.throw() } - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_293(dm_build_961, uint16(dm_build_959)) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_575(dm_build_1246, uint16(dm_build_1244)) - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 1) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 1) - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_277(dm_build_961, dm_build_960) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_559(dm_build_1246, dm_build_1245) - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_277(dm_build_961, dm_build_958.dm_build_837.cursorUpdateRow) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_559(dm_build_1246, dm_build_1243.dm_build_1122.cursorUpdateRow) - if dm_build_958.dm_build_837.maxRows <= 0 || dm_build_958.dm_build_837.dmConn.dmConnector.enRsCache { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_277(dm_build_961, INT64_MAX) + if dm_build_1243.dm_build_1122.maxRows <= 0 || dm_build_1243.dm_build_1122.dmConn.dmConnector.enRsCache { + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_559(dm_build_1246, INT64_MAX) } else { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_277(dm_build_961, dm_build_958.dm_build_837.maxRows) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_559(dm_build_1246, dm_build_1243.dm_build_1122.maxRows) } - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 1) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 1) - if dm_build_958.dm_build_834.dm_build_418.dmConnector.continueBatchOnError { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 1) + if dm_build_1243.dm_build_1119.dm_build_700.dmConnector.continueBatchOnError { + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 1) } else { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 0) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 0) } - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 0) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 0) - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 0) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 0) - if dm_build_958.dm_build_837.queryTimeout == 0 { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_273(dm_build_961, -1) + if dm_build_1243.dm_build_1122.queryTimeout == 0 { + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_555(dm_build_1246, -1) } else { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_273(dm_build_961, dm_build_958.dm_build_837.queryTimeout) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_555(dm_build_1246, dm_build_1243.dm_build_1122.queryTimeout) } - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_273(dm_build_961, dm_build_958.dm_build_834.dm_build_418.dmConnector.batchAllowMaxErrors) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_555(dm_build_1246, dm_build_1243.dm_build_1119.dm_build_700.dmConnector.batchAllowMaxErrors) - if dm_build_958.dm_build_837.innerExec { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 1) + if dm_build_1243.dm_build_1122.innerExec { + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 1) } else { - dm_build_961 += dm_build_958.dm_build_834.dm_build_417.Dm_build_265(dm_build_961, 0) + dm_build_1246 += dm_build_1243.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1246, 0) } return nil } -func (dm_build_963 *dm_build_941) dm_build_819() error { - var dm_build_964 int32 - var dm_build_965 int64 +func (dm_build_1248 *dm_build_1226) dm_build_1104() error { + var dm_build_1249 int32 + var dm_build_1250 int64 - if dm_build_963.dm_build_943 != nil { - dm_build_964 = int32(len(dm_build_963.dm_build_943)) + if dm_build_1248.dm_build_1228 != nil { + dm_build_1249 = int32(len(dm_build_1248.dm_build_1228)) } else { - dm_build_964 = 0 + dm_build_1249 = 0 } - if dm_build_963.dm_build_942 != nil { - dm_build_965 = int64(len(dm_build_963.dm_build_942)) + if dm_build_1248.dm_build_1227 != nil { + dm_build_1250 = int64(len(dm_build_1248.dm_build_1227)) } else { - dm_build_965 = 0 + dm_build_1250 = 0 } - if err := dm_build_963.dm_build_957(dm_build_964, dm_build_965); err != nil { + if err := dm_build_1248.dm_build_1242(dm_build_1249, dm_build_1250); err != nil { return err } - if dm_build_963.dm_build_834.dm_build_418.MsgVersion >= Dm_build_690 { - dm_build_963.dm_build_972() - dm_build_963.dm_build_834.dm_build_417.Dm_build_265(Dm_build_939, byte(dm_build_963.dm_build_944)) + if dm_build_1248.dm_build_1119.dm_build_700.MsgVersion >= Dm_build_975 { + dm_build_1248.dm_build_1257() + dm_build_1248.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1224, byte(dm_build_1248.dm_build_1229)) } - if dm_build_964 > 0 { - err := dm_build_963.dm_build_966(dm_build_963.dm_build_943) + if dm_build_1249 > 0 { + err := dm_build_1248.dm_build_1251(dm_build_1248.dm_build_1228) if err != nil { return err } - if dm_build_963.dm_build_942 != nil && len(dm_build_963.dm_build_942) > 0 { - for _, paramObject := range dm_build_963.dm_build_942 { - if err := dm_build_963.dm_build_969(paramObject); err != nil { + if dm_build_1248.dm_build_1227 != nil && len(dm_build_1248.dm_build_1227) > 0 { + for _, paramObject := range dm_build_1248.dm_build_1227 { + if err := dm_build_1248.dm_build_1254(paramObject); err != nil { return err } } @@ -1104,8 +1108,8 @@ func (dm_build_963 *dm_build_941) dm_build_819() error { return nil } -func (dm_build_967 *dm_build_941) dm_build_966(dm_build_968 []parameter) error { - for _, param := range dm_build_968 { +func (dm_build_1252 *dm_build_1226) dm_build_1251(dm_build_1253 []parameter) error { + for _, param := range dm_build_1253 { if param.mask == MASK_ORACLE_DATE { param.scale = param.scale | ORACLE_DATE_SCALE_MASK @@ -1119,12 +1123,12 @@ func (dm_build_967 *dm_build_941) dm_build_966(dm_build_968 []parameter) error { } if param.colType == CURSOR && param.ioType == IO_TYPE_OUT { - dm_build_967.dm_build_834.dm_build_417.Dm_build_125(IO_TYPE_INOUT) + dm_build_1252.dm_build_1119.dm_build_699.Dm_build_407(IO_TYPE_INOUT) } else { - dm_build_967.dm_build_834.dm_build_417.Dm_build_125(param.ioType) + dm_build_1252.dm_build_1119.dm_build_699.Dm_build_407(param.ioType) } - dm_build_967.dm_build_834.dm_build_417.Dm_build_133(param.colType) + dm_build_1252.dm_build_1119.dm_build_699.Dm_build_415(param.colType) lprec := param.prec lscale := param.scale @@ -1157,25 +1161,25 @@ func (dm_build_967 *dm_build_941) dm_build_966(dm_build_968 []parameter) error { } } - dm_build_967.dm_build_834.dm_build_417.Dm_build_133(lprec) + dm_build_1252.dm_build_1119.dm_build_699.Dm_build_415(lprec) - dm_build_967.dm_build_834.dm_build_417.Dm_build_133(lscale) + dm_build_1252.dm_build_1119.dm_build_699.Dm_build_415(lscale) switch param.colType { case ARRAY, SARRAY: - err := packArray(typeDesc, dm_build_967.dm_build_834.dm_build_417) + err := packArray(typeDesc, dm_build_1252.dm_build_1119.dm_build_699) if err != nil { return err } case PLTYPE_RECORD: - err := packRecord(typeDesc, dm_build_967.dm_build_834.dm_build_417) + err := packRecord(typeDesc, dm_build_1252.dm_build_1119.dm_build_699) if err != nil { return err } case CLASS: - err := packClass(typeDesc, dm_build_967.dm_build_834.dm_build_417) + err := packClass(typeDesc, dm_build_1252.dm_build_1119.dm_build_699) if err != nil { return err } @@ -1186,45 +1190,45 @@ func (dm_build_967 *dm_build_941) dm_build_966(dm_build_968 []parameter) error { return nil } -func (dm_build_970 *dm_build_941) dm_build_969(dm_build_971 []interface{}) error { - for i := 0; i < len(dm_build_970.dm_build_943); i++ { +func (dm_build_1255 *dm_build_1226) dm_build_1254(dm_build_1256 []interface{}) error { + for i := 0; i < len(dm_build_1255.dm_build_1228); i++ { - if dm_build_970.dm_build_943[i].colType == CURSOR { - dm_build_970.dm_build_834.dm_build_417.Dm_build_129(ULINT_SIZE) - dm_build_970.dm_build_834.dm_build_417.Dm_build_133(dm_build_970.dm_build_943[i].cursorStmt.id) + if dm_build_1255.dm_build_1228[i].colType == CURSOR { + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_411(ULINT_SIZE) + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1255.dm_build_1228[i].cursorStmt.id) continue } - if dm_build_970.dm_build_943[i].ioType == IO_TYPE_OUT { + if dm_build_1255.dm_build_1228[i].ioType == IO_TYPE_OUT { continue } - if dm_build_971[i] == nil { - dm_build_970.dm_build_834.dm_build_417.Dm_build_141(uint16(Dm_build_742)) + if dm_build_1256[i] == nil { + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_423(uint16(Dm_build_1027)) } else { - switch dm_build_971[i].(type) { + switch dm_build_1256[i].(type) { case []byte: - if dataBytes, ok := dm_build_971[i].([]byte); ok { - if len(dataBytes) > int(Dm_build_739) { - if dm_build_970.dm_build_834.dm_build_418.MsgVersion >= Dm_build_693 && len(dataBytes) < int(maxValue) && - isComplexType(int(dm_build_970.dm_build_943[i].colType), int(dm_build_970.dm_build_943[i].scale)) { - dm_build_970.dm_build_834.dm_build_417.Dm_build_141(uint16(Dm_build_743)) - dm_build_970.dm_build_834.dm_build_417.Dm_build_165(dataBytes) + if dataBytes, ok := dm_build_1256[i].([]byte); ok { + if len(dataBytes) > int(Dm_build_1024) { + if dm_build_1255.dm_build_1119.dm_build_700.MsgVersion >= Dm_build_978 && len(dataBytes) < 0xffffffff && + isComplexType(int(dm_build_1255.dm_build_1228[i].colType), int(dm_build_1255.dm_build_1228[i].scale)) { + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_423(uint16(Dm_build_1028)) + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_447(dataBytes) continue } return ECGO_DATA_TOO_LONG.throw() } - dm_build_970.dm_build_834.dm_build_417.Dm_build_171(dataBytes) + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_453(dataBytes) } case int: - if dm_build_971[i] == ParamDataEnum_Null { - dm_build_970.dm_build_834.dm_build_417.Dm_build_141(uint16(Dm_build_742)) - } else if dm_build_971[i] == ParamDataEnum_OFF_ROW { - dm_build_970.dm_build_834.dm_build_417.Dm_build_129(0) + if dm_build_1256[i] == ParamDataEnum_Null { + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_423(uint16(Dm_build_1027)) + } else if dm_build_1256[i] == ParamDataEnum_OFF_ROW { + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_411(0) } case lobCtl: - dm_build_970.dm_build_834.dm_build_417.Dm_build_141(uint16(Dm_build_740)) - dm_build_970.dm_build_834.dm_build_417.Dm_build_161(dm_build_971[i].(lobCtl).value) + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_423(uint16(Dm_build_1025)) + dm_build_1255.dm_build_1119.dm_build_699.Dm_build_443(dm_build_1256[i].(lobCtl).value) default: return fmt.Errorf("Bind param data failed by invalid param data type: ") } @@ -1234,333 +1238,343 @@ func (dm_build_970 *dm_build_941) dm_build_969(dm_build_971 []interface{}) error return nil } -func (dm_build_973 *dm_build_941) dm_build_972() int32 { - dm_build_973.dm_build_944 = Dm_build_936 - dm_build_973.dm_build_945 = 1 - return dm_build_973.dm_build_944 +func (dm_build_1258 *dm_build_1226) dm_build_1257() int32 { + dm_build_1258.dm_build_1229 = Dm_build_1221 + dm_build_1258.dm_build_1230 = 1 + return dm_build_1258.dm_build_1229 } -func (dm_build_975 *dm_build_941) dm_build_823() (interface{}, error) { - dm_build_976 := execRetInfo{} - dm_build_977 := dm_build_975.dm_build_837.dmConn +func (dm_build_1260 *dm_build_1226) dm_build_1108() (interface{}, error) { + dm_build_1261 := execRetInfo{} + dm_build_1262 := dm_build_1260.dm_build_1122.dmConn - dm_build_978 := Dm_build_726 + dm_build_1263 := Dm_build_1011 - dm_build_976.retSqlType = dm_build_975.dm_build_834.dm_build_417.Dm_build_348(dm_build_978) - dm_build_978 += USINT_SIZE + dm_build_1261.retSqlType = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_630(dm_build_1263) + dm_build_1263 += USINT_SIZE - dm_build_979 := dm_build_975.dm_build_834.dm_build_417.Dm_build_348(dm_build_978) - dm_build_978 += USINT_SIZE + dm_build_1264 := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_630(dm_build_1263) + dm_build_1263 += USINT_SIZE - dm_build_976.updateCount = dm_build_975.dm_build_834.dm_build_417.Dm_build_354(dm_build_978) - dm_build_978 += DDWORD_SIZE + dm_build_1261.updateCount = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_636(dm_build_1263) + dm_build_1263 += DDWORD_SIZE - dm_build_980 := dm_build_975.dm_build_834.dm_build_417.Dm_build_366(dm_build_978) - dm_build_978 += USINT_SIZE + dm_build_1265 := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_648(dm_build_1263) + dm_build_1263 += USINT_SIZE - dm_build_976.rsUpdatable = dm_build_975.dm_build_834.dm_build_417.Dm_build_345(dm_build_978) != 0 - dm_build_978 += BYTE_SIZE + dm_build_1261.rsUpdatable = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_627(dm_build_1263) != 0 + dm_build_1263 += BYTE_SIZE - dm_build_981 := dm_build_975.dm_build_834.dm_build_417.Dm_build_348(dm_build_978) - dm_build_978 += ULINT_SIZE + dm_build_1266 := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_630(dm_build_1263) + dm_build_1263 += ULINT_SIZE - dm_build_976.printLen = dm_build_975.dm_build_834.dm_build_417.Dm_build_351(dm_build_978) - dm_build_978 += ULINT_SIZE + dm_build_1261.printLen = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_633(dm_build_1263) + dm_build_1263 += ULINT_SIZE - var dm_build_982 int16 = -1 - if dm_build_976.retSqlType == Dm_build_792 || dm_build_976.retSqlType == Dm_build_793 { - dm_build_976.rowid = 0 + var dm_build_1267 int16 = -1 + if dm_build_1261.retSqlType == Dm_build_1077 || dm_build_1261.retSqlType == Dm_build_1078 { + dm_build_1261.rowid = 0 - dm_build_976.rsBdta = dm_build_975.dm_build_834.dm_build_417.Dm_build_345(dm_build_978) == Dm_build_805 - dm_build_978 += BYTE_SIZE + dm_build_1261.rsBdta = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_627(dm_build_1263) == Dm_build_1090 + dm_build_1263 += BYTE_SIZE - dm_build_982 = dm_build_975.dm_build_834.dm_build_417.Dm_build_348(dm_build_978) - dm_build_978 += USINT_SIZE - dm_build_978 += 5 + dm_build_1267 = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_630(dm_build_1263) + dm_build_1263 += USINT_SIZE + dm_build_1263 += 5 } else { - dm_build_976.rowid = dm_build_975.dm_build_834.dm_build_417.Dm_build_354(dm_build_978) - dm_build_978 += DDWORD_SIZE + dm_build_1261.rowid = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_636(dm_build_1263) + dm_build_1263 += DDWORD_SIZE } - dm_build_976.execId = dm_build_975.dm_build_834.dm_build_417.Dm_build_351(dm_build_978) - dm_build_978 += ULINT_SIZE + dm_build_1261.execId = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_633(dm_build_1263) + dm_build_1263 += ULINT_SIZE - dm_build_976.rsCacheOffset = dm_build_975.dm_build_834.dm_build_417.Dm_build_351(dm_build_978) - dm_build_978 += ULINT_SIZE + dm_build_1261.rsCacheOffset = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_633(dm_build_1263) + dm_build_1263 += ULINT_SIZE - dm_build_983 := dm_build_975.dm_build_834.dm_build_417.Dm_build_345(dm_build_978) - dm_build_978 += BYTE_SIZE - dm_build_984 := (dm_build_983 & 0x01) == 0x01 + dm_build_1268 := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_627(dm_build_1263) + dm_build_1263 += BYTE_SIZE + dm_build_1269 := (dm_build_1268 & 0x01) == 0x01 - dm_build_977.TrxStatus = dm_build_975.dm_build_834.dm_build_417.Dm_build_351(dm_build_978) - dm_build_977.setTrxFinish(dm_build_977.TrxStatus) - dm_build_978 += ULINT_SIZE + dm_build_1262.TrxStatus = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_633(dm_build_1263) + dm_build_1262.setTrxFinish(dm_build_1262.TrxStatus) + dm_build_1263 += ULINT_SIZE - if dm_build_976.printLen > 0 { - bytes := dm_build_975.dm_build_834.dm_build_417.Dm_build_228(int(dm_build_976.printLen)) - dm_build_976.printMsg = Dm_build_1331.Dm_build_1488(bytes, 0, len(bytes), dm_build_977.getServerEncoding(), dm_build_977) + if dm_build_1261.printLen > 0 { + bytes := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_510(int(dm_build_1261.printLen)) + dm_build_1261.printMsg = Dm_build_1.Dm_build_158(bytes, 0, len(bytes), dm_build_1262.getServerEncoding(), dm_build_1262) } - if dm_build_980 > 0 { - dm_build_976.outParamDatas = dm_build_975.dm_build_985(int(dm_build_980)) + if dm_build_1265 > 0 { + dm_build_1261.outParamDatas = dm_build_1260.dm_build_1270(int(dm_build_1265)) } - switch dm_build_976.retSqlType { - case Dm_build_794: - dm_build_977.dmConnector.localTimezone = dm_build_975.dm_build_834.dm_build_417.Dm_build_204() - case Dm_build_792: - dm_build_976.hasResultSet = true - if dm_build_979 > 0 { - dm_build_975.dm_build_837.columns = dm_build_975.dm_build_994(int(dm_build_979), dm_build_976.rsBdta) + switch dm_build_1261.retSqlType { + case Dm_build_1079: + dm_build_1262.dmConnector.localTimezone = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_486() + case Dm_build_1077: + dm_build_1261.hasResultSet = true + if dm_build_1264 > 0 { + dm_build_1260.dm_build_1122.columns = dm_build_1260.dm_build_1279(int(dm_build_1264), dm_build_1261.rsBdta) } - dm_build_975.dm_build_1004(&dm_build_976, len(dm_build_975.dm_build_837.columns), int(dm_build_981), int(dm_build_982)) - case Dm_build_793: - if dm_build_979 > 0 || dm_build_981 > 0 { - dm_build_976.hasResultSet = true + dm_build_1260.dm_build_1289(&dm_build_1261, len(dm_build_1260.dm_build_1122.columns), int(dm_build_1266), int(dm_build_1267)) + case Dm_build_1078: + if dm_build_1264 > 0 || dm_build_1266 > 0 { + dm_build_1261.hasResultSet = true } - if dm_build_979 > 0 { - dm_build_975.dm_build_837.columns = dm_build_975.dm_build_994(int(dm_build_979), dm_build_976.rsBdta) + if dm_build_1264 > 0 { + dm_build_1260.dm_build_1122.columns = dm_build_1260.dm_build_1279(int(dm_build_1264), dm_build_1261.rsBdta) } - dm_build_975.dm_build_1004(&dm_build_976, len(dm_build_975.dm_build_837.columns), int(dm_build_981), int(dm_build_982)) - case Dm_build_795: - dm_build_977.IsoLevel = int32(dm_build_975.dm_build_834.dm_build_417.Dm_build_204()) - dm_build_977.ReadOnly = dm_build_975.dm_build_834.dm_build_417.Dm_build_201() == 1 - case Dm_build_788: - dm_build_977.Schema = dm_build_975.dm_build_834.dm_build_417.Dm_build_249(dm_build_977.getServerEncoding(), dm_build_977) - case Dm_build_785: - dm_build_976.explain = dm_build_975.dm_build_834.dm_build_417.Dm_build_249(dm_build_977.getServerEncoding(), dm_build_977) - - case Dm_build_789, Dm_build_791, Dm_build_790: - if dm_build_984 { - - counts := dm_build_975.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1260.dm_build_1289(&dm_build_1261, len(dm_build_1260.dm_build_1122.columns), int(dm_build_1266), int(dm_build_1267)) + case Dm_build_1080: + dm_build_1262.IsoLevel = int32(dm_build_1260.dm_build_1119.dm_build_699.Dm_build_486()) + dm_build_1262.ReadOnly = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_483() == 1 + case Dm_build_1073: + dm_build_1262.Schema = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1262.getServerEncoding(), dm_build_1262) + case Dm_build_1070: + dm_build_1261.explain = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1262.getServerEncoding(), dm_build_1262) + + case Dm_build_1074, Dm_build_1076, Dm_build_1075: + if dm_build_1269 { + + counts := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_489() rowCounts := make([]int64, counts) for i := 0; i < int(counts); i++ { - rowCounts[i] = dm_build_975.dm_build_834.dm_build_417.Dm_build_210() + rowCounts[i] = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_492() } - dm_build_976.updateCounts = rowCounts + dm_build_1261.updateCounts = rowCounts } - _ = dm_build_975.dm_build_1015(&dm_build_976) + _ = dm_build_1260.dm_build_1301(&dm_build_1261) - if dm_build_975.dm_build_836 == EC_BP_WITH_ERROR.ErrCode { - _ = dm_build_975.dm_build_1010(dm_build_976.updateCounts) + if dm_build_1260.dm_build_1121 == EC_BP_WITH_ERROR.ErrCode { + _ = dm_build_1260.dm_build_1295(dm_build_1261.updateCounts) } - case Dm_build_798: - length := dm_build_975.dm_build_834.dm_build_417.Dm_build_219() - dm_build_977.FormatDate = dm_build_975.dm_build_834.dm_build_417.Dm_build_244(int(length), dm_build_977.getServerEncoding(), dm_build_977) - case Dm_build_800: - - length := dm_build_975.dm_build_834.dm_build_417.Dm_build_219() - dm_build_977.FormatTimestamp = dm_build_975.dm_build_834.dm_build_417.Dm_build_244(int(length), dm_build_977.getServerEncoding(), dm_build_977) - case Dm_build_801: - - length := dm_build_975.dm_build_834.dm_build_417.Dm_build_219() - dm_build_977.FormatTimestampTZ = dm_build_975.dm_build_834.dm_build_417.Dm_build_244(int(length), dm_build_977.getServerEncoding(), dm_build_977) - case Dm_build_799: - length := dm_build_975.dm_build_834.dm_build_417.Dm_build_219() - dm_build_977.FormatTime = dm_build_975.dm_build_834.dm_build_417.Dm_build_244(int(length), dm_build_977.getServerEncoding(), dm_build_977) - case Dm_build_802: - length := dm_build_975.dm_build_834.dm_build_417.Dm_build_219() - dm_build_977.FormatTimeTZ = dm_build_975.dm_build_834.dm_build_417.Dm_build_244(int(length), dm_build_977.getServerEncoding(), dm_build_977) - case Dm_build_803: - dm_build_977.OracleDateLanguage = dm_build_975.dm_build_834.dm_build_417.Dm_build_219() - } - - return &dm_build_976, nil -} - -func (dm_build_986 *dm_build_941) dm_build_985(dm_build_987 int) [][]byte { - dm_build_988 := make([]int, dm_build_987) - - dm_build_989 := 0 - for i := 0; i < len(dm_build_986.dm_build_943); i++ { - if dm_build_986.dm_build_943[i].ioType == IO_TYPE_INOUT || dm_build_986.dm_build_943[i].ioType == IO_TYPE_OUT { - dm_build_988[dm_build_989] = i - dm_build_989++ + case Dm_build_1083: + length := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_501() + dm_build_1262.FormatDate = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_526(int(length), dm_build_1262.getServerEncoding(), dm_build_1262) + case Dm_build_1085: + + length := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_501() + dm_build_1262.FormatTimestamp = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_526(int(length), dm_build_1262.getServerEncoding(), dm_build_1262) + case Dm_build_1086: + + length := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_501() + dm_build_1262.FormatTimestampTZ = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_526(int(length), dm_build_1262.getServerEncoding(), dm_build_1262) + case Dm_build_1084: + length := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_501() + dm_build_1262.FormatTime = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_526(int(length), dm_build_1262.getServerEncoding(), dm_build_1262) + case Dm_build_1087: + length := dm_build_1260.dm_build_1119.dm_build_699.Dm_build_501() + dm_build_1262.FormatTimeTZ = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_526(int(length), dm_build_1262.getServerEncoding(), dm_build_1262) + case Dm_build_1088: + dm_build_1262.OracleDateLanguage = dm_build_1260.dm_build_1119.dm_build_699.Dm_build_501() + } + + return &dm_build_1261, nil +} + +func (dm_build_1271 *dm_build_1226) dm_build_1270(dm_build_1272 int) [][]byte { + dm_build_1273 := make([]int, dm_build_1272) + + dm_build_1274 := 0 + for i := 0; i < len(dm_build_1271.dm_build_1228); i++ { + if dm_build_1271.dm_build_1228[i].ioType == IO_TYPE_INOUT || dm_build_1271.dm_build_1228[i].ioType == IO_TYPE_OUT { + dm_build_1273[dm_build_1274] = i + dm_build_1274++ } } - dm_build_990 := make([][]byte, len(dm_build_986.dm_build_943)) - var dm_build_991 int32 - var dm_build_992 bool - var dm_build_993 []byte = nil - for i := 0; i < dm_build_987; i++ { - dm_build_992 = false - dm_build_991 = int32(dm_build_986.dm_build_834.dm_build_417.Dm_build_222()) + dm_build_1275 := make([][]byte, len(dm_build_1271.dm_build_1228)) + var dm_build_1276 int32 + var dm_build_1277 bool + var dm_build_1278 []byte = nil + for i := 0; i < dm_build_1272; i++ { + dm_build_1277 = false + dm_build_1276 = int32(dm_build_1271.dm_build_1119.dm_build_699.Dm_build_504()) - if dm_build_991 == int32(Dm_build_742) { - dm_build_991 = 0 - dm_build_992 = true - } else if dm_build_991 == int32(Dm_build_743) { - dm_build_991 = dm_build_986.dm_build_834.dm_build_417.Dm_build_207() + if dm_build_1276 == Dm_build_1027 { + dm_build_1276 = 0 + dm_build_1277 = true + } else if dm_build_1276 == Dm_build_1028 { + dm_build_1276 = dm_build_1271.dm_build_1119.dm_build_699.Dm_build_489() } - if dm_build_992 { - dm_build_990[dm_build_988[i]] = nil + if dm_build_1277 { + dm_build_1275[dm_build_1273[i]] = nil } else { - dm_build_993 = dm_build_986.dm_build_834.dm_build_417.Dm_build_228(int(dm_build_991)) - dm_build_990[dm_build_988[i]] = dm_build_993 + dm_build_1278 = dm_build_1271.dm_build_1119.dm_build_699.Dm_build_510(int(dm_build_1276)) + dm_build_1275[dm_build_1273[i]] = dm_build_1278 } } - return dm_build_990 + return dm_build_1275 } -func (dm_build_995 *dm_build_941) dm_build_994(dm_build_996 int, dm_build_997 bool) []column { - dm_build_998 := dm_build_995.dm_build_834.dm_build_418.getServerEncoding() - var dm_build_999, dm_build_1000, dm_build_1001, dm_build_1002 int16 - dm_build_1003 := make([]column, dm_build_996) - for i := 0; i < dm_build_996; i++ { - dm_build_1003[i].InitColumn() +func (dm_build_1280 *dm_build_1226) dm_build_1279(dm_build_1281 int, _ bool) []column { + dm_build_1283 := dm_build_1280.dm_build_1119.dm_build_700.getServerEncoding() + var dm_build_1284, dm_build_1285, dm_build_1286, dm_build_1287 int16 + dm_build_1288 := make([]column, dm_build_1281) + for i := 0; i < dm_build_1281; i++ { + dm_build_1288[i].InitColumn() - dm_build_1003[i].colType = dm_build_995.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1288[i].colType = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_489() - dm_build_1003[i].prec = dm_build_995.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1288[i].prec = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_489() - dm_build_1003[i].scale = dm_build_995.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1288[i].scale = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_489() - dm_build_1003[i].nullable = dm_build_995.dm_build_834.dm_build_417.Dm_build_207() != 0 + dm_build_1288[i].nullable = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_489() != 0 - itemFlag := dm_build_995.dm_build_834.dm_build_417.Dm_build_204() - dm_build_1003[i].lob = int(itemFlag)&Dm_build_931 != 0 - dm_build_1003[i].identity = int(itemFlag)&Dm_build_930 != 0 - dm_build_1003[i].readonly = int(itemFlag)&Dm_build_932 != 0 + itemFlag := dm_build_1280.dm_build_1119.dm_build_699.Dm_build_486() + dm_build_1288[i].lob = int(itemFlag)&Dm_build_1216 != 0 + dm_build_1288[i].identity = int(itemFlag)&Dm_build_1215 != 0 + dm_build_1288[i].readonly = int(itemFlag)&Dm_build_1217 != 0 - dm_build_995.dm_build_834.dm_build_417.Dm_build_103(4, false, true) + dm_build_1280.dm_build_1119.dm_build_699.Dm_build_385(4, false, true) - dm_build_995.dm_build_834.dm_build_417.Dm_build_103(2, false, true) + dm_build_1280.dm_build_1119.dm_build_699.Dm_build_385(2, false, true) - dm_build_999 = dm_build_995.dm_build_834.dm_build_417.Dm_build_204() + dm_build_1284 = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_486() - dm_build_1000 = dm_build_995.dm_build_834.dm_build_417.Dm_build_204() + dm_build_1285 = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_486() - dm_build_1001 = dm_build_995.dm_build_834.dm_build_417.Dm_build_204() + dm_build_1286 = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_486() - dm_build_1002 = dm_build_995.dm_build_834.dm_build_417.Dm_build_204() - dm_build_1003[i].name = dm_build_995.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_999), dm_build_998, dm_build_995.dm_build_834.dm_build_418) - dm_build_1003[i].typeName = dm_build_995.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_1000), dm_build_998, dm_build_995.dm_build_834.dm_build_418) - dm_build_1003[i].tableName = dm_build_995.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_1001), dm_build_998, dm_build_995.dm_build_834.dm_build_418) - dm_build_1003[i].schemaName = dm_build_995.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_1002), dm_build_998, dm_build_995.dm_build_834.dm_build_418) + dm_build_1287 = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_486() + dm_build_1288[i].name = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1284), dm_build_1283, dm_build_1280.dm_build_1119.dm_build_700) + dm_build_1288[i].typeName = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1285), dm_build_1283, dm_build_1280.dm_build_1119.dm_build_700) + dm_build_1288[i].tableName = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1286), dm_build_1283, dm_build_1280.dm_build_1119.dm_build_700) + dm_build_1288[i].schemaName = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1287), dm_build_1283, dm_build_1280.dm_build_1119.dm_build_700) - if dm_build_995.dm_build_837.readBaseColName { - dm_build_1003[i].baseName = dm_build_995.dm_build_834.dm_build_417.Dm_build_257(dm_build_998, dm_build_995.dm_build_834.dm_build_418) + if dm_build_1280.dm_build_1122.readBaseColName { + dm_build_1288[i].baseName = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_539(dm_build_1283, dm_build_1280.dm_build_1119.dm_build_700) } - if dm_build_1003[i].lob { - dm_build_1003[i].lobTabId = dm_build_995.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1003[i].lobColId = dm_build_995.dm_build_834.dm_build_417.Dm_build_204() + if dm_build_1288[i].lob { + dm_build_1288[i].lobTabId = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1288[i].lobColId = dm_build_1280.dm_build_1119.dm_build_699.Dm_build_486() } - if dm_build_1003[i].colType == DATETIME || dm_build_1003[i].colType == DATETIME2 { - if (dm_build_1003[i].scale & LOCAL_DATETIME_SCALE_MASK) != 0 { + if dm_build_1288[i].colType == DATETIME || dm_build_1288[i].colType == DATETIME2 { + if (dm_build_1288[i].scale & LOCAL_DATETIME_SCALE_MASK) != 0 { - dm_build_1003[i].scale = dm_build_1003[i].scale & ^LOCAL_DATETIME_SCALE_MASK - dm_build_1003[i].mask = MASK_LOCAL_DATETIME - } else if (dm_build_1003[i].scale & ORACLE_DATE_SCALE_MASK) != 0 { + dm_build_1288[i].scale = dm_build_1288[i].scale & ^LOCAL_DATETIME_SCALE_MASK + dm_build_1288[i].mask = MASK_LOCAL_DATETIME + } else if (dm_build_1288[i].scale & ORACLE_DATE_SCALE_MASK) != 0 { - dm_build_1003[i].scale = dm_build_1003[i].scale & ^ORACLE_DATE_SCALE_MASK - dm_build_1003[i].mask = MASK_ORACLE_DATE + dm_build_1288[i].scale = dm_build_1288[i].scale & ^ORACLE_DATE_SCALE_MASK + dm_build_1288[i].mask = MASK_ORACLE_DATE } } - if dm_build_1003[i].colType == DECIMAL && dm_build_1003[i].scale == ORACLE_FLOAT_SCALE_MASK { - dm_build_1003[i].prec = int32(math.Round(float64(dm_build_1003[i].prec)*0.30103) + 1) - dm_build_1003[i].scale = -1 - dm_build_1003[i].mask = MASK_ORACLE_FLOAT + if dm_build_1288[i].colType == DECIMAL && dm_build_1288[i].scale == ORACLE_FLOAT_SCALE_MASK { + dm_build_1288[i].prec = int32(math.Round(float64(dm_build_1288[i].prec)*0.30103) + 1) + dm_build_1288[i].scale = -1 + dm_build_1288[i].mask = MASK_ORACLE_FLOAT } - if dm_build_1003[i].colType == VARCHAR && dm_build_1003[i].prec == BFILE_PREC && dm_build_1003[i].scale == BFILE_SCALE { - dm_build_1003[i].mask = MASK_BFILE + if dm_build_1288[i].colType == VARCHAR && dm_build_1288[i].prec == BFILE_PREC && dm_build_1288[i].scale == BFILE_SCALE { + dm_build_1288[i].mask = MASK_BFILE } } - for i := 0; i < dm_build_996; i++ { + for i := 0; i < dm_build_1281; i++ { - if isComplexType(int(dm_build_1003[i].colType), int(dm_build_1003[i].scale)) { - strDesc := newTypeDescriptor(dm_build_995.dm_build_834.dm_build_418) - _ = strDesc.unpack(dm_build_995.dm_build_834.dm_build_417) - dm_build_1003[i].typeDescriptor = strDesc + if isComplexType(int(dm_build_1288[i].colType), int(dm_build_1288[i].scale)) { + strDesc := newTypeDescriptor(dm_build_1280.dm_build_1119.dm_build_700) + _ = strDesc.unpack(dm_build_1280.dm_build_1119.dm_build_699) + dm_build_1288[i].typeDescriptor = strDesc } } - return dm_build_1003 + return dm_build_1288 } -func (dm_build_1005 *dm_build_941) dm_build_1004(dm_build_1006 *execRetInfo, dm_build_1007 int, dm_build_1008 int, dm_build_1009 int) { - if dm_build_1008 > 0 { - startOffset := dm_build_1005.dm_build_834.dm_build_417.Dm_build_98() - if dm_build_1006.rsBdta { - dm_build_1006.rsDatas = dm_build_1005.dm_build_1028(dm_build_1005.dm_build_837.columns, dm_build_1009) +func (dm_build_1290 *dm_build_1226) dm_build_1289(dm_build_1291 *execRetInfo, dm_build_1292 int, dm_build_1293 int, dm_build_1294 int) { + if dm_build_1293 > 0 { + startOffset := dm_build_1290.dm_build_1119.dm_build_699.Dm_build_380() + if dm_build_1291.rsBdta { + dm_build_1291.rsDatas = dm_build_1290.dm_build_1314(dm_build_1290.dm_build_1122.columns, dm_build_1294) } else { - datas := make([][][]byte, dm_build_1008) + datas := make([][][]byte, dm_build_1293) - for i := 0; i < dm_build_1008; i++ { + for i := 0; i < dm_build_1293; i++ { - datas[i] = make([][]byte, dm_build_1007+1) + datas[i] = make([][]byte, dm_build_1292+1) - dm_build_1005.dm_build_834.dm_build_417.Dm_build_103(2, false, true) + dm_build_1290.dm_build_1119.dm_build_699.Dm_build_385(2, false, true) - datas[i][0] = dm_build_1005.dm_build_834.dm_build_417.Dm_build_228(LINT64_SIZE) + datas[i][0] = dm_build_1290.dm_build_1119.dm_build_699.Dm_build_510(LINT64_SIZE) - dm_build_1005.dm_build_834.dm_build_417.Dm_build_103(2*dm_build_1007, false, true) + dm_build_1290.dm_build_1119.dm_build_699.Dm_build_385(2*dm_build_1292, false, true) - for j := 1; j < dm_build_1007+1; j++ { + for j := 1; j < dm_build_1292+1; j++ { - colLen := dm_build_1005.dm_build_834.dm_build_417.Dm_build_222() - if colLen == Dm_build_746 { + colLen := dm_build_1290.dm_build_1119.dm_build_699.Dm_build_504() + if colLen == Dm_build_1031 { datas[i][j] = nil - } else if colLen != Dm_build_747 { - datas[i][j] = dm_build_1005.dm_build_834.dm_build_417.Dm_build_228(int(colLen)) + } else if colLen != Dm_build_1032 { + datas[i][j] = dm_build_1290.dm_build_1119.dm_build_699.Dm_build_510(int(colLen)) } else { - datas[i][j] = dm_build_1005.dm_build_834.dm_build_417.Dm_build_232() + datas[i][j] = dm_build_1290.dm_build_1119.dm_build_699.Dm_build_514() } } } - dm_build_1006.rsDatas = datas + dm_build_1291.rsDatas = datas } - dm_build_1006.rsSizeof = dm_build_1005.dm_build_834.dm_build_417.Dm_build_98() - startOffset + dm_build_1291.rsSizeof = dm_build_1290.dm_build_1119.dm_build_699.Dm_build_380() - startOffset } - if dm_build_1006.rsCacheOffset > 0 { - tbCount := dm_build_1005.dm_build_834.dm_build_417.Dm_build_204() + if dm_build_1291.rsCacheOffset > 0 { + tbCount := dm_build_1290.dm_build_1119.dm_build_699.Dm_build_486() ids := make([]int32, tbCount) tss := make([]int64, tbCount) for i := 0; i < int(tbCount); i++ { - ids[i] = dm_build_1005.dm_build_834.dm_build_417.Dm_build_207() - tss[i] = dm_build_1005.dm_build_834.dm_build_417.Dm_build_210() + ids[i] = dm_build_1290.dm_build_1119.dm_build_699.Dm_build_489() + tss[i] = dm_build_1290.dm_build_1119.dm_build_699.Dm_build_492() } - dm_build_1006.tbIds = ids[:] - dm_build_1006.tbTss = tss[:] + dm_build_1291.tbIds = ids[:] + dm_build_1291.tbTss = tss[:] } } -func (dm_build_1011 *dm_build_941) dm_build_1010(dm_build_1012 []int64) error { +func (dm_build_1296 *dm_build_1226) dm_build_1295(dm_build_1297 []int64) error { - dm_build_1011.dm_build_834.dm_build_417.Dm_build_103(4, false, true) + dm_build_1296.dm_build_1119.dm_build_699.Dm_build_385(4, false, true) - dm_build_1013 := dm_build_1011.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1298 := dm_build_1296.dm_build_1119.dm_build_699.Dm_build_489() - dm_build_1014 := make([]string, 0, 8) - for i := 0; i < int(dm_build_1013); i++ { - irow := dm_build_1011.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1299 := dm_build_1296.dm_build_1119.dm_build_700.getServerEncoding() - dm_build_1012[irow] = -3 + if Locale != LANGUAGE_EN && dm_build_1299 == ENCODING_EUCKR { + dm_build_1299 = ENCODING_GB18030 + } + + if Locale == LANGUAGE_CNT_HK && dm_build_1299 != ENCODING_UTF8 { + dm_build_1299 = ENCODING_BIG5 + } - code := dm_build_1011.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1300 := make([]string, 0, 8) + for i := 0; i < int(dm_build_1298); i++ { + irow := dm_build_1296.dm_build_1119.dm_build_699.Dm_build_489() - errStr := dm_build_1011.dm_build_834.dm_build_417.Dm_build_257(dm_build_1011.dm_build_834.dm_build_418.getServerEncoding(), dm_build_1011.dm_build_834.dm_build_418) + dm_build_1297[irow] = -3 - dm_build_1014 = append(dm_build_1014, "row["+strconv.Itoa(int(irow))+"]:"+strconv.Itoa(int(code))+", "+errStr) + code := dm_build_1296.dm_build_1119.dm_build_699.Dm_build_489() + + errStr := dm_build_1296.dm_build_1119.dm_build_699.Dm_build_539(dm_build_1299, dm_build_1296.dm_build_1119.dm_build_700) + + dm_build_1300 = append(dm_build_1300, "row["+strconv.Itoa(int(irow))+"]:"+strconv.Itoa(int(code))+", "+errStr) } - if len(dm_build_1014) > 0 { + if len(dm_build_1300) > 0 { builder := &strings.Builder{} - for _, str := range dm_build_1014 { + for _, str := range dm_build_1300 { builder.WriteString(util.LINE_SEPARATOR) builder.WriteString(str) } @@ -1570,26 +1584,26 @@ func (dm_build_1011 *dm_build_941) dm_build_1010(dm_build_1012 []int64) error { return nil } -func (dm_build_1016 *dm_build_941) dm_build_1015(dm_build_1017 *execRetInfo) error { - dm_build_1018 := dm_build_1016.dm_build_834.dm_build_417.Dm_build_345(Dm_build_940) - dm_build_1019 := (dm_build_1018 & 0x02) == 0x02 - if !dm_build_1019 { +func (dm_build_1302 *dm_build_1226) dm_build_1301(dm_build_1303 *execRetInfo) error { + dm_build_1304 := dm_build_1302.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1225) + dm_build_1305 := (dm_build_1304 & 0x02) == 0x02 + if !dm_build_1305 { - if dm_build_1017.updateCount == 1 { + if dm_build_1303.updateCount == 1 { - dm_build_1017.lastInsertId = dm_build_1017.rowid + dm_build_1303.lastInsertId = dm_build_1303.rowid } return nil } - if dm_build_1016.dm_build_834.dm_build_418.MsgVersion < Dm_build_690 || dm_build_1016.dm_build_944 == Dm_build_936 { + if dm_build_1302.dm_build_1119.dm_build_700.MsgVersion < Dm_build_975 || dm_build_1302.dm_build_1229 == Dm_build_1221 { - rows := dm_build_1016.dm_build_834.dm_build_417.Dm_build_207() + rows := dm_build_1302.dm_build_1119.dm_build_699.Dm_build_489() var lastInsertId int64 for i := 0; i < int(rows); i++ { - lastInsertId = dm_build_1016.dm_build_834.dm_build_417.Dm_build_210() + lastInsertId = dm_build_1302.dm_build_1119.dm_build_699.Dm_build_492() } - dm_build_1017.lastInsertId = lastInsertId + dm_build_1303.lastInsertId = lastInsertId } else { } @@ -1598,629 +1612,629 @@ func (dm_build_1016 *dm_build_941) dm_build_1015(dm_build_1017 *execRetInfo) err } const ( - Dm_build_1020 = 0 + Dm_build_1306 = 0 - Dm_build_1021 = Dm_build_1020 + ULINT_SIZE + Dm_build_1307 = Dm_build_1306 + ULINT_SIZE - Dm_build_1022 = Dm_build_1021 + USINT_SIZE + Dm_build_1308 = Dm_build_1307 + USINT_SIZE - Dm_build_1023 = Dm_build_1022 + ULINT_SIZE + Dm_build_1309 = Dm_build_1308 + ULINT_SIZE - Dm_build_1024 = Dm_build_1023 + ULINT_SIZE + Dm_build_1310 = Dm_build_1309 + ULINT_SIZE - Dm_build_1025 = Dm_build_1024 + BYTE_SIZE + Dm_build_1311 = Dm_build_1310 + BYTE_SIZE - Dm_build_1026 = -2 + Dm_build_1312 = -2 - Dm_build_1027 = -3 + Dm_build_1313 = -3 ) -func (dm_build_1029 *dm_build_941) dm_build_1028(dm_build_1030 []column, dm_build_1031 int) [][][]byte { +func (dm_build_1315 *dm_build_1226) dm_build_1314(dm_build_1316 []column, dm_build_1317 int) [][][]byte { - dm_build_1032 := dm_build_1029.dm_build_834.dm_build_417.Dm_build_225() + dm_build_1318 := dm_build_1315.dm_build_1119.dm_build_699.Dm_build_507() - dm_build_1033 := dm_build_1029.dm_build_834.dm_build_417.Dm_build_222() + dm_build_1319 := dm_build_1315.dm_build_1119.dm_build_699.Dm_build_504() - var dm_build_1034 bool + var dm_build_1320 bool - if dm_build_1031 >= 0 && int(dm_build_1033) == len(dm_build_1030)+1 { - dm_build_1034 = true + if dm_build_1317 >= 0 && int(dm_build_1319) == len(dm_build_1316)+1 { + dm_build_1320 = true } else { - dm_build_1034 = false + dm_build_1320 = false } - dm_build_1029.dm_build_834.dm_build_417.Dm_build_103(ULINT_SIZE, false, true) + dm_build_1315.dm_build_1119.dm_build_699.Dm_build_385(ULINT_SIZE, false, true) - dm_build_1029.dm_build_834.dm_build_417.Dm_build_103(ULINT_SIZE, false, true) + dm_build_1315.dm_build_1119.dm_build_699.Dm_build_385(ULINT_SIZE, false, true) - dm_build_1029.dm_build_834.dm_build_417.Dm_build_103(BYTE_SIZE, false, true) + dm_build_1315.dm_build_1119.dm_build_699.Dm_build_385(BYTE_SIZE, false, true) - dm_build_1035 := make([]uint16, dm_build_1033) - for icol := 0; icol < int(dm_build_1033); icol++ { - dm_build_1035[icol] = dm_build_1029.dm_build_834.dm_build_417.Dm_build_222() + dm_build_1321 := make([]uint16, dm_build_1319) + for icol := 0; icol < int(dm_build_1319); icol++ { + dm_build_1321[icol] = dm_build_1315.dm_build_1119.dm_build_699.Dm_build_504() } - dm_build_1036 := make([]uint32, dm_build_1033) - dm_build_1037 := make([][][]byte, dm_build_1032) + dm_build_1322 := make([]uint32, dm_build_1319) + dm_build_1323 := make([][][]byte, dm_build_1318) - for i := uint32(0); i < dm_build_1032; i++ { - dm_build_1037[i] = make([][]byte, len(dm_build_1030)+1) + for i := uint32(0); i < dm_build_1318; i++ { + dm_build_1323[i] = make([][]byte, len(dm_build_1316)+1) } - for icol := 0; icol < int(dm_build_1033); icol++ { - dm_build_1036[icol] = dm_build_1029.dm_build_834.dm_build_417.Dm_build_225() + for icol := 0; icol < int(dm_build_1319); icol++ { + dm_build_1322[icol] = dm_build_1315.dm_build_1119.dm_build_699.Dm_build_507() } - for icol := 0; icol < int(dm_build_1033); icol++ { + for icol := 0; icol < int(dm_build_1319); icol++ { dataCol := icol + 1 - if dm_build_1034 && icol == dm_build_1031 { + if dm_build_1320 && icol == dm_build_1317 { dataCol = 0 - } else if dm_build_1034 && icol > dm_build_1031 { + } else if dm_build_1320 && icol > dm_build_1317 { dataCol = icol } - allNotNull := dm_build_1029.dm_build_834.dm_build_417.Dm_build_207() == 1 + allNotNull := dm_build_1315.dm_build_1119.dm_build_699.Dm_build_489() == 1 var isNull []bool = nil if !allNotNull { - isNull = make([]bool, dm_build_1032) - for irow := uint32(0); irow < dm_build_1032; irow++ { - isNull[irow] = dm_build_1029.dm_build_834.dm_build_417.Dm_build_201() == 0 + isNull = make([]bool, dm_build_1318) + for irow := uint32(0); irow < dm_build_1318; irow++ { + isNull[irow] = dm_build_1315.dm_build_1119.dm_build_699.Dm_build_483() == 0 } } - for irow := uint32(0); irow < dm_build_1032; irow++ { + for irow := uint32(0); irow < dm_build_1318; irow++ { if allNotNull || !isNull[irow] { - dm_build_1037[irow][dataCol] = dm_build_1029.dm_build_1038(int(dm_build_1035[icol])) + dm_build_1323[irow][dataCol] = dm_build_1315.dm_build_1324(int(dm_build_1321[icol])) } } } - if !dm_build_1034 && dm_build_1031 >= 0 { - for irow := uint32(0); irow < dm_build_1032; irow++ { - dm_build_1037[irow][0] = dm_build_1037[irow][dm_build_1031+1] + if !dm_build_1320 && dm_build_1317 >= 0 { + for irow := uint32(0); irow < dm_build_1318; irow++ { + dm_build_1323[irow][0] = dm_build_1323[irow][dm_build_1317+1] } } - return dm_build_1037 + return dm_build_1323 } -func (dm_build_1039 *dm_build_941) dm_build_1038(dm_build_1040 int) []byte { +func (dm_build_1325 *dm_build_1226) dm_build_1324(dm_build_1326 int) []byte { - dm_build_1041 := dm_build_1039.dm_build_1044(dm_build_1040) + dm_build_1327 := dm_build_1325.dm_build_1330(dm_build_1326) - dm_build_1042 := int32(0) - if dm_build_1041 == Dm_build_1026 { - dm_build_1042 = dm_build_1039.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1041 = int(dm_build_1039.dm_build_834.dm_build_417.Dm_build_207()) - } else if dm_build_1041 == Dm_build_1027 { - dm_build_1041 = int(dm_build_1039.dm_build_834.dm_build_417.Dm_build_207()) + dm_build_1328 := int32(0) + if dm_build_1327 == Dm_build_1312 { + dm_build_1328 = dm_build_1325.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1327 = int(dm_build_1325.dm_build_1119.dm_build_699.Dm_build_489()) + } else if dm_build_1327 == Dm_build_1313 { + dm_build_1327 = int(dm_build_1325.dm_build_1119.dm_build_699.Dm_build_489()) } - dm_build_1043 := dm_build_1039.dm_build_834.dm_build_417.Dm_build_228(dm_build_1041 + int(dm_build_1042)) - if dm_build_1042 == 0 { - return dm_build_1043 + dm_build_1329 := dm_build_1325.dm_build_1119.dm_build_699.Dm_build_510(dm_build_1327 + int(dm_build_1328)) + if dm_build_1328 == 0 { + return dm_build_1329 } - for i := dm_build_1041; i < len(dm_build_1043); i++ { - dm_build_1043[i] = ' ' + for i := dm_build_1327; i < len(dm_build_1329); i++ { + dm_build_1329[i] = ' ' } - return dm_build_1043 + return dm_build_1329 } -func (dm_build_1045 *dm_build_941) dm_build_1044(dm_build_1046 int) int { +func (dm_build_1331 *dm_build_1226) dm_build_1330(dm_build_1332 int) int { - dm_build_1047 := 0 - switch dm_build_1046 { + dm_build_1333 := 0 + switch dm_build_1332 { case INT, BIT, TINYINT, SMALLINT, BOOLEAN, NULL: - dm_build_1047 = 4 + dm_build_1333 = 4 case BIGINT: - dm_build_1047 = 8 + dm_build_1333 = 8 case CHAR, VARCHAR2, VARCHAR, BINARY, VARBINARY, BLOB, CLOB: - dm_build_1047 = Dm_build_1026 + dm_build_1333 = Dm_build_1312 case DECIMAL: - dm_build_1047 = Dm_build_1027 + dm_build_1333 = Dm_build_1313 case REAL: - dm_build_1047 = 4 + dm_build_1333 = 4 case DOUBLE: - dm_build_1047 = 8 + dm_build_1333 = 8 case DATE, TIME, DATETIME, TIME_TZ, DATETIME_TZ: - dm_build_1047 = 12 + dm_build_1333 = 12 case DATETIME2, DATETIME2_TZ: - dm_build_1047 = 13 + dm_build_1333 = 13 case INTERVAL_YM: - dm_build_1047 = 12 + dm_build_1333 = 12 case INTERVAL_DT: - dm_build_1047 = 24 + dm_build_1333 = 24 default: - dm_build_1047 = 0 + dm_build_1333 = 0 } - return dm_build_1047 + return dm_build_1333 } const ( - Dm_build_1048 = Dm_build_726 + Dm_build_1334 = Dm_build_1011 - Dm_build_1049 = Dm_build_1048 + DDWORD_SIZE + Dm_build_1335 = Dm_build_1334 + DDWORD_SIZE - Dm_build_1050 = Dm_build_1049 + LINT64_SIZE + Dm_build_1336 = Dm_build_1335 + LINT64_SIZE - Dm_build_1051 = Dm_build_1050 + USINT_SIZE + Dm_build_1337 = Dm_build_1336 + USINT_SIZE - Dm_build_1052 = Dm_build_726 + Dm_build_1338 = Dm_build_1011 - Dm_build_1053 = Dm_build_1052 + DDWORD_SIZE + Dm_build_1339 = Dm_build_1338 + DDWORD_SIZE ) -type dm_build_1054 struct { - dm_build_941 - dm_build_1055 *innerRows - dm_build_1056 int64 - dm_build_1057 int64 +type dm_build_1340 struct { + dm_build_1226 + dm_build_1341 *innerRows + dm_build_1342 int64 + dm_build_1343 int64 } -func dm_build_1058(dm_build_1059 *dm_build_414, dm_build_1060 *innerRows, dm_build_1061 int64, dm_build_1062 int64) *dm_build_1054 { - dm_build_1063 := new(dm_build_1054) - dm_build_1063.dm_build_842(dm_build_1059, Dm_build_704, dm_build_1060.dmStmt) - dm_build_1063.dm_build_1055 = dm_build_1060 - dm_build_1063.dm_build_1056 = dm_build_1061 - dm_build_1063.dm_build_1057 = dm_build_1062 - return dm_build_1063 +func dm_build_1344(dm_build_1345 *dm_build_696, dm_build_1346 *innerRows, dm_build_1347 int64, dm_build_1348 int64) *dm_build_1340 { + dm_build_1349 := new(dm_build_1340) + dm_build_1349.dm_build_1127(dm_build_1345, Dm_build_989, dm_build_1346.dmStmt) + dm_build_1349.dm_build_1341 = dm_build_1346 + dm_build_1349.dm_build_1342 = dm_build_1347 + dm_build_1349.dm_build_1343 = dm_build_1348 + return dm_build_1349 } -func (dm_build_1065 *dm_build_1054) dm_build_819() error { +func (dm_build_1351 *dm_build_1340) dm_build_1104() error { - dm_build_1065.dm_build_834.dm_build_417.Dm_build_277(Dm_build_1048, dm_build_1065.dm_build_1056) + dm_build_1351.dm_build_1119.dm_build_699.Dm_build_559(Dm_build_1334, dm_build_1351.dm_build_1342) - dm_build_1065.dm_build_834.dm_build_417.Dm_build_277(Dm_build_1049, dm_build_1065.dm_build_1057) + dm_build_1351.dm_build_1119.dm_build_699.Dm_build_559(Dm_build_1335, dm_build_1351.dm_build_1343) - dm_build_1065.dm_build_834.dm_build_417.Dm_build_269(Dm_build_1050, dm_build_1065.dm_build_1055.id) + dm_build_1351.dm_build_1119.dm_build_699.Dm_build_551(Dm_build_1336, dm_build_1351.dm_build_1341.id) - dm_build_1066 := dm_build_1065.dm_build_1055.dmStmt.dmConn.dmConnector.bufPrefetch - var dm_build_1067 int32 - if dm_build_1065.dm_build_1055.sizeOfRow != 0 && dm_build_1065.dm_build_1055.fetchSize != 0 { - if dm_build_1065.dm_build_1055.sizeOfRow*dm_build_1065.dm_build_1055.fetchSize > int(INT32_MAX) { - dm_build_1067 = INT32_MAX + dm_build_1352 := dm_build_1351.dm_build_1341.dmStmt.dmConn.dmConnector.bufPrefetch + var dm_build_1353 int32 + if dm_build_1351.dm_build_1341.sizeOfRow != 0 && dm_build_1351.dm_build_1341.fetchSize != 0 { + if dm_build_1351.dm_build_1341.sizeOfRow*dm_build_1351.dm_build_1341.fetchSize > int(INT32_MAX) { + dm_build_1353 = INT32_MAX } else { - dm_build_1067 = int32(dm_build_1065.dm_build_1055.sizeOfRow * dm_build_1065.dm_build_1055.fetchSize) + dm_build_1353 = int32(dm_build_1351.dm_build_1341.sizeOfRow * dm_build_1351.dm_build_1341.fetchSize) } - if dm_build_1067 < Dm_build_758 { - dm_build_1066 = int(Dm_build_758) - } else if dm_build_1067 > Dm_build_759 { - dm_build_1066 = int(Dm_build_759) + if dm_build_1353 < Dm_build_1043 { + dm_build_1352 = int(Dm_build_1043) + } else if dm_build_1353 > Dm_build_1044 { + dm_build_1352 = int(Dm_build_1044) } else { - dm_build_1066 = int(dm_build_1067) + dm_build_1352 = int(dm_build_1353) } - dm_build_1065.dm_build_834.dm_build_417.Dm_build_273(Dm_build_1051, int32(dm_build_1066)) + dm_build_1351.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1337, int32(dm_build_1352)) } return nil } -func (dm_build_1069 *dm_build_1054) dm_build_823() (interface{}, error) { - dm_build_1070 := execRetInfo{} - dm_build_1070.rsBdta = dm_build_1069.dm_build_1055.isBdta +func (dm_build_1355 *dm_build_1340) dm_build_1108() (interface{}, error) { + dm_build_1356 := execRetInfo{} + dm_build_1356.rsBdta = dm_build_1355.dm_build_1341.isBdta - dm_build_1070.updateCount = dm_build_1069.dm_build_834.dm_build_417.Dm_build_354(Dm_build_1052) - dm_build_1071 := dm_build_1069.dm_build_834.dm_build_417.Dm_build_351(Dm_build_1053) + dm_build_1356.updateCount = dm_build_1355.dm_build_1119.dm_build_699.Dm_build_636(Dm_build_1338) + dm_build_1357 := dm_build_1355.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1339) - dm_build_1069.dm_build_1004(&dm_build_1070, len(dm_build_1069.dm_build_1055.columns), int(dm_build_1071), -1) + dm_build_1355.dm_build_1289(&dm_build_1356, len(dm_build_1355.dm_build_1341.columns), int(dm_build_1357), -1) - return &dm_build_1070, nil + return &dm_build_1356, nil } -type dm_build_1072 struct { - dm_build_833 - dm_build_1073 *lob - dm_build_1074 int - dm_build_1075 int +type dm_build_1358 struct { + dm_build_1118 + dm_build_1359 *lob + dm_build_1360 int + dm_build_1361 int } -func dm_build_1076(dm_build_1077 *dm_build_414, dm_build_1078 *lob, dm_build_1079 int, dm_build_1080 int) *dm_build_1072 { - dm_build_1081 := new(dm_build_1072) - dm_build_1081.dm_build_838(dm_build_1077, Dm_build_717) - dm_build_1081.dm_build_1073 = dm_build_1078 - dm_build_1081.dm_build_1074 = dm_build_1079 - dm_build_1081.dm_build_1075 = dm_build_1080 - return dm_build_1081 +func dm_build_1362(dm_build_1363 *dm_build_696, dm_build_1364 *lob, dm_build_1365 int, dm_build_1366 int) *dm_build_1358 { + dm_build_1367 := new(dm_build_1358) + dm_build_1367.dm_build_1123(dm_build_1363, Dm_build_1002) + dm_build_1367.dm_build_1359 = dm_build_1364 + dm_build_1367.dm_build_1360 = dm_build_1365 + dm_build_1367.dm_build_1361 = dm_build_1366 + return dm_build_1367 } -func (dm_build_1083 *dm_build_1072) dm_build_819() error { +func (dm_build_1369 *dm_build_1358) dm_build_1104() error { - dm_build_1083.dm_build_834.dm_build_417.Dm_build_121(byte(dm_build_1083.dm_build_1073.lobFlag)) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_403(byte(dm_build_1369.dm_build_1359.lobFlag)) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_133(dm_build_1083.dm_build_1073.tabId) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1369.dm_build_1359.tabId) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_129(dm_build_1083.dm_build_1073.colId) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1369.dm_build_1359.colId) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_149(uint64(dm_build_1083.dm_build_1073.blobId)) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_431(uint64(dm_build_1369.dm_build_1359.blobId)) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_129(dm_build_1083.dm_build_1073.groupId) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1369.dm_build_1359.groupId) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_129(dm_build_1083.dm_build_1073.fileId) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1369.dm_build_1359.fileId) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_133(dm_build_1083.dm_build_1073.pageNo) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1369.dm_build_1359.pageNo) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_129(dm_build_1083.dm_build_1073.curFileId) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1369.dm_build_1359.curFileId) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_133(dm_build_1083.dm_build_1073.curPageNo) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1369.dm_build_1359.curPageNo) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_133(dm_build_1083.dm_build_1073.totalOffset) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1369.dm_build_1359.totalOffset) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_133(int32(dm_build_1083.dm_build_1074)) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_415(int32(dm_build_1369.dm_build_1360)) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_133(int32(dm_build_1083.dm_build_1075)) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_415(int32(dm_build_1369.dm_build_1361)) - if dm_build_1083.dm_build_834.dm_build_418.NewLobFlag { - dm_build_1083.dm_build_834.dm_build_417.Dm_build_149(uint64(dm_build_1083.dm_build_1073.rowId)) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_129(dm_build_1083.dm_build_1073.exGroupId) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_129(dm_build_1083.dm_build_1073.exFileId) - dm_build_1083.dm_build_834.dm_build_417.Dm_build_133(dm_build_1083.dm_build_1073.exPageNo) + if dm_build_1369.dm_build_1119.dm_build_700.NewLobFlag { + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_431(uint64(dm_build_1369.dm_build_1359.rowId)) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1369.dm_build_1359.exGroupId) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1369.dm_build_1359.exFileId) + dm_build_1369.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1369.dm_build_1359.exPageNo) } return nil } -func (dm_build_1085 *dm_build_1072) dm_build_823() (interface{}, error) { +func (dm_build_1371 *dm_build_1358) dm_build_1108() (interface{}, error) { - dm_build_1085.dm_build_1073.readOver = dm_build_1085.dm_build_834.dm_build_417.Dm_build_201() == 1 - var dm_build_1086 = dm_build_1085.dm_build_834.dm_build_417.Dm_build_225() - if dm_build_1086 <= 0 { + dm_build_1371.dm_build_1359.readOver = dm_build_1371.dm_build_1119.dm_build_699.Dm_build_483() == 1 + var dm_build_1372 = dm_build_1371.dm_build_1119.dm_build_699.Dm_build_507() + if dm_build_1372 <= 0 { return &lobRetInfo{0, []byte{}}, nil } - dm_build_1085.dm_build_1073.curFileId = dm_build_1085.dm_build_834.dm_build_417.Dm_build_204() - dm_build_1085.dm_build_1073.curPageNo = dm_build_1085.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1085.dm_build_1073.totalOffset = dm_build_1085.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1371.dm_build_1359.curFileId = dm_build_1371.dm_build_1119.dm_build_699.Dm_build_486() + dm_build_1371.dm_build_1359.curPageNo = dm_build_1371.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1371.dm_build_1359.totalOffset = dm_build_1371.dm_build_1119.dm_build_699.Dm_build_489() - var dm_build_1087 = dm_build_1085.dm_build_834.dm_build_417.Dm_build_238(int(dm_build_1086)) - var dm_build_1088 int64 = -1 - if dm_build_1085.dm_build_834.dm_build_417.Dm_build_100(false) > 0 { - dm_build_1088 = int64(dm_build_1085.dm_build_834.dm_build_417.Dm_build_225()) + var dm_build_1373 = dm_build_1371.dm_build_1119.dm_build_699.Dm_build_520(int(dm_build_1372)) + var dm_build_1374 int64 = -1 + if dm_build_1371.dm_build_1119.dm_build_699.Dm_build_382(false) > 0 { + dm_build_1374 = int64(dm_build_1371.dm_build_1119.dm_build_699.Dm_build_507()) } - return &lobRetInfo{dm_build_1088, dm_build_1087}, nil + return &lobRetInfo{dm_build_1374, dm_build_1373}, nil } -type dm_build_1089 struct { - dm_build_833 - dm_build_1090 *lob +type dm_build_1375 struct { + dm_build_1118 + dm_build_1376 *lob } -func dm_build_1091(dm_build_1092 *dm_build_414, dm_build_1093 *lob) *dm_build_1089 { - dm_build_1094 := new(dm_build_1089) - dm_build_1094.dm_build_838(dm_build_1092, Dm_build_714) - dm_build_1094.dm_build_1090 = dm_build_1093 - return dm_build_1094 +func dm_build_1377(dm_build_1378 *dm_build_696, dm_build_1379 *lob) *dm_build_1375 { + dm_build_1380 := new(dm_build_1375) + dm_build_1380.dm_build_1123(dm_build_1378, Dm_build_999) + dm_build_1380.dm_build_1376 = dm_build_1379 + return dm_build_1380 } -func (dm_build_1096 *dm_build_1089) dm_build_819() error { +func (dm_build_1382 *dm_build_1375) dm_build_1104() error { - dm_build_1096.dm_build_834.dm_build_417.Dm_build_121(byte(dm_build_1096.dm_build_1090.lobFlag)) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_403(byte(dm_build_1382.dm_build_1376.lobFlag)) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_149(uint64(dm_build_1096.dm_build_1090.blobId)) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_431(uint64(dm_build_1382.dm_build_1376.blobId)) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_129(dm_build_1096.dm_build_1090.groupId) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1382.dm_build_1376.groupId) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_129(dm_build_1096.dm_build_1090.fileId) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1382.dm_build_1376.fileId) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_133(dm_build_1096.dm_build_1090.pageNo) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1382.dm_build_1376.pageNo) - if dm_build_1096.dm_build_834.dm_build_418.NewLobFlag { - dm_build_1096.dm_build_834.dm_build_417.Dm_build_133(dm_build_1096.dm_build_1090.tabId) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_129(dm_build_1096.dm_build_1090.colId) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_149(uint64(dm_build_1096.dm_build_1090.rowId)) + if dm_build_1382.dm_build_1119.dm_build_700.NewLobFlag { + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1382.dm_build_1376.tabId) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1382.dm_build_1376.colId) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_431(uint64(dm_build_1382.dm_build_1376.rowId)) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_129(dm_build_1096.dm_build_1090.exGroupId) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_129(dm_build_1096.dm_build_1090.exFileId) - dm_build_1096.dm_build_834.dm_build_417.Dm_build_133(dm_build_1096.dm_build_1090.exPageNo) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1382.dm_build_1376.exGroupId) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1382.dm_build_1376.exFileId) + dm_build_1382.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1382.dm_build_1376.exPageNo) } return nil } -func (dm_build_1098 *dm_build_1089) dm_build_823() (interface{}, error) { +func (dm_build_1384 *dm_build_1375) dm_build_1108() (interface{}, error) { - if dm_build_1098.dm_build_834.dm_build_417.Dm_build_100(false) == 8 { - return dm_build_1098.dm_build_834.dm_build_417.Dm_build_210(), nil + if dm_build_1384.dm_build_1119.dm_build_699.Dm_build_382(false) == 8 { + return dm_build_1384.dm_build_1119.dm_build_699.Dm_build_492(), nil } else { - return int64(dm_build_1098.dm_build_834.dm_build_417.Dm_build_225()), nil + return int64(dm_build_1384.dm_build_1119.dm_build_699.Dm_build_507()), nil } } -type dm_build_1099 struct { - dm_build_833 - dm_build_1100 *lob - dm_build_1101 int +type dm_build_1385 struct { + dm_build_1118 + dm_build_1386 *lob + dm_build_1387 int } -func dm_build_1102(dm_build_1103 *dm_build_414, dm_build_1104 *lob, dm_build_1105 int) *dm_build_1099 { - dm_build_1106 := new(dm_build_1099) - dm_build_1106.dm_build_838(dm_build_1103, Dm_build_716) - dm_build_1106.dm_build_1100 = dm_build_1104 - dm_build_1106.dm_build_1101 = dm_build_1105 - return dm_build_1106 +func dm_build_1388(dm_build_1389 *dm_build_696, dm_build_1390 *lob, dm_build_1391 int) *dm_build_1385 { + dm_build_1392 := new(dm_build_1385) + dm_build_1392.dm_build_1123(dm_build_1389, Dm_build_1001) + dm_build_1392.dm_build_1386 = dm_build_1390 + dm_build_1392.dm_build_1387 = dm_build_1391 + return dm_build_1392 } -func (dm_build_1108 *dm_build_1099) dm_build_819() error { +func (dm_build_1394 *dm_build_1385) dm_build_1104() error { - dm_build_1108.dm_build_834.dm_build_417.Dm_build_121(byte(dm_build_1108.dm_build_1100.lobFlag)) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_403(byte(dm_build_1394.dm_build_1386.lobFlag)) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_149(uint64(dm_build_1108.dm_build_1100.blobId)) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_431(uint64(dm_build_1394.dm_build_1386.blobId)) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_129(dm_build_1108.dm_build_1100.groupId) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1394.dm_build_1386.groupId) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_129(dm_build_1108.dm_build_1100.fileId) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1394.dm_build_1386.fileId) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_133(dm_build_1108.dm_build_1100.pageNo) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1394.dm_build_1386.pageNo) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_133(dm_build_1108.dm_build_1100.tabId) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_129(dm_build_1108.dm_build_1100.colId) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_149(uint64(dm_build_1108.dm_build_1100.rowId)) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_161(Dm_build_1331.Dm_build_1536(uint32(dm_build_1108.dm_build_1101))) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1394.dm_build_1386.tabId) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1394.dm_build_1386.colId) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_431(uint64(dm_build_1394.dm_build_1386.rowId)) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_443(Dm_build_1.Dm_build_206(uint32(dm_build_1394.dm_build_1387))) - if dm_build_1108.dm_build_834.dm_build_418.NewLobFlag { - dm_build_1108.dm_build_834.dm_build_417.Dm_build_129(dm_build_1108.dm_build_1100.exGroupId) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_129(dm_build_1108.dm_build_1100.exFileId) - dm_build_1108.dm_build_834.dm_build_417.Dm_build_133(dm_build_1108.dm_build_1100.exPageNo) + if dm_build_1394.dm_build_1119.dm_build_700.NewLobFlag { + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1394.dm_build_1386.exGroupId) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1394.dm_build_1386.exFileId) + dm_build_1394.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1394.dm_build_1386.exPageNo) } return nil } -func (dm_build_1110 *dm_build_1099) dm_build_823() (interface{}, error) { +func (dm_build_1396 *dm_build_1385) dm_build_1108() (interface{}, error) { - dm_build_1111 := dm_build_1110.dm_build_834.dm_build_417.Dm_build_225() - dm_build_1110.dm_build_1100.blobId = dm_build_1110.dm_build_834.dm_build_417.Dm_build_210() - dm_build_1110.dm_build_1100.resetCurrentInfo() - return int64(dm_build_1111), nil + dm_build_1397 := dm_build_1396.dm_build_1119.dm_build_699.Dm_build_507() + dm_build_1396.dm_build_1386.blobId = dm_build_1396.dm_build_1119.dm_build_699.Dm_build_492() + dm_build_1396.dm_build_1386.resetCurrentInfo() + return int64(dm_build_1397), nil } const ( - Dm_build_1112 = Dm_build_726 + Dm_build_1398 = Dm_build_1011 - Dm_build_1113 = Dm_build_1112 + ULINT_SIZE + Dm_build_1399 = Dm_build_1398 + ULINT_SIZE - Dm_build_1114 = Dm_build_1113 + ULINT_SIZE + Dm_build_1400 = Dm_build_1399 + ULINT_SIZE - Dm_build_1115 = Dm_build_1114 + ULINT_SIZE + Dm_build_1401 = Dm_build_1400 + ULINT_SIZE - Dm_build_1116 = Dm_build_1115 + BYTE_SIZE + Dm_build_1402 = Dm_build_1401 + BYTE_SIZE - Dm_build_1117 = Dm_build_1116 + USINT_SIZE + Dm_build_1403 = Dm_build_1402 + USINT_SIZE - Dm_build_1118 = Dm_build_1117 + ULINT_SIZE + Dm_build_1404 = Dm_build_1403 + ULINT_SIZE - Dm_build_1119 = Dm_build_1118 + BYTE_SIZE + Dm_build_1405 = Dm_build_1404 + BYTE_SIZE - Dm_build_1120 = Dm_build_1119 + BYTE_SIZE + Dm_build_1406 = Dm_build_1405 + BYTE_SIZE - Dm_build_1121 = Dm_build_1120 + BYTE_SIZE + Dm_build_1407 = Dm_build_1406 + BYTE_SIZE - Dm_build_1122 = Dm_build_726 + Dm_build_1408 = Dm_build_1011 - Dm_build_1123 = Dm_build_1122 + ULINT_SIZE + Dm_build_1409 = Dm_build_1408 + ULINT_SIZE - Dm_build_1124 = Dm_build_1123 + ULINT_SIZE + Dm_build_1410 = Dm_build_1409 + ULINT_SIZE - Dm_build_1125 = Dm_build_1124 + BYTE_SIZE + Dm_build_1411 = Dm_build_1410 + BYTE_SIZE - Dm_build_1126 = Dm_build_1125 + ULINT_SIZE + Dm_build_1412 = Dm_build_1411 + ULINT_SIZE - Dm_build_1127 = Dm_build_1126 + BYTE_SIZE + Dm_build_1413 = Dm_build_1412 + BYTE_SIZE - Dm_build_1128 = Dm_build_1127 + BYTE_SIZE + Dm_build_1414 = Dm_build_1413 + BYTE_SIZE - Dm_build_1129 = Dm_build_1128 + USINT_SIZE + Dm_build_1415 = Dm_build_1414 + USINT_SIZE - Dm_build_1130 = Dm_build_1129 + USINT_SIZE + Dm_build_1416 = Dm_build_1415 + USINT_SIZE - Dm_build_1131 = Dm_build_1130 + BYTE_SIZE + Dm_build_1417 = Dm_build_1416 + BYTE_SIZE - Dm_build_1132 = Dm_build_1131 + USINT_SIZE + Dm_build_1418 = Dm_build_1417 + USINT_SIZE - Dm_build_1133 = Dm_build_1132 + BYTE_SIZE + Dm_build_1419 = Dm_build_1418 + BYTE_SIZE - Dm_build_1134 = Dm_build_1133 + BYTE_SIZE + Dm_build_1420 = Dm_build_1419 + BYTE_SIZE - Dm_build_1135 = Dm_build_1134 + ULINT_SIZE + Dm_build_1421 = Dm_build_1420 + ULINT_SIZE - Dm_build_1136 = Dm_build_1135 + USINT_SIZE + Dm_build_1422 = Dm_build_1421 + USINT_SIZE ) -type dm_build_1137 struct { - dm_build_833 +type dm_build_1423 struct { + dm_build_1118 - dm_build_1138 *DmConnection + dm_build_1424 *DmConnection - dm_build_1139 bool + dm_build_1425 bool } -func dm_build_1140(dm_build_1141 *dm_build_414) *dm_build_1137 { - dm_build_1142 := new(dm_build_1137) - dm_build_1142.dm_build_838(dm_build_1141, Dm_build_698) - dm_build_1142.dm_build_1138 = dm_build_1141.dm_build_418 - return dm_build_1142 +func dm_build_1426(dm_build_1427 *dm_build_696) *dm_build_1423 { + dm_build_1428 := new(dm_build_1423) + dm_build_1428.dm_build_1123(dm_build_1427, Dm_build_983) + dm_build_1428.dm_build_1424 = dm_build_1427.dm_build_700 + return dm_build_1428 } -func (dm_build_1144 *dm_build_1137) dm_build_819() error { +func (dm_build_1430 *dm_build_1423) dm_build_1104() error { - if dm_build_1144.dm_build_1138.dmConnector.newClientType { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_273(Dm_build_1112, Dm_build_737) + if dm_build_1430.dm_build_1424.dmConnector.newClientType { + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1398, Dm_build_1022) } else { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_273(Dm_build_1112, Dm_build_736) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1398, Dm_build_1021) } - dm_build_1144.dm_build_834.dm_build_417.Dm_build_273(Dm_build_1113, g2dbIsoLevel(dm_build_1144.dm_build_1138.IsoLevel)) - dm_build_1144.dm_build_834.dm_build_417.Dm_build_273(Dm_build_1114, int32(Locale)) - dm_build_1144.dm_build_834.dm_build_417.Dm_build_269(Dm_build_1116, dm_build_1144.dm_build_1138.dmConnector.localTimezone) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1399, g2dbIsoLevel(dm_build_1430.dm_build_1424.IsoLevel)) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1400, int32(Locale)) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_551(Dm_build_1402, dm_build_1430.dm_build_1424.dmConnector.localTimezone) - if dm_build_1144.dm_build_1138.ReadOnly { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1115, Dm_build_761) + if dm_build_1430.dm_build_1424.ReadOnly { + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1401, Dm_build_1046) } else { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1115, Dm_build_760) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1401, Dm_build_1045) } - dm_build_1144.dm_build_834.dm_build_417.Dm_build_273(Dm_build_1117, int32(dm_build_1144.dm_build_1138.dmConnector.sessionTimeout)) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1403, int32(dm_build_1430.dm_build_1424.dmConnector.sessionTimeout)) - if dm_build_1144.dm_build_1138.dmConnector.mppLocal { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1118, 1) + if dm_build_1430.dm_build_1424.dmConnector.mppLocal { + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1404, 1) } else { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1118, 0) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1404, 0) } - if dm_build_1144.dm_build_1138.dmConnector.rwSeparate { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1119, 1) + if dm_build_1430.dm_build_1424.dmConnector.rwSeparate { + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1405, 1) } else { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1119, 0) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1405, 0) } - if dm_build_1144.dm_build_1138.NewLobFlag { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1120, 1) + if dm_build_1430.dm_build_1424.NewLobFlag { + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1406, 1) } else { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1120, 0) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1406, 0) } - dm_build_1144.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1121, dm_build_1144.dm_build_1138.dmConnector.osAuthType) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1407, dm_build_1430.dm_build_1424.dmConnector.osAuthType) - dm_build_1145 := dm_build_1144.dm_build_1138.getServerEncoding() + dm_build_1431 := dm_build_1430.dm_build_1424.getServerEncoding() - if dm_build_1144.dm_build_834.dm_build_424 != "" { + if dm_build_1430.dm_build_1119.dm_build_706 != "" { } - dm_build_1146 := Dm_build_1331.Dm_build_1547(dm_build_1144.dm_build_1138.dmConnector.user, dm_build_1145, dm_build_1144.dm_build_834.dm_build_418) - dm_build_1147 := Dm_build_1331.Dm_build_1547(dm_build_1144.dm_build_1138.dmConnector.password, dm_build_1145, dm_build_1144.dm_build_834.dm_build_418) - if len(dm_build_1146) > Dm_build_734 { + dm_build_1432 := Dm_build_1.Dm_build_217(dm_build_1430.dm_build_1424.dmConnector.user, dm_build_1431, dm_build_1430.dm_build_1119.dm_build_700) + dm_build_1433 := Dm_build_1.Dm_build_217(dm_build_1430.dm_build_1424.dmConnector.password, dm_build_1431, dm_build_1430.dm_build_1119.dm_build_700) + if len(dm_build_1432) > Dm_build_1019 { return ECGO_USERNAME_TOO_LONG.throw() } - if len(dm_build_1147) > Dm_build_734 { + if len(dm_build_1433) > Dm_build_1019 { return ECGO_PASSWORD_TOO_LONG.throw() } - if dm_build_1144.dm_build_834.dm_build_420 && dm_build_1144.dm_build_1138.dmConnector.loginCertificate != "" { + if dm_build_1430.dm_build_1119.dm_build_702 && dm_build_1430.dm_build_1424.dmConnector.loginCertificate != "" { - } else if dm_build_1144.dm_build_834.dm_build_420 { - dm_build_1146 = dm_build_1144.dm_build_834.dm_build_419.Encrypt(dm_build_1146, false) - dm_build_1147 = dm_build_1144.dm_build_834.dm_build_419.Encrypt(dm_build_1147, false) + } else if dm_build_1430.dm_build_1119.dm_build_702 { + dm_build_1432 = dm_build_1430.dm_build_1119.dm_build_701.Encrypt(dm_build_1432, false) + dm_build_1433 = dm_build_1430.dm_build_1119.dm_build_701.Encrypt(dm_build_1433, false) } - dm_build_1144.dm_build_834.dm_build_417.Dm_build_165(dm_build_1146) - dm_build_1144.dm_build_834.dm_build_417.Dm_build_165(dm_build_1147) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_447(dm_build_1432) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_447(dm_build_1433) - dm_build_1144.dm_build_834.dm_build_417.Dm_build_177(dm_build_1144.dm_build_1138.dmConnector.appName, dm_build_1145, dm_build_1144.dm_build_834.dm_build_418) - dm_build_1144.dm_build_834.dm_build_417.Dm_build_177(dm_build_1144.dm_build_1138.dmConnector.osName, dm_build_1145, dm_build_1144.dm_build_834.dm_build_418) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_459(dm_build_1430.dm_build_1424.dmConnector.appName, dm_build_1431, dm_build_1430.dm_build_1119.dm_build_700) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_459(dm_build_1430.dm_build_1424.dmConnector.osName, dm_build_1431, dm_build_1430.dm_build_1119.dm_build_700) if hostName, err := os.Hostname(); err != nil { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_177(hostName, dm_build_1145, dm_build_1144.dm_build_834.dm_build_418) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_459(hostName, dm_build_1431, dm_build_1430.dm_build_1119.dm_build_700) } else { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_177("", dm_build_1145, dm_build_1144.dm_build_834.dm_build_418) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_459("", dm_build_1431, dm_build_1430.dm_build_1119.dm_build_700) } - if dm_build_1144.dm_build_1138.dmConnector.rwStandby { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_121(1) + if dm_build_1430.dm_build_1424.dmConnector.rwStandby { + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_403(1) } else { - dm_build_1144.dm_build_834.dm_build_417.Dm_build_121(0) + dm_build_1430.dm_build_1119.dm_build_699.Dm_build_403(0) } return nil } -func (dm_build_1149 *dm_build_1137) dm_build_823() (interface{}, error) { +func (dm_build_1435 *dm_build_1423) dm_build_1108() (interface{}, error) { - dm_build_1149.dm_build_1138.MaxRowSize = dm_build_1149.dm_build_834.dm_build_417.Dm_build_351(Dm_build_1122) - dm_build_1149.dm_build_1138.DDLAutoCommit = dm_build_1149.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1124) == 1 - dm_build_1149.dm_build_1138.IsoLevel = dm_build_1149.dm_build_834.dm_build_417.Dm_build_351(Dm_build_1125) - dm_build_1149.dm_build_1138.dmConnector.caseSensitive = dm_build_1149.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1126) == 1 - dm_build_1149.dm_build_1138.BackslashEscape = dm_build_1149.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1127) == 1 - dm_build_1149.dm_build_1138.SvrStat = int32(dm_build_1149.dm_build_834.dm_build_417.Dm_build_348(Dm_build_1129)) - dm_build_1149.dm_build_1138.SvrMode = int32(dm_build_1149.dm_build_834.dm_build_417.Dm_build_348(Dm_build_1128)) - dm_build_1149.dm_build_1138.ConstParaOpt = dm_build_1149.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1130) == 1 - dm_build_1149.dm_build_1138.DbTimezone = dm_build_1149.dm_build_834.dm_build_417.Dm_build_348(Dm_build_1131) - dm_build_1149.dm_build_1138.NewLobFlag = dm_build_1149.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1133) == 1 + dm_build_1435.dm_build_1424.MaxRowSize = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1408) + dm_build_1435.dm_build_1424.DDLAutoCommit = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1410) == 1 + dm_build_1435.dm_build_1424.IsoLevel = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1411) + dm_build_1435.dm_build_1424.dmConnector.caseSensitive = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1412) == 1 + dm_build_1435.dm_build_1424.BackslashEscape = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1413) == 1 + dm_build_1435.dm_build_1424.SvrStat = int32(dm_build_1435.dm_build_1119.dm_build_699.Dm_build_630(Dm_build_1415)) + dm_build_1435.dm_build_1424.SvrMode = int32(dm_build_1435.dm_build_1119.dm_build_699.Dm_build_630(Dm_build_1414)) + dm_build_1435.dm_build_1424.ConstParaOpt = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1416) == 1 + dm_build_1435.dm_build_1424.DbTimezone = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_630(Dm_build_1417) + dm_build_1435.dm_build_1424.NewLobFlag = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1419) == 1 - if dm_build_1149.dm_build_1138.dmConnector.bufPrefetch == 0 { - dm_build_1149.dm_build_1138.dmConnector.bufPrefetch = int(dm_build_1149.dm_build_834.dm_build_417.Dm_build_351(Dm_build_1134)) + if dm_build_1435.dm_build_1424.dmConnector.bufPrefetch == 0 { + dm_build_1435.dm_build_1424.dmConnector.bufPrefetch = int(dm_build_1435.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1420)) } - dm_build_1149.dm_build_1138.LifeTimeRemainder = dm_build_1149.dm_build_834.dm_build_417.Dm_build_348(Dm_build_1135) - dm_build_1149.dm_build_1138.dscControl = dm_build_1149.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1136) == 1 + dm_build_1435.dm_build_1424.LifeTimeRemainder = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_630(Dm_build_1421) + dm_build_1435.dm_build_1424.dscControl = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1422) == 1 - dm_build_1150 := dm_build_1149.dm_build_1138.getServerEncoding() + dm_build_1436 := dm_build_1435.dm_build_1424.getServerEncoding() - dm_build_1149.dm_build_1138.InstanceName = dm_build_1149.dm_build_834.dm_build_417.Dm_build_249(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) + dm_build_1435.dm_build_1424.InstanceName = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) - var dm_build_1151 = dm_build_1149.dm_build_834.dm_build_417.Dm_build_207() - if dm_build_1151 == 0 && dm_build_1149.dm_build_1138.MsgVersion > 0 { - dm_build_1149.dm_build_1138.Schema = strings.ToUpper(dm_build_1149.dm_build_1138.dmConnector.user) + var dm_build_1437 = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_489() + if dm_build_1437 == 0 && dm_build_1435.dm_build_1424.MsgVersion > 0 { + dm_build_1435.dm_build_1424.Schema = strings.ToUpper(dm_build_1435.dm_build_1424.dmConnector.user) } else { - dm_build_1149.dm_build_1138.Schema = dm_build_1149.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_1151), dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) + dm_build_1435.dm_build_1424.Schema = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1437), dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) } - dm_build_1149.dm_build_1138.LastLoginIP = dm_build_1149.dm_build_834.dm_build_417.Dm_build_249(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) - dm_build_1149.dm_build_1138.LastLoginTime = dm_build_1149.dm_build_834.dm_build_417.Dm_build_249(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) - dm_build_1149.dm_build_1138.FailedAttempts = dm_build_1149.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1149.dm_build_1138.LoginWarningID = dm_build_1149.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1149.dm_build_1138.GraceTimeRemainder = dm_build_1149.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1149.dm_build_1138.Guid = dm_build_1149.dm_build_834.dm_build_417.Dm_build_249(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) - dm_build_1149.dm_build_1138.DbName = dm_build_1149.dm_build_834.dm_build_417.Dm_build_249(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) + dm_build_1435.dm_build_1424.LastLoginIP = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) + dm_build_1435.dm_build_1424.LastLoginTime = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) + dm_build_1435.dm_build_1424.FailedAttempts = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1435.dm_build_1424.LoginWarningID = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1435.dm_build_1424.GraceTimeRemainder = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1435.dm_build_1424.Guid = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) + dm_build_1435.dm_build_1424.DbName = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) - if dm_build_1149.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1132) == 1 { - dm_build_1149.dm_build_1138.StandbyHost = dm_build_1149.dm_build_834.dm_build_417.Dm_build_249(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) - dm_build_1149.dm_build_1138.StandbyPort = dm_build_1149.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1149.dm_build_1138.StandbyCount = int32(dm_build_1149.dm_build_834.dm_build_417.Dm_build_222()) + if dm_build_1435.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1418) == 1 { + dm_build_1435.dm_build_1424.StandbyHost = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) + dm_build_1435.dm_build_1424.StandbyPort = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1435.dm_build_1424.StandbyCount = int32(dm_build_1435.dm_build_1119.dm_build_699.Dm_build_504()) } - if dm_build_1149.dm_build_834.dm_build_417.Dm_build_100(false) > 0 { - dm_build_1149.dm_build_1138.SessionID = dm_build_1149.dm_build_834.dm_build_417.Dm_build_210() + if dm_build_1435.dm_build_1119.dm_build_699.Dm_build_382(false) > 0 { + dm_build_1435.dm_build_1424.SessionID = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_492() } - if dm_build_1149.dm_build_834.dm_build_417.Dm_build_100(false) > 0 { - if dm_build_1149.dm_build_834.dm_build_417.Dm_build_201() == 1 { + if dm_build_1435.dm_build_1119.dm_build_699.Dm_build_382(false) > 0 { + if dm_build_1435.dm_build_1119.dm_build_699.Dm_build_483() == 1 { - dm_build_1149.dm_build_1138.FormatDate = "DD-MON-YY" + dm_build_1435.dm_build_1424.FormatDate = "DD-MON-YY" - dm_build_1149.dm_build_1138.FormatTime = "HH12.MI.SS.FF6 AM" + dm_build_1435.dm_build_1424.FormatTime = "HH12.MI.SS.FF6 AM" - dm_build_1149.dm_build_1138.FormatTimestamp = "DD-MON-YY HH12.MI.SS.FF6 AM" + dm_build_1435.dm_build_1424.FormatTimestamp = "DD-MON-YY HH12.MI.SS.FF6 AM" - dm_build_1149.dm_build_1138.FormatTimestampTZ = "DD-MON-YY HH12.MI.SS.FF6 AM +TZH:TZM" + dm_build_1435.dm_build_1424.FormatTimestampTZ = "DD-MON-YY HH12.MI.SS.FF6 AM +TZH:TZM" - dm_build_1149.dm_build_1138.FormatTimeTZ = "HH12.MI.SS.FF6 AM +TZH:TZM" + dm_build_1435.dm_build_1424.FormatTimeTZ = "HH12.MI.SS.FF6 AM +TZH:TZM" } } - if dm_build_1149.dm_build_834.dm_build_417.Dm_build_100(false) > 0 { + if dm_build_1435.dm_build_1119.dm_build_699.Dm_build_382(false) > 0 { - format := dm_build_1149.dm_build_834.dm_build_417.Dm_build_253(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) + format := dm_build_1435.dm_build_1119.dm_build_699.Dm_build_535(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) if format != "" { - dm_build_1149.dm_build_1138.FormatDate = format + dm_build_1435.dm_build_1424.FormatDate = format } - format = dm_build_1149.dm_build_834.dm_build_417.Dm_build_253(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) + format = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_535(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) if format != "" { - dm_build_1149.dm_build_1138.FormatTime = format + dm_build_1435.dm_build_1424.FormatTime = format } - format = dm_build_1149.dm_build_834.dm_build_417.Dm_build_253(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) + format = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_535(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) if format != "" { - dm_build_1149.dm_build_1138.FormatTimestamp = format + dm_build_1435.dm_build_1424.FormatTimestamp = format } - format = dm_build_1149.dm_build_834.dm_build_417.Dm_build_253(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) + format = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_535(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) if format != "" { - dm_build_1149.dm_build_1138.FormatTimestampTZ = format + dm_build_1435.dm_build_1424.FormatTimestampTZ = format } - format = dm_build_1149.dm_build_834.dm_build_417.Dm_build_253(dm_build_1150, dm_build_1149.dm_build_834.dm_build_418) + format = dm_build_1435.dm_build_1119.dm_build_699.Dm_build_535(dm_build_1436, dm_build_1435.dm_build_1119.dm_build_700) if format != "" { - dm_build_1149.dm_build_1138.FormatTimeTZ = format + dm_build_1435.dm_build_1424.FormatTimeTZ = format } } @@ -2228,485 +2242,485 @@ func (dm_build_1149 *dm_build_1137) dm_build_823() (interface{}, error) { } const ( - Dm_build_1152 = Dm_build_726 + Dm_build_1438 = Dm_build_1011 ) -type dm_build_1153 struct { - dm_build_941 - dm_build_1154 int16 +type dm_build_1439 struct { + dm_build_1226 + dm_build_1440 int16 } -func dm_build_1155(dm_build_1156 *dm_build_414, dm_build_1157 *DmStatement, dm_build_1158 int16) *dm_build_1153 { - dm_build_1159 := new(dm_build_1153) - dm_build_1159.dm_build_842(dm_build_1156, Dm_build_718, dm_build_1157) - dm_build_1159.dm_build_1154 = dm_build_1158 - return dm_build_1159 +func dm_build_1441(dm_build_1442 *dm_build_696, dm_build_1443 *DmStatement, dm_build_1444 int16) *dm_build_1439 { + dm_build_1445 := new(dm_build_1439) + dm_build_1445.dm_build_1127(dm_build_1442, Dm_build_1003, dm_build_1443) + dm_build_1445.dm_build_1440 = dm_build_1444 + return dm_build_1445 } -func (dm_build_1161 *dm_build_1153) dm_build_819() error { - dm_build_1161.dm_build_834.dm_build_417.Dm_build_269(Dm_build_1152, dm_build_1161.dm_build_1154) +func (dm_build_1447 *dm_build_1439) dm_build_1104() error { + dm_build_1447.dm_build_1119.dm_build_699.Dm_build_551(Dm_build_1438, dm_build_1447.dm_build_1440) return nil } -func (dm_build_1163 *dm_build_1153) dm_build_823() (interface{}, error) { - return dm_build_1163.dm_build_941.dm_build_823() +func (dm_build_1449 *dm_build_1439) dm_build_1108() (interface{}, error) { + return dm_build_1449.dm_build_1226.dm_build_1108() } const ( - Dm_build_1164 = Dm_build_726 - Dm_build_1165 = Dm_build_1164 + USINT_SIZE + Dm_build_1450 = Dm_build_1011 + Dm_build_1451 = Dm_build_1450 + USINT_SIZE ) -type dm_build_1166 struct { - dm_build_1176 - dm_build_1167 []parameter +type dm_build_1452 struct { + dm_build_1462 + dm_build_1453 []parameter } -func dm_build_1168(dm_build_1169 *dm_build_414, dm_build_1170 *DmStatement, dm_build_1171 []parameter) *dm_build_1166 { - dm_build_1172 := new(dm_build_1166) - dm_build_1172.dm_build_842(dm_build_1169, Dm_build_722, dm_build_1170) - dm_build_1172.dm_build_1167 = dm_build_1171 - return dm_build_1172 +func dm_build_1454(dm_build_1455 *dm_build_696, dm_build_1456 *DmStatement, dm_build_1457 []parameter) *dm_build_1452 { + dm_build_1458 := new(dm_build_1452) + dm_build_1458.dm_build_1127(dm_build_1455, Dm_build_1007, dm_build_1456) + dm_build_1458.dm_build_1453 = dm_build_1457 + return dm_build_1458 } -func (dm_build_1174 *dm_build_1166) dm_build_819() error { +func (dm_build_1460 *dm_build_1452) dm_build_1104() error { - if dm_build_1174.dm_build_1167 == nil { - dm_build_1174.dm_build_834.dm_build_417.Dm_build_269(Dm_build_1164, 0) + if dm_build_1460.dm_build_1453 == nil { + dm_build_1460.dm_build_1119.dm_build_699.Dm_build_551(Dm_build_1450, 0) } else { - dm_build_1174.dm_build_834.dm_build_417.Dm_build_269(Dm_build_1164, int16(len(dm_build_1174.dm_build_1167))) + dm_build_1460.dm_build_1119.dm_build_699.Dm_build_551(Dm_build_1450, int16(len(dm_build_1460.dm_build_1453))) } - dm_build_1174.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1165, 0) + dm_build_1460.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1451, 0) - return dm_build_1174.dm_build_966(dm_build_1174.dm_build_1167) + return dm_build_1460.dm_build_1251(dm_build_1460.dm_build_1453) } -const Dm_build_1175 = 38 +const Dm_build_1461 = 38 -type dm_build_1176 struct { - dm_build_941 - dm_build_1177 bool - dm_build_1178 int16 +type dm_build_1462 struct { + dm_build_1226 + dm_build_1463 bool + dm_build_1464 int16 } -func dm_build_1179(dm_build_1180 *dm_build_414, dm_build_1181 *DmStatement, dm_build_1182 bool, dm_build_1183 int16) *dm_build_1176 { - dm_build_1184 := new(dm_build_1176) - dm_build_1184.dm_build_842(dm_build_1180, Dm_build_702, dm_build_1181) - dm_build_1184.dm_build_1177 = dm_build_1182 - dm_build_1184.dm_build_1178 = dm_build_1183 - return dm_build_1184 +func dm_build_1465(dm_build_1466 *dm_build_696, dm_build_1467 *DmStatement, dm_build_1468 bool, dm_build_1469 int16) *dm_build_1462 { + dm_build_1470 := new(dm_build_1462) + dm_build_1470.dm_build_1127(dm_build_1466, Dm_build_987, dm_build_1467) + dm_build_1470.dm_build_1463 = dm_build_1468 + dm_build_1470.dm_build_1464 = dm_build_1469 + return dm_build_1470 } -func (dm_build_1186 *dm_build_1176) dm_build_819() error { +func (dm_build_1472 *dm_build_1462) dm_build_1104() error { - dm_build_1187 := Dm_build_726 + dm_build_1473 := Dm_build_1011 - if dm_build_1186.dm_build_834.dm_build_418.autoCommit { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 1) + if dm_build_1472.dm_build_1119.dm_build_700.autoCommit { + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 1) } else { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 0) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 0) } - if dm_build_1186.dm_build_1177 { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 1) + if dm_build_1472.dm_build_1463 { + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 1) } else { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 0) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 0) } - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 0) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 0) - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 1) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 1) - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 0) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 0) - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_269(dm_build_1187, Dm_build_777) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_551(dm_build_1473, Dm_build_1062) - if dm_build_1186.dm_build_837.maxRows <= 0 || dm_build_1186.dm_build_834.dm_build_418.dmConnector.enRsCache { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_277(dm_build_1187, INT64_MAX) + if dm_build_1472.dm_build_1122.maxRows <= 0 || dm_build_1472.dm_build_1119.dm_build_700.dmConnector.enRsCache { + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_559(dm_build_1473, INT64_MAX) } else { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_277(dm_build_1187, dm_build_1186.dm_build_837.maxRows) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_559(dm_build_1473, dm_build_1472.dm_build_1122.maxRows) } - if dm_build_1186.dm_build_834.dm_build_418.dmConnector.isBdtaRS { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, Dm_build_805) + if dm_build_1472.dm_build_1119.dm_build_700.dmConnector.isBdtaRS { + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, Dm_build_1090) } else { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, Dm_build_804) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, Dm_build_1089) } - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_269(dm_build_1187, 0) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_551(dm_build_1473, 0) - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 1) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 1) - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 0) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 0) - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 0) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 0) - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_273(dm_build_1187, dm_build_1186.dm_build_837.queryTimeout) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_555(dm_build_1473, dm_build_1472.dm_build_1122.queryTimeout) - if dm_build_1186.dm_build_837.innerExec { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 1) + if dm_build_1472.dm_build_1122.innerExec { + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 1) } else { - dm_build_1187 += dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(dm_build_1187, 0) + dm_build_1473 += dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(dm_build_1473, 0) } - if dm_build_1186.dm_build_834.dm_build_418.MsgVersion >= Dm_build_690 { - if dm_build_1186.dm_build_1177 { - dm_build_1186.dm_build_944 = dm_build_1186.dm_build_972() + if dm_build_1472.dm_build_1119.dm_build_700.MsgVersion >= Dm_build_975 { + if dm_build_1472.dm_build_1463 { + dm_build_1472.dm_build_1229 = dm_build_1472.dm_build_1257() } else { - dm_build_1186.dm_build_944 = Dm_build_935 + dm_build_1472.dm_build_1229 = Dm_build_1220 } - dm_build_1186.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1175, byte(dm_build_1186.dm_build_944)) + dm_build_1472.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1461, byte(dm_build_1472.dm_build_1229)) } - dm_build_1186.dm_build_834.dm_build_417.Dm_build_195(dm_build_1186.dm_build_837.nativeSql, dm_build_1186.dm_build_834.dm_build_418.getServerEncoding(), dm_build_1186.dm_build_834.dm_build_418) + dm_build_1472.dm_build_1119.dm_build_699.Dm_build_477(dm_build_1472.dm_build_1122.nativeSql, dm_build_1472.dm_build_1119.dm_build_700.getServerEncoding(), dm_build_1472.dm_build_1119.dm_build_700) return nil } -func (dm_build_1189 *dm_build_1176) dm_build_823() (interface{}, error) { +func (dm_build_1475 *dm_build_1462) dm_build_1108() (interface{}, error) { - if dm_build_1189.dm_build_1177 { - return dm_build_1189.dm_build_941.dm_build_823() + if dm_build_1475.dm_build_1463 { + return dm_build_1475.dm_build_1226.dm_build_1108() } - dm_build_1190 := NewExceInfo() - dm_build_1191 := Dm_build_726 + dm_build_1476 := NewExceInfo() + dm_build_1477 := Dm_build_1011 - dm_build_1190.retSqlType = dm_build_1189.dm_build_834.dm_build_417.Dm_build_348(dm_build_1191) - dm_build_1191 += USINT_SIZE + dm_build_1476.retSqlType = dm_build_1475.dm_build_1119.dm_build_699.Dm_build_630(dm_build_1477) + dm_build_1477 += USINT_SIZE - dm_build_1192 := dm_build_1189.dm_build_834.dm_build_417.Dm_build_366(dm_build_1191) - dm_build_1191 += USINT_SIZE + dm_build_1478 := dm_build_1475.dm_build_1119.dm_build_699.Dm_build_648(dm_build_1477) + dm_build_1477 += USINT_SIZE - dm_build_1193 := dm_build_1189.dm_build_834.dm_build_417.Dm_build_348(dm_build_1191) - dm_build_1191 += USINT_SIZE + dm_build_1479 := dm_build_1475.dm_build_1119.dm_build_699.Dm_build_630(dm_build_1477) + dm_build_1477 += USINT_SIZE - dm_build_1189.dm_build_834.dm_build_417.Dm_build_354(dm_build_1191) - dm_build_1191 += DDWORD_SIZE + dm_build_1475.dm_build_1119.dm_build_699.Dm_build_636(dm_build_1477) + dm_build_1477 += DDWORD_SIZE - dm_build_1189.dm_build_834.dm_build_418.TrxStatus = dm_build_1189.dm_build_834.dm_build_417.Dm_build_351(dm_build_1191) - dm_build_1191 += ULINT_SIZE + dm_build_1475.dm_build_1119.dm_build_700.TrxStatus = dm_build_1475.dm_build_1119.dm_build_699.Dm_build_633(dm_build_1477) + dm_build_1477 += ULINT_SIZE - if dm_build_1192 > 0 { - dm_build_1189.dm_build_837.serverParams = dm_build_1189.dm_build_1194(int(dm_build_1192)) - dm_build_1189.dm_build_837.bindParams = make([]parameter, dm_build_1192) - for i := 0; i < int(dm_build_1192); i++ { - dm_build_1189.dm_build_837.bindParams[i].InitParameter() - dm_build_1189.dm_build_837.bindParams[i].colType = dm_build_1189.dm_build_837.serverParams[i].colType - dm_build_1189.dm_build_837.bindParams[i].prec = dm_build_1189.dm_build_837.serverParams[i].prec - dm_build_1189.dm_build_837.bindParams[i].scale = dm_build_1189.dm_build_837.serverParams[i].scale - dm_build_1189.dm_build_837.bindParams[i].nullable = dm_build_1189.dm_build_837.serverParams[i].nullable - dm_build_1189.dm_build_837.bindParams[i].hasDefault = dm_build_1189.dm_build_837.serverParams[i].hasDefault - dm_build_1189.dm_build_837.bindParams[i].typeFlag = dm_build_1189.dm_build_837.serverParams[i].typeFlag - dm_build_1189.dm_build_837.bindParams[i].lob = dm_build_1189.dm_build_837.serverParams[i].lob - dm_build_1189.dm_build_837.bindParams[i].ioType = dm_build_1189.dm_build_837.serverParams[i].ioType - dm_build_1189.dm_build_837.bindParams[i].name = dm_build_1189.dm_build_837.serverParams[i].name - dm_build_1189.dm_build_837.bindParams[i].typeName = dm_build_1189.dm_build_837.serverParams[i].typeName - dm_build_1189.dm_build_837.bindParams[i].tableName = dm_build_1189.dm_build_837.serverParams[i].tableName - dm_build_1189.dm_build_837.bindParams[i].schemaName = dm_build_1189.dm_build_837.serverParams[i].schemaName - dm_build_1189.dm_build_837.bindParams[i].lobTabId = dm_build_1189.dm_build_837.serverParams[i].lobTabId - dm_build_1189.dm_build_837.bindParams[i].lobColId = dm_build_1189.dm_build_837.serverParams[i].lobColId - dm_build_1189.dm_build_837.bindParams[i].mask = dm_build_1189.dm_build_837.serverParams[i].mask - dm_build_1189.dm_build_837.bindParams[i].typeDescriptor = dm_build_1189.dm_build_837.serverParams[i].typeDescriptor + if dm_build_1478 > 0 { + dm_build_1475.dm_build_1122.serverParams = dm_build_1475.dm_build_1480(int(dm_build_1478)) + dm_build_1475.dm_build_1122.bindParams = make([]parameter, dm_build_1478) + for i := 0; i < int(dm_build_1478); i++ { + dm_build_1475.dm_build_1122.bindParams[i].InitParameter() + dm_build_1475.dm_build_1122.bindParams[i].colType = dm_build_1475.dm_build_1122.serverParams[i].colType + dm_build_1475.dm_build_1122.bindParams[i].prec = dm_build_1475.dm_build_1122.serverParams[i].prec + dm_build_1475.dm_build_1122.bindParams[i].scale = dm_build_1475.dm_build_1122.serverParams[i].scale + dm_build_1475.dm_build_1122.bindParams[i].nullable = dm_build_1475.dm_build_1122.serverParams[i].nullable + dm_build_1475.dm_build_1122.bindParams[i].hasDefault = dm_build_1475.dm_build_1122.serverParams[i].hasDefault + dm_build_1475.dm_build_1122.bindParams[i].typeFlag = dm_build_1475.dm_build_1122.serverParams[i].typeFlag + dm_build_1475.dm_build_1122.bindParams[i].lob = dm_build_1475.dm_build_1122.serverParams[i].lob + dm_build_1475.dm_build_1122.bindParams[i].ioType = dm_build_1475.dm_build_1122.serverParams[i].ioType + dm_build_1475.dm_build_1122.bindParams[i].name = dm_build_1475.dm_build_1122.serverParams[i].name + dm_build_1475.dm_build_1122.bindParams[i].typeName = dm_build_1475.dm_build_1122.serverParams[i].typeName + dm_build_1475.dm_build_1122.bindParams[i].tableName = dm_build_1475.dm_build_1122.serverParams[i].tableName + dm_build_1475.dm_build_1122.bindParams[i].schemaName = dm_build_1475.dm_build_1122.serverParams[i].schemaName + dm_build_1475.dm_build_1122.bindParams[i].lobTabId = dm_build_1475.dm_build_1122.serverParams[i].lobTabId + dm_build_1475.dm_build_1122.bindParams[i].lobColId = dm_build_1475.dm_build_1122.serverParams[i].lobColId + dm_build_1475.dm_build_1122.bindParams[i].mask = dm_build_1475.dm_build_1122.serverParams[i].mask + dm_build_1475.dm_build_1122.bindParams[i].typeDescriptor = dm_build_1475.dm_build_1122.serverParams[i].typeDescriptor } - dm_build_1189.dm_build_837.paramCount = int32(dm_build_1192) + dm_build_1475.dm_build_1122.paramCount = int32(dm_build_1478) } else { - dm_build_1189.dm_build_837.serverParams = make([]parameter, 0) - dm_build_1189.dm_build_837.bindParams = make([]parameter, 0) - dm_build_1189.dm_build_837.paramCount = 0 + dm_build_1475.dm_build_1122.serverParams = make([]parameter, 0) + dm_build_1475.dm_build_1122.bindParams = make([]parameter, 0) + dm_build_1475.dm_build_1122.paramCount = 0 } - if dm_build_1193 > 0 { - dm_build_1189.dm_build_837.columns = dm_build_1189.dm_build_994(int(dm_build_1193), dm_build_1190.rsBdta) + if dm_build_1479 > 0 { + dm_build_1475.dm_build_1122.columns = dm_build_1475.dm_build_1279(int(dm_build_1479), dm_build_1476.rsBdta) } else { - dm_build_1189.dm_build_837.columns = make([]column, 0) + dm_build_1475.dm_build_1122.columns = make([]column, 0) } - return dm_build_1190, nil + return dm_build_1476, nil } -func (dm_build_1195 *dm_build_1176) dm_build_1194(dm_build_1196 int) []parameter { +func (dm_build_1481 *dm_build_1462) dm_build_1480(dm_build_1482 int) []parameter { - var dm_build_1197, dm_build_1198, dm_build_1199, dm_build_1200 int16 + var dm_build_1483, dm_build_1484, dm_build_1485, dm_build_1486 int16 - dm_build_1201 := make([]parameter, dm_build_1196) - for i := 0; i < dm_build_1196; i++ { + dm_build_1487 := make([]parameter, dm_build_1482) + for i := 0; i < dm_build_1482; i++ { - dm_build_1201[i].InitParameter() + dm_build_1487[i].InitParameter() - dm_build_1201[i].colType = dm_build_1195.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1487[i].colType = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_489() - dm_build_1201[i].prec = dm_build_1195.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1487[i].prec = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_489() - dm_build_1201[i].scale = dm_build_1195.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1487[i].scale = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_489() - dm_build_1201[i].nullable = dm_build_1195.dm_build_834.dm_build_417.Dm_build_207() != 0 + dm_build_1487[i].nullable = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_489() != 0 - itemFlag := dm_build_1195.dm_build_834.dm_build_417.Dm_build_204() + itemFlag := dm_build_1481.dm_build_1119.dm_build_699.Dm_build_486() - dm_build_1201[i].hasDefault = int(itemFlag)&Dm_build_934 != 0 + dm_build_1487[i].hasDefault = int(itemFlag)&Dm_build_1219 != 0 - if int(itemFlag)&Dm_build_933 != 0 { - dm_build_1201[i].typeFlag = TYPE_FLAG_RECOMMEND + if int(itemFlag)&Dm_build_1218 != 0 { + dm_build_1487[i].typeFlag = TYPE_FLAG_RECOMMEND } else { - dm_build_1201[i].typeFlag = TYPE_FLAG_EXACT + dm_build_1487[i].typeFlag = TYPE_FLAG_EXACT } - dm_build_1201[i].lob = int(itemFlag)&Dm_build_931 != 0 + dm_build_1487[i].lob = int(itemFlag)&Dm_build_1216 != 0 - dm_build_1195.dm_build_834.dm_build_417.Dm_build_207() + dm_build_1481.dm_build_1119.dm_build_699.Dm_build_489() - dm_build_1201[i].ioType = int8(dm_build_1195.dm_build_834.dm_build_417.Dm_build_204()) + dm_build_1487[i].ioType = int8(dm_build_1481.dm_build_1119.dm_build_699.Dm_build_486()) - dm_build_1197 = dm_build_1195.dm_build_834.dm_build_417.Dm_build_204() + dm_build_1483 = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_486() - dm_build_1198 = dm_build_1195.dm_build_834.dm_build_417.Dm_build_204() + dm_build_1484 = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_486() - dm_build_1199 = dm_build_1195.dm_build_834.dm_build_417.Dm_build_204() + dm_build_1485 = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_486() - dm_build_1200 = dm_build_1195.dm_build_834.dm_build_417.Dm_build_204() - dm_build_1201[i].name = dm_build_1195.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_1197), dm_build_1195.dm_build_834.dm_build_418.getServerEncoding(), dm_build_1195.dm_build_834.dm_build_418) - dm_build_1201[i].typeName = dm_build_1195.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_1198), dm_build_1195.dm_build_834.dm_build_418.getServerEncoding(), dm_build_1195.dm_build_834.dm_build_418) - dm_build_1201[i].tableName = dm_build_1195.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_1199), dm_build_1195.dm_build_834.dm_build_418.getServerEncoding(), dm_build_1195.dm_build_834.dm_build_418) - dm_build_1201[i].schemaName = dm_build_1195.dm_build_834.dm_build_417.Dm_build_244(int(dm_build_1200), dm_build_1195.dm_build_834.dm_build_418.getServerEncoding(), dm_build_1195.dm_build_834.dm_build_418) + dm_build_1486 = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_486() + dm_build_1487[i].name = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1483), dm_build_1481.dm_build_1119.dm_build_700.getServerEncoding(), dm_build_1481.dm_build_1119.dm_build_700) + dm_build_1487[i].typeName = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1484), dm_build_1481.dm_build_1119.dm_build_700.getServerEncoding(), dm_build_1481.dm_build_1119.dm_build_700) + dm_build_1487[i].tableName = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1485), dm_build_1481.dm_build_1119.dm_build_700.getServerEncoding(), dm_build_1481.dm_build_1119.dm_build_700) + dm_build_1487[i].schemaName = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_526(int(dm_build_1486), dm_build_1481.dm_build_1119.dm_build_700.getServerEncoding(), dm_build_1481.dm_build_1119.dm_build_700) - if dm_build_1201[i].lob { - dm_build_1201[i].lobTabId = dm_build_1195.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1201[i].lobColId = dm_build_1195.dm_build_834.dm_build_417.Dm_build_204() + if dm_build_1487[i].lob { + dm_build_1487[i].lobTabId = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1487[i].lobColId = dm_build_1481.dm_build_1119.dm_build_699.Dm_build_486() } - if dm_build_1201[i].colType == DATETIME || dm_build_1201[i].colType == DATETIME2 { - if (dm_build_1201[i].scale & LOCAL_DATETIME_SCALE_MASK) != 0 { + if dm_build_1487[i].colType == DATETIME || dm_build_1487[i].colType == DATETIME2 { + if (dm_build_1487[i].scale & LOCAL_DATETIME_SCALE_MASK) != 0 { - dm_build_1201[i].scale = dm_build_1201[i].scale & ^LOCAL_DATETIME_SCALE_MASK - dm_build_1201[i].mask = MASK_LOCAL_DATETIME - } else if (dm_build_1201[i].scale & ORACLE_DATE_SCALE_MASK) != 0 { + dm_build_1487[i].scale = dm_build_1487[i].scale & ^LOCAL_DATETIME_SCALE_MASK + dm_build_1487[i].mask = MASK_LOCAL_DATETIME + } else if (dm_build_1487[i].scale & ORACLE_DATE_SCALE_MASK) != 0 { - dm_build_1201[i].scale = dm_build_1201[i].scale & ^ORACLE_DATE_SCALE_MASK - dm_build_1201[i].mask = MASK_ORACLE_DATE + dm_build_1487[i].scale = dm_build_1487[i].scale & ^ORACLE_DATE_SCALE_MASK + dm_build_1487[i].mask = MASK_ORACLE_DATE } } - if dm_build_1201[i].colType == DECIMAL && dm_build_1201[i].scale == ORACLE_FLOAT_SCALE_MASK { - dm_build_1201[i].prec = int32(math.Round(float64(dm_build_1201[i].prec)*0.30103) + 1) - dm_build_1201[i].scale = -1 - dm_build_1201[i].mask = MASK_ORACLE_FLOAT + if dm_build_1487[i].colType == DECIMAL && dm_build_1487[i].scale == ORACLE_FLOAT_SCALE_MASK { + dm_build_1487[i].prec = int32(math.Round(float64(dm_build_1487[i].prec)*0.30103) + 1) + dm_build_1487[i].scale = -1 + dm_build_1487[i].mask = MASK_ORACLE_FLOAT } - if dm_build_1201[i].colType == VARCHAR && dm_build_1201[i].prec == BFILE_PREC && dm_build_1201[i].scale == BFILE_SCALE { - dm_build_1201[i].mask = MASK_BFILE + if dm_build_1487[i].colType == VARCHAR && dm_build_1487[i].prec == BFILE_PREC && dm_build_1487[i].scale == BFILE_SCALE { + dm_build_1487[i].mask = MASK_BFILE } } - for i := 0; i < dm_build_1196; i++ { + for i := 0; i < dm_build_1482; i++ { - if isComplexType(int(dm_build_1201[i].colType), int(dm_build_1201[i].scale)) { + if isComplexType(int(dm_build_1487[i].colType), int(dm_build_1487[i].scale)) { - strDesc := newTypeDescriptor(dm_build_1195.dm_build_834.dm_build_418) - _ = strDesc.unpack(dm_build_1195.dm_build_834.dm_build_417) - dm_build_1201[i].typeDescriptor = strDesc + strDesc := newTypeDescriptor(dm_build_1481.dm_build_1119.dm_build_700) + _ = strDesc.unpack(dm_build_1481.dm_build_1119.dm_build_699) + dm_build_1487[i].typeDescriptor = strDesc } } - return dm_build_1201 + return dm_build_1487 } const ( - Dm_build_1202 = Dm_build_726 + Dm_build_1488 = Dm_build_1011 ) -type dm_build_1203 struct { - dm_build_833 - dm_build_1204 int16 - dm_build_1205 *Dm_build_0 - dm_build_1206 int32 +type dm_build_1489 struct { + dm_build_1118 + dm_build_1490 int16 + dm_build_1491 *Dm_build_282 + dm_build_1492 int32 } -func dm_build_1207(dm_build_1208 *dm_build_414, dm_build_1209 *DmStatement, dm_build_1210 int16, dm_build_1211 *Dm_build_0, dm_build_1212 int32) *dm_build_1203 { - dm_build_1213 := new(dm_build_1203) - dm_build_1213.dm_build_842(dm_build_1208, Dm_build_708, dm_build_1209) - dm_build_1213.dm_build_1204 = dm_build_1210 - dm_build_1213.dm_build_1205 = dm_build_1211 - dm_build_1213.dm_build_1206 = dm_build_1212 - return dm_build_1213 +func dm_build_1493(dm_build_1494 *dm_build_696, dm_build_1495 *DmStatement, dm_build_1496 int16, dm_build_1497 *Dm_build_282, dm_build_1498 int32) *dm_build_1489 { + dm_build_1499 := new(dm_build_1489) + dm_build_1499.dm_build_1127(dm_build_1494, Dm_build_993, dm_build_1495) + dm_build_1499.dm_build_1490 = dm_build_1496 + dm_build_1499.dm_build_1491 = dm_build_1497 + dm_build_1499.dm_build_1492 = dm_build_1498 + return dm_build_1499 } -func (dm_build_1215 *dm_build_1203) dm_build_819() error { - dm_build_1215.dm_build_834.dm_build_417.Dm_build_269(Dm_build_1202, dm_build_1215.dm_build_1204) +func (dm_build_1501 *dm_build_1489) dm_build_1104() error { + dm_build_1501.dm_build_1119.dm_build_699.Dm_build_551(Dm_build_1488, dm_build_1501.dm_build_1490) - dm_build_1215.dm_build_834.dm_build_417.Dm_build_133(dm_build_1215.dm_build_1206) + dm_build_1501.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1501.dm_build_1492) - if dm_build_1215.dm_build_834.dm_build_418.NewLobFlag { - dm_build_1215.dm_build_834.dm_build_417.Dm_build_133(-1) + if dm_build_1501.dm_build_1119.dm_build_700.NewLobFlag { + dm_build_1501.dm_build_1119.dm_build_699.Dm_build_415(-1) } - dm_build_1215.dm_build_1205.Dm_build_7(dm_build_1215.dm_build_834.dm_build_417, int(dm_build_1215.dm_build_1206)) + dm_build_1501.dm_build_1491.Dm_build_289(dm_build_1501.dm_build_1119.dm_build_699, int(dm_build_1501.dm_build_1492)) return nil } -type dm_build_1216 struct { - dm_build_833 +type dm_build_1502 struct { + dm_build_1118 } -func dm_build_1217(dm_build_1218 *dm_build_414) *dm_build_1216 { - dm_build_1219 := new(dm_build_1216) - dm_build_1219.dm_build_838(dm_build_1218, Dm_build_706) - return dm_build_1219 +func dm_build_1503(dm_build_1504 *dm_build_696) *dm_build_1502 { + dm_build_1505 := new(dm_build_1502) + dm_build_1505.dm_build_1123(dm_build_1504, Dm_build_991) + return dm_build_1505 } -type dm_build_1220 struct { - dm_build_833 - dm_build_1221 int32 +type dm_build_1506 struct { + dm_build_1118 + dm_build_1507 int32 } -func dm_build_1222(dm_build_1223 *dm_build_414, dm_build_1224 int32) *dm_build_1220 { - dm_build_1225 := new(dm_build_1220) - dm_build_1225.dm_build_838(dm_build_1223, Dm_build_719) - dm_build_1225.dm_build_1221 = dm_build_1224 - return dm_build_1225 +func dm_build_1508(dm_build_1509 *dm_build_696, dm_build_1510 int32) *dm_build_1506 { + dm_build_1511 := new(dm_build_1506) + dm_build_1511.dm_build_1123(dm_build_1509, Dm_build_1004) + dm_build_1511.dm_build_1507 = dm_build_1510 + return dm_build_1511 } -func (dm_build_1227 *dm_build_1220) dm_build_819() error { +func (dm_build_1513 *dm_build_1506) dm_build_1104() error { - dm_build_1228 := Dm_build_726 - dm_build_1228 += dm_build_1227.dm_build_834.dm_build_417.Dm_build_273(dm_build_1228, g2dbIsoLevel(dm_build_1227.dm_build_1221)) + dm_build_1514 := Dm_build_1011 + dm_build_1514 += dm_build_1513.dm_build_1119.dm_build_699.Dm_build_555(dm_build_1514, g2dbIsoLevel(dm_build_1513.dm_build_1507)) return nil } -type dm_build_1229 struct { - dm_build_833 - dm_build_1230 *lob - dm_build_1231 byte - dm_build_1232 int - dm_build_1233 []byte - dm_build_1234 int - dm_build_1235 int -} - -func dm_build_1236(dm_build_1237 *dm_build_414, dm_build_1238 *lob, dm_build_1239 byte, dm_build_1240 int, dm_build_1241 []byte, - dm_build_1242 int, dm_build_1243 int) *dm_build_1229 { - dm_build_1244 := new(dm_build_1229) - dm_build_1244.dm_build_838(dm_build_1237, Dm_build_715) - dm_build_1244.dm_build_1230 = dm_build_1238 - dm_build_1244.dm_build_1231 = dm_build_1239 - dm_build_1244.dm_build_1232 = dm_build_1240 - dm_build_1244.dm_build_1233 = dm_build_1241 - dm_build_1244.dm_build_1234 = dm_build_1242 - dm_build_1244.dm_build_1235 = dm_build_1243 - return dm_build_1244 -} - -func (dm_build_1246 *dm_build_1229) dm_build_819() error { - - dm_build_1246.dm_build_834.dm_build_417.Dm_build_121(byte(dm_build_1246.dm_build_1230.lobFlag)) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_121(dm_build_1246.dm_build_1231) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_149(uint64(dm_build_1246.dm_build_1230.blobId)) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_129(dm_build_1246.dm_build_1230.groupId) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_129(dm_build_1246.dm_build_1230.fileId) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_133(dm_build_1246.dm_build_1230.pageNo) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_129(dm_build_1246.dm_build_1230.curFileId) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_133(dm_build_1246.dm_build_1230.curPageNo) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_133(dm_build_1246.dm_build_1230.totalOffset) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_133(dm_build_1246.dm_build_1230.tabId) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_129(dm_build_1246.dm_build_1230.colId) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_149(uint64(dm_build_1246.dm_build_1230.rowId)) - - dm_build_1246.dm_build_834.dm_build_417.Dm_build_133(int32(dm_build_1246.dm_build_1232)) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_133(int32(dm_build_1246.dm_build_1235)) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_161(dm_build_1246.dm_build_1233) - - if dm_build_1246.dm_build_834.dm_build_418.NewLobFlag { - dm_build_1246.dm_build_834.dm_build_417.Dm_build_129(dm_build_1246.dm_build_1230.exGroupId) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_129(dm_build_1246.dm_build_1230.exFileId) - dm_build_1246.dm_build_834.dm_build_417.Dm_build_133(dm_build_1246.dm_build_1230.exPageNo) +type dm_build_1515 struct { + dm_build_1118 + dm_build_1516 *lob + dm_build_1517 byte + dm_build_1518 int + dm_build_1519 []byte + dm_build_1520 int + dm_build_1521 int +} + +func dm_build_1522(dm_build_1523 *dm_build_696, dm_build_1524 *lob, dm_build_1525 byte, dm_build_1526 int, dm_build_1527 []byte, + dm_build_1528 int, dm_build_1529 int) *dm_build_1515 { + dm_build_1530 := new(dm_build_1515) + dm_build_1530.dm_build_1123(dm_build_1523, Dm_build_1000) + dm_build_1530.dm_build_1516 = dm_build_1524 + dm_build_1530.dm_build_1517 = dm_build_1525 + dm_build_1530.dm_build_1518 = dm_build_1526 + dm_build_1530.dm_build_1519 = dm_build_1527 + dm_build_1530.dm_build_1520 = dm_build_1528 + dm_build_1530.dm_build_1521 = dm_build_1529 + return dm_build_1530 +} + +func (dm_build_1532 *dm_build_1515) dm_build_1104() error { + + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_403(byte(dm_build_1532.dm_build_1516.lobFlag)) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_403(dm_build_1532.dm_build_1517) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_431(uint64(dm_build_1532.dm_build_1516.blobId)) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1532.dm_build_1516.groupId) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1532.dm_build_1516.fileId) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1532.dm_build_1516.pageNo) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1532.dm_build_1516.curFileId) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1532.dm_build_1516.curPageNo) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1532.dm_build_1516.totalOffset) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1532.dm_build_1516.tabId) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1532.dm_build_1516.colId) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_431(uint64(dm_build_1532.dm_build_1516.rowId)) + + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_415(int32(dm_build_1532.dm_build_1518)) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_415(int32(dm_build_1532.dm_build_1521)) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_443(dm_build_1532.dm_build_1519) + + if dm_build_1532.dm_build_1119.dm_build_700.NewLobFlag { + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1532.dm_build_1516.exGroupId) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_411(dm_build_1532.dm_build_1516.exFileId) + dm_build_1532.dm_build_1119.dm_build_699.Dm_build_415(dm_build_1532.dm_build_1516.exPageNo) } return nil } -func (dm_build_1248 *dm_build_1229) dm_build_823() (interface{}, error) { +func (dm_build_1534 *dm_build_1515) dm_build_1108() (interface{}, error) { - var dm_build_1249 = dm_build_1248.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1248.dm_build_1230.blobId = dm_build_1248.dm_build_834.dm_build_417.Dm_build_210() - dm_build_1248.dm_build_1230.fileId = dm_build_1248.dm_build_834.dm_build_417.Dm_build_204() - dm_build_1248.dm_build_1230.pageNo = dm_build_1248.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1248.dm_build_1230.curFileId = dm_build_1248.dm_build_834.dm_build_417.Dm_build_204() - dm_build_1248.dm_build_1230.curPageNo = dm_build_1248.dm_build_834.dm_build_417.Dm_build_207() - dm_build_1248.dm_build_1230.totalOffset = dm_build_1248.dm_build_834.dm_build_417.Dm_build_207() - return dm_build_1249, nil + var dm_build_1535 = dm_build_1534.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1534.dm_build_1516.blobId = dm_build_1534.dm_build_1119.dm_build_699.Dm_build_492() + dm_build_1534.dm_build_1516.fileId = dm_build_1534.dm_build_1119.dm_build_699.Dm_build_486() + dm_build_1534.dm_build_1516.pageNo = dm_build_1534.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1534.dm_build_1516.curFileId = dm_build_1534.dm_build_1119.dm_build_699.Dm_build_486() + dm_build_1534.dm_build_1516.curPageNo = dm_build_1534.dm_build_1119.dm_build_699.Dm_build_489() + dm_build_1534.dm_build_1516.totalOffset = dm_build_1534.dm_build_1119.dm_build_699.Dm_build_489() + return dm_build_1535, nil } const ( - Dm_build_1250 = Dm_build_726 + Dm_build_1536 = Dm_build_1011 - Dm_build_1251 = Dm_build_1250 + ULINT_SIZE + Dm_build_1537 = Dm_build_1536 + ULINT_SIZE - Dm_build_1252 = Dm_build_1251 + ULINT_SIZE + Dm_build_1538 = Dm_build_1537 + ULINT_SIZE - Dm_build_1253 = Dm_build_1252 + BYTE_SIZE + Dm_build_1539 = Dm_build_1538 + BYTE_SIZE - Dm_build_1254 = Dm_build_1253 + BYTE_SIZE + Dm_build_1540 = Dm_build_1539 + BYTE_SIZE - Dm_build_1255 = Dm_build_1254 + BYTE_SIZE + Dm_build_1541 = Dm_build_1540 + BYTE_SIZE - Dm_build_1256 = Dm_build_1255 + BYTE_SIZE + Dm_build_1542 = Dm_build_1541 + BYTE_SIZE - Dm_build_1257 = Dm_build_1256 + BYTE_SIZE + Dm_build_1543 = Dm_build_1542 + BYTE_SIZE - Dm_build_1258 = Dm_build_1257 + BYTE_SIZE + Dm_build_1544 = Dm_build_1543 + BYTE_SIZE - Dm_build_1259 = Dm_build_1258 + BYTE_SIZE + Dm_build_1545 = Dm_build_1544 + BYTE_SIZE - Dm_build_1260 = Dm_build_726 + Dm_build_1546 = Dm_build_1011 - Dm_build_1261 = Dm_build_1260 + ULINT_SIZE + Dm_build_1547 = Dm_build_1546 + ULINT_SIZE - Dm_build_1262 = Dm_build_1261 + ULINT_SIZE + Dm_build_1548 = Dm_build_1547 + ULINT_SIZE - Dm_build_1263 = Dm_build_1262 + ULINT_SIZE + Dm_build_1549 = Dm_build_1548 + ULINT_SIZE - Dm_build_1264 = Dm_build_1263 + ULINT_SIZE + Dm_build_1550 = Dm_build_1549 + ULINT_SIZE - Dm_build_1265 = Dm_build_1264 + ULINT_SIZE + Dm_build_1551 = Dm_build_1550 + ULINT_SIZE - Dm_build_1266 = Dm_build_1265 + BYTE_SIZE + Dm_build_1552 = Dm_build_1551 + BYTE_SIZE - Dm_build_1267 = Dm_build_1266 + BYTE_SIZE + Dm_build_1553 = Dm_build_1552 + BYTE_SIZE - Dm_build_1268 = Dm_build_1267 + BYTE_SIZE + Dm_build_1554 = Dm_build_1553 + BYTE_SIZE - Dm_build_1269 = Dm_build_1268 + BYTE_SIZE + Dm_build_1555 = Dm_build_1554 + BYTE_SIZE - Dm_build_1270 = Dm_build_1269 + BYTE_SIZE + Dm_build_1556 = Dm_build_1555 + BYTE_SIZE - Dm_build_1271 = Dm_build_1270 + USINT_SIZE + Dm_build_1557 = Dm_build_1556 + USINT_SIZE - Dm_build_1272 = Dm_build_1271 + BYTE_SIZE + Dm_build_1558 = Dm_build_1557 + BYTE_SIZE ) -type dm_build_1273 struct { - dm_build_833 - dm_build_1274 *DmConnection - dm_build_1275 int - Dm_build_1276 int32 - Dm_build_1277 []byte - dm_build_1278 byte +type dm_build_1559 struct { + dm_build_1118 + dm_build_1560 *DmConnection + dm_build_1561 int + Dm_build_1562 int32 + Dm_build_1563 []byte + dm_build_1564 byte } -func dm_build_1279(dm_build_1280 *dm_build_414) *dm_build_1273 { - dm_build_1281 := new(dm_build_1273) - dm_build_1281.dm_build_838(dm_build_1280, Dm_build_724) - dm_build_1281.dm_build_1274 = dm_build_1280.dm_build_418 - return dm_build_1281 +func dm_build_1565(dm_build_1566 *dm_build_696) *dm_build_1559 { + dm_build_1567 := new(dm_build_1559) + dm_build_1567.dm_build_1123(dm_build_1566, Dm_build_1009) + dm_build_1567.dm_build_1560 = dm_build_1566.dm_build_700 + return dm_build_1567 } -func dm_build_1282(dm_build_1283 string, dm_build_1284 string) int { - dm_build_1285 := strings.Split(dm_build_1283, ".") - dm_build_1286 := strings.Split(dm_build_1284, ".") +func dm_build_1568(dm_build_1569 string, dm_build_1570 string) int { + dm_build_1571 := strings.Split(dm_build_1569, ".") + dm_build_1572 := strings.Split(dm_build_1570, ".") - for i, serStr := range dm_build_1285 { + for i, serStr := range dm_build_1571 { ser, _ := strconv.ParseInt(serStr, 10, 32) - global, _ := strconv.ParseInt(dm_build_1286[i], 10, 32) + global, _ := strconv.ParseInt(dm_build_1572[i], 10, 32) if ser < global { return -1 } else if ser == global { @@ -2719,221 +2733,221 @@ func dm_build_1282(dm_build_1283 string, dm_build_1284 string) int { return 0 } -func (dm_build_1288 *dm_build_1273) dm_build_819() error { +func (dm_build_1574 *dm_build_1559) dm_build_1104() error { - dm_build_1288.dm_build_834.dm_build_417.Dm_build_273(Dm_build_1250, int32(0)) - dm_build_1288.dm_build_834.dm_build_417.Dm_build_273(Dm_build_1251, int32(dm_build_1288.dm_build_1274.dmConnector.compress)) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1536, int32(0)) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1537, int32(dm_build_1574.dm_build_1560.dmConnector.compress)) - if dm_build_1288.dm_build_1274.dmConnector.loginEncrypt { - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1253, 2) - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1252, 1) + if dm_build_1574.dm_build_1560.dmConnector.loginEncrypt { + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1539, 2) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1538, 1) } else { - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1253, 0) - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1252, 0) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1539, 0) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1538, 0) } - if dm_build_1288.dm_build_1274.dmConnector.isBdtaRS { - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1254, Dm_build_805) + if dm_build_1574.dm_build_1560.dmConnector.isBdtaRS { + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1540, Dm_build_1090) } else { - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1254, Dm_build_804) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1540, Dm_build_1089) } - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1255, byte(dm_build_1288.dm_build_1274.dmConnector.compressID)) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1541, byte(dm_build_1574.dm_build_1560.dmConnector.compressID)) - if dm_build_1288.dm_build_1274.dmConnector.loginCertificate != "" { - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1256, 1) + if dm_build_1574.dm_build_1560.dmConnector.loginCertificate != "" { + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1542, 1) } else { - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1256, 0) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1542, 0) } - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1257, 0) - dm_build_1288.dm_build_834.dm_build_417.Dm_build_265(Dm_build_1258, 1) - dm_build_1288.dm_build_834.dm_build_417.Dm_build_293(Dm_build_1259, uint16(dm_build_1288.dm_build_1274.MsgVersion)) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1543, 0) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1544, 1) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_575(Dm_build_1545, uint16(dm_build_1574.dm_build_1560.MsgVersion)) - dm_build_1289 := dm_build_1288.dm_build_1274.getServerEncoding() - dm_build_1288.dm_build_834.dm_build_417.Dm_build_177(Dm_build_682, dm_build_1289, dm_build_1288.dm_build_834.dm_build_418) + dm_build_1575 := dm_build_1574.dm_build_1560.getServerEncoding() + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_459(Dm_build_967, dm_build_1575, dm_build_1574.dm_build_1119.dm_build_700) - var dm_build_1290 byte - if dm_build_1288.dm_build_1274.dmConnector.uKeyName != "" { - dm_build_1290 = 1 + var dm_build_1576 byte + if dm_build_1574.dm_build_1560.dmConnector.uKeyName != "" { + dm_build_1576 = 1 } else { - dm_build_1290 = 0 + dm_build_1576 = 0 } - dm_build_1288.dm_build_834.dm_build_417.Dm_build_121(0) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_403(0) - if dm_build_1290 == 1 { + if dm_build_1576 == 1 { } - if dm_build_1288.dm_build_1274.dmConnector.loginEncrypt { - clientPubKey, err := dm_build_1288.dm_build_834.dm_build_662() + if dm_build_1574.dm_build_1560.dmConnector.loginEncrypt { + clientPubKey, err := dm_build_1574.dm_build_1119.dm_build_947() if err != nil { return err } - dm_build_1288.dm_build_834.dm_build_417.Dm_build_165(clientPubKey) + dm_build_1574.dm_build_1119.dm_build_699.Dm_build_447(clientPubKey) } return nil } -func (dm_build_1292 *dm_build_1273) dm_build_822() error { - dm_build_1292.dm_build_834.dm_build_417.Dm_build_95(0) - dm_build_1292.dm_build_834.dm_build_417.Dm_build_103(Dm_build_725, false, true) +func (dm_build_1578 *dm_build_1559) dm_build_1107() error { + dm_build_1578.dm_build_1119.dm_build_699.Dm_build_377(0) + dm_build_1578.dm_build_1119.dm_build_699.Dm_build_385(Dm_build_1010, false, true) return nil } -func (dm_build_1294 *dm_build_1273) dm_build_823() (interface{}, error) { +func (dm_build_1580 *dm_build_1559) dm_build_1108() (interface{}, error) { - dm_build_1294.dm_build_1274.sslEncrypt = int(dm_build_1294.dm_build_834.dm_build_417.Dm_build_351(Dm_build_1260)) - dm_build_1294.dm_build_1274.GlobalServerSeries = int(dm_build_1294.dm_build_834.dm_build_417.Dm_build_351(Dm_build_1261)) + dm_build_1580.dm_build_1560.sslEncrypt = int(dm_build_1580.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1546)) + dm_build_1580.dm_build_1560.GlobalServerSeries = int(dm_build_1580.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1547)) - switch dm_build_1294.dm_build_834.dm_build_417.Dm_build_351(Dm_build_1262) { + switch dm_build_1580.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1548) { case 1: - dm_build_1294.dm_build_1274.serverEncoding = ENCODING_UTF8 + dm_build_1580.dm_build_1560.serverEncoding = ENCODING_UTF8 case 2: - dm_build_1294.dm_build_1274.serverEncoding = ENCODING_EUCKR + dm_build_1580.dm_build_1560.serverEncoding = ENCODING_EUCKR default: - dm_build_1294.dm_build_1274.serverEncoding = ENCODING_GB18030 + dm_build_1580.dm_build_1560.serverEncoding = ENCODING_GB18030 } - dm_build_1294.dm_build_1274.dmConnector.compress = int(dm_build_1294.dm_build_834.dm_build_417.Dm_build_351(Dm_build_1263)) - dm_build_1295 := dm_build_1294.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1265) - dm_build_1296 := dm_build_1294.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1266) - dm_build_1294.dm_build_1274.dmConnector.isBdtaRS = dm_build_1294.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1267) > 0 - dm_build_1294.dm_build_1274.dmConnector.compressID = int8(dm_build_1294.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1268)) + dm_build_1580.dm_build_1560.dmConnector.compress = int(dm_build_1580.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1549)) + dm_build_1581 := dm_build_1580.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1551) + dm_build_1582 := dm_build_1580.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1552) + dm_build_1580.dm_build_1560.dmConnector.isBdtaRS = dm_build_1580.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1553) > 0 + dm_build_1580.dm_build_1560.dmConnector.compressID = int8(dm_build_1580.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1554)) - dm_build_1294.dm_build_834.dm_build_423 = dm_build_1294.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1270) == 1 - dm_build_1294.dm_build_1274.dmConnector.newClientType = dm_build_1294.dm_build_834.dm_build_417.Dm_build_345(Dm_build_1271) == 1 - dm_build_1294.dm_build_1274.MsgVersion = int32(dm_build_1294.dm_build_834.dm_build_417.Dm_build_366(Dm_build_1272)) + dm_build_1580.dm_build_1119.dm_build_705 = dm_build_1580.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1556) == 1 + dm_build_1580.dm_build_1560.dmConnector.newClientType = dm_build_1580.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1557) == 1 + dm_build_1580.dm_build_1560.MsgVersion = int32(dm_build_1580.dm_build_1119.dm_build_699.Dm_build_648(Dm_build_1558)) - dm_build_1297 := dm_build_1294.dm_build_866() - if dm_build_1297 != nil { - return nil, dm_build_1297 + dm_build_1583 := dm_build_1580.dm_build_1151() + if dm_build_1583 != nil { + return nil, dm_build_1583 } - dm_build_1298 := dm_build_1294.dm_build_834.dm_build_417.Dm_build_249(dm_build_1294.dm_build_1274.getServerEncoding(), dm_build_1294.dm_build_834.dm_build_418) - if dm_build_1282(dm_build_1298, Dm_build_683) < 0 { + dm_build_1584 := dm_build_1580.dm_build_1119.dm_build_699.Dm_build_531(dm_build_1580.dm_build_1560.getServerEncoding(), dm_build_1580.dm_build_1119.dm_build_700) + if dm_build_1568(dm_build_1584, Dm_build_968) < 0 { return nil, ECGO_ERROR_SERVER_VERSION.throw() } - dm_build_1294.dm_build_1274.ServerVersion = dm_build_1298 - dm_build_1294.dm_build_1274.Malini2 = dm_build_1282(dm_build_1298, Dm_build_684) > 0 - dm_build_1294.dm_build_1274.Execute2 = dm_build_1282(dm_build_1298, Dm_build_685) > 0 - dm_build_1294.dm_build_1274.LobEmptyCompOrcl = dm_build_1282(dm_build_1298, Dm_build_686) > 0 + dm_build_1580.dm_build_1560.ServerVersion = dm_build_1584 + dm_build_1580.dm_build_1560.Malini2 = dm_build_1568(dm_build_1584, Dm_build_969) > 0 + dm_build_1580.dm_build_1560.Execute2 = dm_build_1568(dm_build_1584, Dm_build_970) > 0 + dm_build_1580.dm_build_1560.LobEmptyCompOrcl = dm_build_1568(dm_build_1584, Dm_build_971) > 0 - if dm_build_1294.dm_build_834.dm_build_418.dmConnector.uKeyName != "" { - dm_build_1294.dm_build_1278 = 1 + if dm_build_1580.dm_build_1119.dm_build_700.dmConnector.uKeyName != "" { + dm_build_1580.dm_build_1564 = 1 } else { - dm_build_1294.dm_build_1278 = 0 + dm_build_1580.dm_build_1564 = 0 } - if dm_build_1294.dm_build_1278 == 1 { - dm_build_1294.dm_build_834.dm_build_424 = dm_build_1294.dm_build_834.dm_build_417.Dm_build_244(16, dm_build_1294.dm_build_1274.getServerEncoding(), dm_build_1294.dm_build_834.dm_build_418) + if dm_build_1580.dm_build_1564 == 1 { + dm_build_1580.dm_build_1119.dm_build_706 = dm_build_1580.dm_build_1119.dm_build_699.Dm_build_526(16, dm_build_1580.dm_build_1560.getServerEncoding(), dm_build_1580.dm_build_1119.dm_build_700) } - dm_build_1294.dm_build_1275 = -1 - dm_build_1299 := false - dm_build_1300 := false - dm_build_1294.Dm_build_1276 = -1 - if dm_build_1296 > 0 { - dm_build_1294.dm_build_1275 = int(dm_build_1294.dm_build_834.dm_build_417.Dm_build_207()) + dm_build_1580.dm_build_1561 = -1 + dm_build_1585 := false + dm_build_1586 := false + dm_build_1580.Dm_build_1562 = -1 + if dm_build_1582 > 0 { + dm_build_1580.dm_build_1561 = int(dm_build_1580.dm_build_1119.dm_build_699.Dm_build_489()) } - if dm_build_1295 > 0 { + if dm_build_1581 > 0 { - if dm_build_1294.dm_build_1275 == -1 { - dm_build_1299 = true + if dm_build_1580.dm_build_1561 == -1 { + dm_build_1585 = true } else { - dm_build_1300 = true + dm_build_1586 = true } - dm_build_1294.Dm_build_1277 = dm_build_1294.dm_build_834.dm_build_417.Dm_build_232() + dm_build_1580.Dm_build_1563 = dm_build_1580.dm_build_1119.dm_build_699.Dm_build_514() } - if dm_build_1296 == 2 { - dm_build_1294.Dm_build_1276 = dm_build_1294.dm_build_834.dm_build_417.Dm_build_207() + if dm_build_1582 == 2 { + dm_build_1580.Dm_build_1562 = dm_build_1580.dm_build_1119.dm_build_699.Dm_build_489() } - dm_build_1294.dm_build_834.dm_build_420 = dm_build_1299 - dm_build_1294.dm_build_834.dm_build_421 = dm_build_1300 + dm_build_1580.dm_build_1119.dm_build_702 = dm_build_1585 + dm_build_1580.dm_build_1119.dm_build_703 = dm_build_1586 return nil, nil } -type dm_build_1301 struct { - dm_build_833 +type dm_build_1587 struct { + dm_build_1118 } -func dm_build_1302(dm_build_1303 *dm_build_414, dm_build_1304 *DmStatement) *dm_build_1301 { - dm_build_1305 := new(dm_build_1301) - dm_build_1305.dm_build_842(dm_build_1303, Dm_build_700, dm_build_1304) - return dm_build_1305 +func dm_build_1588(dm_build_1589 *dm_build_696, dm_build_1590 *DmStatement) *dm_build_1587 { + dm_build_1591 := new(dm_build_1587) + dm_build_1591.dm_build_1127(dm_build_1589, Dm_build_985, dm_build_1590) + return dm_build_1591 } -func (dm_build_1307 *dm_build_1301) dm_build_819() error { +func (dm_build_1593 *dm_build_1587) dm_build_1104() error { - dm_build_1307.dm_build_834.dm_build_417.Dm_build_265(Dm_build_726, 1) + dm_build_1593.dm_build_1119.dm_build_699.Dm_build_547(Dm_build_1011, 1) return nil } -func (dm_build_1309 *dm_build_1301) dm_build_823() (interface{}, error) { +func (dm_build_1595 *dm_build_1587) dm_build_1108() (interface{}, error) { - dm_build_1309.dm_build_837.id = dm_build_1309.dm_build_834.dm_build_417.Dm_build_351(Dm_build_727) + dm_build_1595.dm_build_1122.id = dm_build_1595.dm_build_1119.dm_build_699.Dm_build_633(Dm_build_1012) - dm_build_1309.dm_build_837.readBaseColName = dm_build_1309.dm_build_834.dm_build_417.Dm_build_345(Dm_build_726) == 1 + dm_build_1595.dm_build_1122.readBaseColName = dm_build_1595.dm_build_1119.dm_build_699.Dm_build_627(Dm_build_1011) == 1 return nil, nil } -type dm_build_1310 struct { - dm_build_833 - dm_build_1311 int32 +type dm_build_1596 struct { + dm_build_1118 + dm_build_1597 int32 } -func dm_build_1312(dm_build_1313 *dm_build_414, dm_build_1314 int32) *dm_build_1310 { - dm_build_1315 := new(dm_build_1310) - dm_build_1315.dm_build_838(dm_build_1313, Dm_build_701) - dm_build_1315.dm_build_1311 = dm_build_1314 - return dm_build_1315 +func dm_build_1598(dm_build_1599 *dm_build_696, dm_build_1600 int32) *dm_build_1596 { + dm_build_1601 := new(dm_build_1596) + dm_build_1601.dm_build_1123(dm_build_1599, Dm_build_986) + dm_build_1601.dm_build_1597 = dm_build_1600 + return dm_build_1601 } -func (dm_build_1317 *dm_build_1310) dm_build_820() { - dm_build_1317.dm_build_833.dm_build_820() - dm_build_1317.dm_build_834.dm_build_417.Dm_build_273(Dm_build_727, dm_build_1317.dm_build_1311) +func (dm_build_1603 *dm_build_1596) dm_build_1105() { + dm_build_1603.dm_build_1118.dm_build_1105() + dm_build_1603.dm_build_1119.dm_build_699.Dm_build_555(Dm_build_1012, dm_build_1603.dm_build_1597) } -type dm_build_1318 struct { - dm_build_833 - dm_build_1319 []uint32 +type dm_build_1604 struct { + dm_build_1118 + dm_build_1605 []uint32 } -func dm_build_1320(dm_build_1321 *dm_build_414, dm_build_1322 []uint32) *dm_build_1318 { - dm_build_1323 := new(dm_build_1318) - dm_build_1323.dm_build_838(dm_build_1321, Dm_build_721) - dm_build_1323.dm_build_1319 = dm_build_1322 - return dm_build_1323 +func dm_build_1606(dm_build_1607 *dm_build_696, dm_build_1608 []uint32) *dm_build_1604 { + dm_build_1609 := new(dm_build_1604) + dm_build_1609.dm_build_1123(dm_build_1607, Dm_build_1006) + dm_build_1609.dm_build_1605 = dm_build_1608 + return dm_build_1609 } -func (dm_build_1325 *dm_build_1318) dm_build_819() error { +func (dm_build_1611 *dm_build_1604) dm_build_1104() error { - dm_build_1325.dm_build_834.dm_build_417.Dm_build_293(Dm_build_726, uint16(len(dm_build_1325.dm_build_1319))) + dm_build_1611.dm_build_1119.dm_build_699.Dm_build_575(Dm_build_1011, uint16(len(dm_build_1611.dm_build_1605))) - for _, tableID := range dm_build_1325.dm_build_1319 { - dm_build_1325.dm_build_834.dm_build_417.Dm_build_145(tableID) + for _, tableID := range dm_build_1611.dm_build_1605 { + dm_build_1611.dm_build_1119.dm_build_699.Dm_build_427(tableID) } return nil } -func (dm_build_1327 *dm_build_1318) dm_build_823() (interface{}, error) { - dm_build_1328 := dm_build_1327.dm_build_834.dm_build_417.Dm_build_366(Dm_build_726) - if dm_build_1328 <= 0 { +func (dm_build_1613 *dm_build_1604) dm_build_1108() (interface{}, error) { + dm_build_1614 := dm_build_1613.dm_build_1119.dm_build_699.Dm_build_648(Dm_build_1011) + if dm_build_1614 <= 0 { return nil, nil } - dm_build_1329 := make([]int64, dm_build_1328) - for i := 0; i < int(dm_build_1328); i++ { - dm_build_1329[i] = dm_build_1327.dm_build_834.dm_build_417.Dm_build_210() + dm_build_1615 := make([]int64, dm_build_1614) + for i := 0; i < int(dm_build_1614); i++ { + dm_build_1615[i] = dm_build_1613.dm_build_1119.dm_build_699.Dm_build_492() } - return dm_build_1329, nil + return dm_build_1615, nil } diff --git a/dm8/zr.go b/dm8/zr.go index 89a6f06..1ab82db 100644 --- a/dm8/zr.go +++ b/dm8/zr.go @@ -10,11 +10,11 @@ import ( ) const ( - READ_LEN = Dm_build_809 + READ_LEN = Dm_build_1094 ) type iOffRowBinder interface { - read(buf *Dm_build_0) + read(buf *Dm_build_282) isReadOver() bool getObj() interface{} } @@ -23,7 +23,7 @@ type offRowBinder struct { obj interface{} encoding string readOver bool - buffer *Dm_build_0 + buffer *Dm_build_282 position int32 offRow bool targetLength int64 @@ -35,7 +35,7 @@ func newOffRowBinder(obj interface{}, encoding string, targetLength int64) *offR encoding: encoding, targetLength: targetLength, readOver: false, - buffer: Dm_build_4(), + buffer: Dm_build_286(), position: 0, } } @@ -49,16 +49,16 @@ func newOffRowBytesBinder(obj []byte, encoding string) *offRowBytesBinder { newOffRowBinder(obj, encoding, int64(IGNORE_TARGET_LENGTH)), } binder.read(binder.buffer) - binder.offRow = binder.buffer.Dm_build_5() > Dm_build_806 + binder.offRow = binder.buffer.Dm_build_287() > Dm_build_1091 return binder } -func (b *offRowBytesBinder) read(buf *Dm_build_0) { - if b.buffer.Dm_build_5() > 0 { - buf.Dm_build_37(b.buffer) +func (b *offRowBytesBinder) read(buf *Dm_build_282) { + if b.buffer.Dm_build_287() > 0 { + buf.Dm_build_319(b.buffer) } else if !b.readOver { var obj = b.obj.([]byte) - buf.Dm_build_26(obj, 0, len(obj)) + buf.Dm_build_308(obj, 0, len(obj)) b.readOver = true } } @@ -80,13 +80,13 @@ func newOffRowBlobBinder(blob DmBlob, encoding string) *offRowBlobBinder { newOffRowBinder(blob, encoding, int64(IGNORE_TARGET_LENGTH)), } binder.read(binder.buffer) - binder.offRow = binder.buffer.Dm_build_5() > Dm_build_806 + binder.offRow = binder.buffer.Dm_build_287() > Dm_build_1091 return binder } -func (b *offRowBlobBinder) read(buf *Dm_build_0) { - if b.buffer.Dm_build_5() > 0 { - buf.Dm_build_37(b.buffer) +func (b *offRowBlobBinder) read(buf *Dm_build_282) { + if b.buffer.Dm_build_287() > 0 { + buf.Dm_build_319(b.buffer) } else if !b.readOver { var obj = b.obj.(DmBlob) var totalLen, _ = obj.GetLength() @@ -100,7 +100,7 @@ func (b *offRowBlobBinder) read(buf *Dm_build_0) { if b.position == int32(totalLen) { b.readOver = true } - buf.Dm_build_26(bytes, 0, len(bytes)) + buf.Dm_build_308(bytes, 0, len(bytes)) } } @@ -121,13 +121,13 @@ func newOffRowClobBinder(clob DmClob, encoding string) *offRowClobBinder { newOffRowBinder(clob, encoding, int64(IGNORE_TARGET_LENGTH)), } binder.read(binder.buffer) - binder.offRow = binder.buffer.Dm_build_5() > Dm_build_806 + binder.offRow = binder.buffer.Dm_build_287() > Dm_build_1091 return binder } -func (b *offRowClobBinder) read(buf *Dm_build_0) { - if b.buffer.Dm_build_5() > 0 { - buf.Dm_build_37(b.buffer) +func (b *offRowClobBinder) read(buf *Dm_build_282) { + if b.buffer.Dm_build_287() > 0 { + buf.Dm_build_319(b.buffer) } else if !b.readOver { var obj = b.obj.(DmClob) var totalLen, _ = obj.GetLength() @@ -137,12 +137,12 @@ func (b *offRowClobBinder) read(buf *Dm_build_0) { readLen = READ_LEN } var str, _ = obj.getSubString(int64(b.position)+1, readLen) - var bytes = Dm_build_1331.Dm_build_1547(str, b.encoding, nil) + var bytes = Dm_build_1.Dm_build_217(str, b.encoding, nil) b.position += readLen if b.position == int32(totalLen) { b.readOver = true } - buf.Dm_build_26(bytes, 0, len(bytes)) + buf.Dm_build_308(bytes, 0, len(bytes)) } } @@ -163,13 +163,13 @@ func newOffRowReaderBinder(reader io.Reader, encoding string) *offRowReaderBinde newOffRowBinder(reader, encoding, int64(IGNORE_TARGET_LENGTH)), } binder.read(binder.buffer) - binder.offRow = binder.buffer.Dm_build_5() > Dm_build_806 + binder.offRow = binder.buffer.Dm_build_287() > Dm_build_1091 return binder } -func (b *offRowReaderBinder) read(buf *Dm_build_0) { - if b.buffer.Dm_build_5() > 0 { - buf.Dm_build_37(b.buffer) +func (b *offRowReaderBinder) read(buf *Dm_build_282) { + if b.buffer.Dm_build_287() > 0 { + buf.Dm_build_319(b.buffer) } else if !b.readOver { var err error var readLen = READ_LEN @@ -184,17 +184,17 @@ func (b *offRowReaderBinder) read(buf *Dm_build_0) { if readLen < len(bytes) || b.targetLength != int64(IGNORE_TARGET_LENGTH) && int64(b.position) == b.targetLength { b.readOver = true } - buf.Dm_build_26(bytes[0:readLen], 0, readLen) + buf.Dm_build_308(bytes[0:readLen], 0, readLen) } } func (b *offRowReaderBinder) readAll() []byte { - var byteArray = Dm_build_4() + var byteArray = Dm_build_286() b.read(byteArray) for !b.readOver { b.read(byteArray) } - return byteArray.Dm_build_47() + return byteArray.Dm_build_329() } func (b *offRowReaderBinder) isReadOver() bool { diff --git a/dm8/zw.go b/dm8/zw.go index 044bf18..b4f340b 100644 --- a/dm8/zw.go +++ b/dm8/zw.go @@ -8,12 +8,13 @@ package dm8 import ( "math/rand" "strconv" + "sync" "time" "github.com/godoes/gorm-dameng/dm8/util" ) -var rwMap = make(map[string]*rwCounter) +var rwMap sync.Map type rwCounter struct { ntrx_primary int64 @@ -24,8 +25,12 @@ type rwCounter struct { standbyPercent float64 + standbyNTrxMapMu sync.RWMutex + standbyNTrxMap map[string]int64 + standbyIdMapMu sync.RWMutex + standbyIdMap map[string]int32 standbyCount int32 @@ -69,14 +74,18 @@ func (rwc *rwCounter) reset(primaryPercent int32, standbyCount int32) { func getRwCounterInstance(conn *DmConnection, standbyCount int32) *rwCounter { key := conn.dmConnector.host + "_" + strconv.Itoa(int(conn.dmConnector.port)) + "_" + strconv.Itoa(int(conn.dmConnector.rwPercent)) - rwc, ok := rwMap[key] + val, ok := rwMap.Load(key) if !ok { - rwc = newRWCounter(conn.dmConnector.rwPercent, standbyCount) - rwMap[key] = rwc - } else if rwc.standbyCount != standbyCount { - rwc.reset(conn.dmConnector.rwPercent, standbyCount) + rwc := newRWCounter(conn.dmConnector.rwPercent, standbyCount) + rwMap.Store(key, rwc) + return rwc + } else { + rwc := val.(*rwCounter) + if rwc.standbyCount != standbyCount { + rwc.reset(conn.dmConnector.rwPercent, standbyCount) + } + return rwc } - return rwc } /** @@ -124,20 +133,24 @@ func (rwc *rwCounter) adjustNtrx() { if rwc.ntrx_total >= INT64_MAX { var min int64 var i = 0 - for _, num := range rwc.standbyNTrxMap { - if i == 0 || num < min { - min = num + func() { + rwc.standbyNTrxMapMu.Lock() + defer rwc.standbyNTrxMapMu.Unlock() + for _, num := range rwc.standbyNTrxMap { + if i == 0 || num < min { + min = num + } + i++ } - i++ - } - if rwc.ntrx_primary < min { - min = rwc.ntrx_primary - } - rwc.ntrx_primary /= min - rwc.ntrx_total /= min - for k, v := range rwc.standbyNTrxMap { - rwc.standbyNTrxMap[k] = v / min - } + if rwc.ntrx_primary < min { + min = rwc.ntrx_primary + } + rwc.ntrx_primary /= min + rwc.ntrx_total /= min + for k, v := range rwc.standbyNTrxMap { + rwc.standbyNTrxMap[k] = v / min + } + }() } if rwc.flag[0] <= 0 && util.Sum(rwc.flag[1:]) <= 0 { @@ -166,6 +179,8 @@ func (rwc *rwCounter) increasePrimaryNtrx() { func (rwc *rwCounter) getStandbyId(standby *DmConnection) int32 { key := standby.dmConnector.host + ":" + strconv.Itoa(int(standby.dmConnector.port)) + rwc.standbyIdMapMu.Lock() + defer rwc.standbyIdMapMu.Unlock() sid, ok := rwc.standbyIdMap[key] if !ok { sid = int32(len(rwc.standbyIdMap) + 1) // 下标0是primary @@ -189,19 +204,27 @@ func (rwc *rwCounter) getStandbyFlag(standby *DmConnection) int32 { func (rwc *rwCounter) increaseStandbyNtrx(standby *DmConnection) { key := standby.dmConnector.host + ":" + strconv.Itoa(int(standby.dmConnector.port)) - ret, ok := rwc.standbyNTrxMap[key] - if ok { - ret += 1 - } else { - ret = 1 - } - rwc.standbyNTrxMap[key] = ret - sid, ok := rwc.standbyIdMap[key] - if !ok { - sid = int32(len(rwc.standbyIdMap) + 1) // 下标0是primary - rwc.standbyIdMap[key] = sid - } - rwc.flag[sid]-- + func() { + rwc.standbyNTrxMapMu.Lock() + defer rwc.standbyNTrxMapMu.Unlock() + ret, ok := rwc.standbyNTrxMap[key] + if ok { + ret += 1 + } else { + ret = 1 + } + rwc.standbyNTrxMap[key] = ret + }() + func() { + rwc.standbyIdMapMu.Lock() + defer rwc.standbyIdMapMu.Unlock() + sid, ok := rwc.standbyIdMap[key] + if !ok { + sid = int32(len(rwc.standbyIdMap) + 1) // 下标0是primary + rwc.standbyIdMap[key] = sid + } + rwc.flag[sid]-- + }() rwc.ntrx_total++ } diff --git a/dm8/zx.go b/dm8/zx.go index b641e86..fabb5bc 100644 --- a/dm8/zx.go +++ b/dm8/zx.go @@ -199,14 +199,14 @@ func (RWUtil rwUtil) executeByConn(conn *DmConnection, query string, execute1 fu } switch curConn.lastExecInfo.retSqlType { - case Dm_build_783, Dm_build_784, Dm_build_788, Dm_build_795, Dm_build_794, Dm_build_786: + case Dm_build_1068, Dm_build_1069, Dm_build_1073, Dm_build_1080, Dm_build_1079, Dm_build_1071: { if otherConn != nil { _, _ = execute2(otherConn) } } - case Dm_build_793: + case Dm_build_1078: { sqlhead := regexp.MustCompile("[ (]").Split(strings.TrimSpace(query), 2)[0] @@ -216,7 +216,7 @@ func (RWUtil rwUtil) executeByConn(conn *DmConnection, query string, execute1 fu } } } - case Dm_build_792: + case Dm_build_1077: { if conn.dmConnector.rwHA && curConn == conn.rwInfo.connStandby && @@ -270,7 +270,7 @@ func (RWUtil rwUtil) executeByStmt(stmt *DmStatement, execute1 func() (interface } switch curStmt.execInfo.retSqlType { - case Dm_build_783, Dm_build_784, Dm_build_788, Dm_build_795, Dm_build_794, Dm_build_786: + case Dm_build_1068, Dm_build_1069, Dm_build_1073, Dm_build_1080, Dm_build_1079, Dm_build_1071: { if otherStmt != nil { @@ -278,7 +278,7 @@ func (RWUtil rwUtil) executeByStmt(stmt *DmStatement, execute1 func() (interface _, _ = execute2(otherStmt) } } - case Dm_build_793: + case Dm_build_1078: { var tmpsql string @@ -297,7 +297,7 @@ func (RWUtil rwUtil) executeByStmt(stmt *DmStatement, execute1 func() (interface } } } - case Dm_build_792: + case Dm_build_1077: { if stmt.dmConn.dmConnector.rwHA && curStmt == stmt.rwInfo.stmtStandby && diff --git a/dm8/zzk.go b/dm8/zzk.go index cbb05b6..32f7b9c 100644 --- a/dm8/zzk.go +++ b/dm8/zzk.go @@ -14,14 +14,14 @@ import ( "github.com/godoes/gorm-dameng/dm8/util" ) -func (conn *DmConnection) lex(sql string) ([]*parser.LVal, error) { - if conn.lexer == nil { - conn.lexer = parser.NewLexer(strings.NewReader(sql), false) +func (dc *DmConnection) lex(sql string) ([]*parser.LVal, error) { + if dc.lexer == nil { + dc.lexer = parser.NewLexer(strings.NewReader(sql), false) } else { - conn.lexer.Reset(strings.NewReader(sql)) + dc.lexer.Reset(strings.NewReader(sql)) } - lexer := conn.lexer + lexer := dc.lexer var lval *parser.LVal var err error lvalList := make([]*parser.LVal, 0, 64) @@ -71,7 +71,7 @@ func lexSkipWhitespace(sql string, n int) ([]*parser.LVal, error) { return lvalList, nil } -func (conn *DmConnection) escape(sql string, keywords []string) (string, error) { +func (dc *DmConnection) escape(sql string, keywords []string) (string, error) { if (keywords == nil || len(keywords) == 0) && strings.Index(sql, "{") == -1 { return sql, nil @@ -85,7 +85,7 @@ func (conn *DmConnection) escape(sql string, keywords []string) (string, error) } nsql := bytes.NewBufferString("") stack := make([]bool, 0, 64) - lvalList, err := conn.lex(sql) + lvalList, err := dc.lex(sql) if err != nil { return "", err } @@ -183,10 +183,10 @@ func next(lvalList []*parser.LVal, start int) *parser.LVal { return lval } -func (conn *DmConnection) execOpt(sql string, optParamList []OptParameter, serverEncoding string) (string, []OptParameter, error) { +func (dc *DmConnection) execOpt(sql string, optParamList []OptParameter, serverEncoding string) (string, []OptParameter, error) { nsql := bytes.NewBufferString("") - lvalList, err := conn.lex(sql) + lvalList, err := dc.lex(sql) if err != nil { return "", optParamList, err } @@ -201,7 +201,7 @@ func (conn *DmConnection) execOpt(sql string, optParamList []OptParameter, serve return sql, optParamList, nil } - breakIndex := 0 + //breakIndex := 0 for i := 0; i < len(lvalList); i++ { lval := lvalList[i] switch lval.Tp { @@ -252,7 +252,7 @@ func (conn *DmConnection) execOpt(sql string, optParamList []OptParameter, serve nsql.WriteString("'" + util.StringUtil.ProcessSingleQuoteOfName(lval.Value) + "'") } else { nsql.WriteString("?") - optParamList = append(optParamList, newOptParameter(Dm_build_1331.Dm_build_1547(lval.Value, serverEncoding, conn), VARCHAR, VARCHAR_PREC)) + optParamList = append(optParamList, newOptParameter(Dm_build_1.Dm_build_217(lval.Value, serverEncoding, dc), VARCHAR, VARCHAR_PREC)) } } case parser.HEX_INT: @@ -263,22 +263,22 @@ func (conn *DmConnection) execOpt(sql string, optParamList []OptParameter, serve nsql.WriteString(lval.Value) } - if breakIndex > 0 { - break - } + //if breakIndex > 0 { + // break + //} } - if breakIndex > 0 { - for i := breakIndex + 1; i < len(lvalList); i++ { - nsql.WriteString(lvalList[i].Value) - } - } + //if breakIndex > 0 { + // for i := breakIndex + 1; i < len(lvalList); i++ { + // nsql.WriteString(lvalList[i].Value) + // } + //} return nsql.String(), optParamList, nil } -func (conn *DmConnection) hasConst(sql string) (bool, error) { - lvalList, err := conn.lex(sql) +func (dc *DmConnection) hasConst(sql string) (bool, error) { + lvalList, err := dc.lex(sql) if err != nil { return false, err } @@ -291,6 +291,7 @@ func (conn *DmConnection) hasConst(sql string) (bool, error) { switch lvalList[i].Tp { case parser.NULL, parser.INT, parser.DOUBLE, parser.DECIMAL, parser.STRING, parser.HEX_INT: return true, nil + default: } } return false, nil diff --git a/dm8/zzm.go b/dm8/zzm.go index 001e518..fc7c4ba 100644 --- a/dm8/zzm.go +++ b/dm8/zzm.go @@ -12,6 +12,7 @@ import ( "runtime" "strconv" "strings" + "sync" "github.com/godoes/gorm-dameng/dm8/util" ) @@ -53,9 +54,11 @@ const ( ENCODING_GB18030 string = "GB18030" + ENCODING_BIG5 string = "BIG5" + DbAliveCheckFreqDef = 0 - LocaleDef = 0 + LocaleDef = LANGUAGE_CN // log @@ -117,7 +120,7 @@ var ( /*---------------------------------------------------------------*/ - ServerGroupMap = make(map[string]*epGroup) + ServerGroupMap sync.Map GlobalProperties = NewProperties() ) @@ -160,15 +163,15 @@ func load(filePath string) { if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") { groupName := strings.ToLower(line[1 : len(line)-1]) - dbGroup, ok := ServerGroupMap[groupName] + dbGroup, ok := ServerGroupMap.Load(groupName) if groupName == "" || !ok { continue } - groupProps = dbGroup.props + groupProps = dbGroup.(*epGroup).props if groupProps.IsNil() { groupProps = NewProperties() groupProps.SetProperties(GlobalProperties) - dbGroup.props = groupProps + dbGroup.(*epGroup).props = groupProps } } else { @@ -186,7 +189,7 @@ func load(filePath string) { } // 区分属性是全局的还是组的 var success bool - if groupProps.IsNil() { + if groupProps == nil || groupProps.IsNil() { success = SetServerGroupProperties(GlobalProperties, key, value) } else { success = SetServerGroupProperties(groupProps, key, value) @@ -196,7 +199,7 @@ func load(filePath string) { if serverGroup != nil { serverGroup.props = NewProperties() serverGroup.props.SetProperties(GlobalProperties) - ServerGroupMap[strings.ToLower(key)] = serverGroup + ServerGroupMap.Store(strings.ToLower(key), serverGroup) } } } @@ -204,130 +207,139 @@ func load(filePath string) { } func SetServerGroupProperties(props *Properties, key string, value string) bool { - if util.StringUtil.EqualsIgnoreCase(key, "ADDRESS_REMAP") { + key = strings.ToUpper(key) + if key == "ADDRESS_REMAP" { tmp := props.GetString(AddressRemapKey, "") props.Set(AddressRemapKey, tmp+"("+value+")") - } else if util.StringUtil.EqualsIgnoreCase(key, "ALWAYS_ALLOW_COMMIT") { + } else if key == "ALWAYS_ALLOW_COMMIT" { props.Set(AlwayseAllowCommitKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "APP_NAME") { + } else if key == "APP_NAME" { props.Set(AppNameKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "AUTO_COMMIT") { + } else if key == "AUTO_COMMIT" { props.Set(AutoCommitKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "BATCH_ALLOW_MAX_ERRORS") { + } else if key == "BATCH_ALLOW_MAX_ERRORS" { props.Set(BatchAllowMaxErrorsKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "BATCH_CONTINUE_ON_ERROR") || - util.StringUtil.EqualsIgnoreCase(key, "CONTINUE_BATCH_ON_ERROR") { + } else if key == "BATCH_CONTINUE_ON_ERROR" || + key == "CONTINUE_BATCH_ON_ERROR" { props.Set(ContinueBatchOnErrorKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "BATCH_NOT_ON_CALL") { + } else if key == "BATCH_NOT_ON_CALL" { props.Set(BatchNotOnCallKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "BATCH_TYPE") { + } else if key == "BATCH_TYPE" { props.Set(BatchTypeKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "BUF_PREFETCH") { + } else if key == "BUF_PREFETCH" { props.Set(BufPrefetchKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "CIPHER_PATH") { + } else if key == "CIPHER_PATH" { props.Set(CipherPathKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "CLUSTER") { + } else if key == "CLUSTER" { props.Set(ClusterKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "COLUMN_NAME_UPPER_CASE") { + } else if key == "COLUMN_NAME_UPPER_CASE" { props.Set(ColumnNameUpperCaseKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "COLUMN_NAME_CASE") { + } else if key == "COLUMN_NAME_CASE" { props.Set(ColumnNameCaseKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "COMPATIBLE_MODE") { + } else if key == "COMPATIBLE_MODE" { props.Set(CompatibleModeKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "COMPRESS") || - util.StringUtil.EqualsIgnoreCase(key, "COMPRESS_MSG") { + } else if key == "COMPRESS" || + key == "COMPRESS_MSG" { props.Set(CompressKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "COMPRESS_ID") { + } else if key == "COMPRESS_ID" { props.Set(CompressIdKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "CONNECT_TIMEOUT") { + } else if key == "CONNECT_TIMEOUT" { props.Set(ConnectTimeoutKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "DO_SWITCH") || - util.StringUtil.EqualsIgnoreCase(key, "AUTO_RECONNECT") { + } else if key == "DO_SWITCH" || + key == "AUTO_RECONNECT" { props.Set(DoSwitchKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "ENABLE_RS_CACHE") { + } else if key == "ENABLE_RS_CACHE" { props.Set(EnRsCacheKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "EP_SELECTION") { + } else if key == "EP_SELECTION" { props.Set(EpSelectorKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "ESCAPE_PROCESS") { + } else if key == "ESCAPE_PROCESS" { props.Set(EscapeProcessKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "IS_BDTA_RS") { + } else if key == "IS_BDTA_RS" { props.Set(IsBdtaRSKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "KEY_WORDS") || - util.StringUtil.EqualsIgnoreCase(key, "KEYWORDS") { + } else if key == "KEY_WORDS" || + key == "KEYWORDS" { props.Set(KeywordsKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LANGUAGE") { + } else if key == "LANGUAGE" { props.Set(LanguageKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LOB_MODE") { + } else if key == "LOB_MODE" { props.Set(LobModeKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LOG_DIR") { + } else if key == "LOG_BUFFER_SIZE" { + props.Set(LogBufferSizeKey, value) + } else if key == "LOG_DIR" { props.Set(LogDirKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LOG_FLUSH_FREQ") { + } else if key == "LOG_FLUSH_FREQ" { props.Set(LogFlushFreqKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LOG_LEVEL") { + } else if key == "LOG_FLUSHER_QUEUESIZE" { + props.Set(LogFlusherQueueSizeKey, value) + } else if key == "LOG_LEVEL" { props.Set(LogLevelKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LOGIN_DSC_CTRL") { + } else if key == "LOGIN_DSC_CTRL" { props.Set(LoginDscCtrlKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LOGIN_ENCRYPT") { + } else if key == "LOGIN_ENCRYPT" { props.Set(LoginEncryptKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LOGIN_MODE") { + } else if key == "LOGIN_MODE" { props.Set(LoginModeKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "LOGIN_STATUS") { + } else if key == "LOGIN_STATUS" { props.Set(LoginStatusKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "MAX_ROWS") { + } else if key == "MAX_ROWS" { props.Set(MaxRowsKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "MPP_LOCAL") { + } else if key == "MPP_LOCAL" { props.Set(MppLocalKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "OS_NAME") { + } else if key == "OS_NAME" { props.Set(OsNameKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "RS_CACHE_SIZE") { + } else if key == "RS_CACHE_SIZE" { props.Set(RsCacheSizeKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "RS_REFRESH_FREQ") { + } else if key == "RS_REFRESH_FREQ" { props.Set(RsRefreshFreqKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "RW_HA") { + } else if key == "RW_HA" { props.Set(RwHAKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "RW_IGNORE_SQL") { + } else if key == "RW_IGNORE_SQL" { props.Set(RwIgnoreSqlKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "RW_PERCENT") { + } else if key == "RW_PERCENT" { props.Set(RwPercentKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "RW_SEPARATE") { + } else if key == "RW_SEPARATE" { props.Set(RwSeparateKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "RW_STANDBY_RECOVER_TIME") { + } else if key == "RW_STANDBY_RECOVER_TIME" { props.Set(RwStandbyRecoverTimeKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "SCHEMA") { + } else if key == "SCHEMA" { props.Set(SchemaKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "SESS_ENCODE") { + } else if key == "SESS_ENCODE" { if IsSupportedCharset(value) { props.Set("sessEncode", value) } - } else if util.StringUtil.EqualsIgnoreCase(key, "SESSION_TIMEOUT") { + } else if key == "SESSION_TIMEOUT" { props.Set(SessionTimeoutKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "SOCKET_TIMEOUT") { + } else if key == "SOCKET_TIMEOUT" { props.Set(SocketTimeoutKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "SSL_FILES_PATH") { + } else if key == "SSL_CERT_PATH" { + props.Set(SslCertPathKey, value) + } else if key == "SSL_FILES_PATH" { props.Set(SslFilesPathKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "STAT_DIR") { + } else if key == "SSL_KEY_PATH" { + props.Set(SslKeyPathKey, value) + } else if key == "STAT_DIR" { props.Set(StatDirKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "STAT_ENABLE") { + } else if key == "STAT_ENABLE" { props.Set(StatEnableKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "STAT_FLUSH_FREQ") { + } else if key == "STAT_FLUSH_FREQ" { props.Set(StatFlushFreqKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "STAT_HIGH_FREQ_SQL_COUNT") { + } else if key == "STAT_HIGH_FREQ_SQL_COUNT" { props.Set(StatHighFreqSqlCountKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "STAT_SLOW_SQL_COUNT") { + } else if key == "STAT_SLOW_SQL_COUNT" { props.Set(StatSlowSqlCountKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "STAT_SQL_MAX_COUNT") { + } else if key == "STAT_SQL_MAX_COUNT" { props.Set(StatSqlMaxCountKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "STAT_SQL_REMOVE_MODE") { + } else if key == "STAT_SQL_REMOVE_MODE" { props.Set(StatSqlRemoveModeKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "SWITCH_INTERVAL") { + } else if key == "SWITCH_INTERVAL" { props.Set(SwitchIntervalKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "SWITCH_TIME") || - util.StringUtil.EqualsIgnoreCase(key, "SWITCH_TIMES") { + } else if key == "SWITCH_TIME" || + key == "SWITCH_TIMES" { props.Set(SwitchTimesKey, value) - } else if util.StringUtil.EqualsIgnoreCase(key, "TIME_ZONE") { + } else if key == "TIME_ZONE" { props.Set(TimeZoneKey, value) props.Set("localTimezone", value) - } else if util.StringUtil.EqualsIgnoreCase(key, "USER_REMAP") { + } else if key == "USER_REMAP" { tmp := props.GetString(UserRemapKey, "") props.Set(UserRemapKey, tmp+"("+value+")") } else { @@ -414,11 +426,18 @@ func parseLanguage(value string) { Locale = 0 } else if util.StringUtil.EqualsIgnoreCase("en", value) { Locale = 1 + } else if util.StringUtil.EqualsIgnoreCase("cnt_hk", value) || + util.StringUtil.EqualsIgnoreCase("hk", value) || + util.StringUtil.EqualsIgnoreCase("tw", value) { + Locale = 2 } } func IsSupportedCharset(charset string) bool { - if util.StringUtil.EqualsIgnoreCase(ENCODING_UTF8, charset) || util.StringUtil.EqualsIgnoreCase(ENCODING_GB18030, charset) || util.StringUtil.EqualsIgnoreCase(ENCODING_EUCKR, charset) { + if util.StringUtil.EqualsIgnoreCase(ENCODING_UTF8, charset) || + util.StringUtil.EqualsIgnoreCase(ENCODING_GB18030, charset) || + util.StringUtil.EqualsIgnoreCase(ENCODING_EUCKR, charset) || + util.StringUtil.EqualsIgnoreCase(ENCODING_BIG5, charset) { return true } return false diff --git a/dm8/zzn.go b/dm8/zzn.go index ec56b5e..24d6ab4 100644 --- a/dm8/zzn.go +++ b/dm8/zzn.go @@ -212,7 +212,7 @@ func isLocalTimeZone(colType int, scale int) bool { return (colType == DATETIME || colType == DATETIME2) && (scale&LOCAL_TIME_ZONE_SCALE_MASK) != 0 } -func getLocalTimeZoneScale(colType int, scale int) int { +func getLocalTimeZoneScale(_ int, scale int) int { return scale & (^LOCAL_TIME_ZONE_SCALE_MASK) } @@ -379,16 +379,16 @@ func (column *column) getColumnData(bytes []byte, conn *DmConnection) (driver.Va case TINYINT: return int8(bytes[0]), nil case SMALLINT: - return Dm_build_1331.Dm_build_1428(bytes, 0), nil + return Dm_build_1.Dm_build_98(bytes, 0), nil case INT: - return Dm_build_1331.Dm_build_1433(bytes, 0), nil + return Dm_build_1.Dm_build_103(bytes, 0), nil case BIGINT: - return Dm_build_1331.Dm_build_1438(bytes, 0), nil + return Dm_build_1.Dm_build_108(bytes, 0), nil case REAL: - return Dm_build_1331.Dm_build_1443(bytes, 0), nil + return Dm_build_1.Dm_build_113(bytes, 0), nil case DOUBLE: - return Dm_build_1331.Dm_build_1447(bytes, 0), nil + return Dm_build_1.Dm_build_117(bytes, 0), nil case DATE, TIME, DATETIME, TIME_TZ, DATETIME_TZ, DATETIME2, DATETIME2_TZ: return DB2G.toTime(bytes, column, conn) case INTERVAL_DT: @@ -417,7 +417,7 @@ func (column *column) getColumnData(bytes []byte, conn *DmConnection) (driver.Va return blob.getBytes(1, int32(l)) case CHAR, VARCHAR2, VARCHAR: - return Dm_build_1331.Dm_build_1488(bytes, 0, len(bytes), conn.getServerEncoding(), conn), nil + return Dm_build_1.Dm_build_158(bytes, 0, len(bytes), conn.getServerEncoding(), conn), nil case CLOB: clob := DB2G.toDmClob(bytes, conn, column) diff --git a/dm8/zzo.go b/dm8/zzo.go index b6e9c92..98dcd26 100644 --- a/dm8/zzo.go +++ b/dm8/zzo.go @@ -56,27 +56,27 @@ func newTypeData(val interface{}, dataBuf []byte) *TypeData { return td } -func (td *TypeData) initTypeData() *TypeData { - td.m_dumyData = nil +func (sv *TypeData) initTypeData() *TypeData { + sv.m_dumyData = nil - td.m_offset = 0 + sv.m_offset = 0 - td.m_bufLen = 0 + sv.m_bufLen = 0 - td.m_dataBuf = nil + sv.m_dataBuf = nil - td.m_objBlobDescBuf = nil + sv.m_objBlobDescBuf = nil - td.m_isFromBlob = false + sv.m_isFromBlob = false - td.m_packid = -1 + sv.m_packid = -1 - td.m_objRefArr = make([]interface{}, 0) + sv.m_objRefArr = make([]interface{}, 0) - return td + return sv } -func (td TypeData) toStruct(objArr []interface{}, desc *TypeDescriptor) ([]TypeData, error) { +func (sv TypeData) toStruct(objArr []interface{}, desc *TypeDescriptor) ([]TypeData, error) { size := desc.getStrctMemSize() retData := make([]TypeData, size) @@ -93,21 +93,21 @@ func (td TypeData) toStruct(objArr []interface{}, desc *TypeDescriptor) ([]TypeD default: switch desc.m_fieldsObj[i].getDType() { case CLASS, PLTYPE_RECORD: - tdArr, err := td.toStruct(objArr[i].([]interface{}), &desc.m_fieldsObj[i]) + tdArr, err := sv.toStruct(objArr[i].([]interface{}), &desc.m_fieldsObj[i]) if err != nil { return nil, err } retData[i] = *newTypeData(newDmStructByTypeData(tdArr, &desc.m_fieldsObj[i]), nil) case ARRAY, SARRAY: - tdArr, err := td.toArray(objArr[i].([]interface{}), &desc.m_fieldsObj[i]) + tdArr, err := sv.toArray(objArr[i].([]interface{}), &desc.m_fieldsObj[i]) if err != nil { return nil, err } retData[i] = *newTypeData(newDmArrayByTypeData(tdArr, &desc.m_fieldsObj[i]), nil) default: - tdArr, err := td.toMemberObj(objArr[i], &desc.m_fieldsObj[i]) + tdArr, err := sv.toMemberObj(objArr[i], &desc.m_fieldsObj[i]) if err != nil { return nil, err } @@ -119,7 +119,7 @@ func (td TypeData) toStruct(objArr []interface{}, desc *TypeDescriptor) ([]TypeD return retData, nil } -func (td TypeData) toArray(objArr []interface{}, desc *TypeDescriptor) ([]TypeData, error) { +func (sv TypeData) toArray(objArr []interface{}, desc *TypeDescriptor) ([]TypeData, error) { size := len(objArr) retData := make([]TypeData, size) for i := 0; i < size; i++ { @@ -134,7 +134,7 @@ func (td TypeData) toArray(objArr []interface{}, desc *TypeDescriptor) ([]TypeDa default: switch desc.m_arrObj.getDType() { case CLASS, PLTYPE_RECORD: - tdArr, err := td.toStruct(objArr[i].([]interface{}), desc.m_arrObj) + tdArr, err := sv.toStruct(objArr[i].([]interface{}), desc.m_arrObj) if err != nil { return nil, err } @@ -144,21 +144,21 @@ func (td TypeData) toArray(objArr []interface{}, desc *TypeDescriptor) ([]TypeDa tmp, ok := objArr[i].([]interface{}) if !ok && desc.m_arrObj.m_arrObj != nil { - obj, err := td.makeupObjToArr(tmp[i], desc.m_arrObj) + obj, err := sv.makeupObjToArr(tmp[i], desc.m_arrObj) if err != nil { return nil, err } objArr[i] = obj } - tdArr, err := td.toArray(objArr[i].([]interface{}), desc.m_arrObj) + tdArr, err := sv.toArray(objArr[i].([]interface{}), desc.m_arrObj) if err != nil { return nil, err } retData[i] = *newTypeData(newDmArrayByTypeData(tdArr, desc.m_arrObj), nil) default: - tdArr, err := td.toMemberObj(objArr[i], desc.m_arrObj) + tdArr, err := sv.toMemberObj(objArr[i], desc.m_arrObj) if err != nil { return nil, err } @@ -170,7 +170,7 @@ func (td TypeData) toArray(objArr []interface{}, desc *TypeDescriptor) ([]TypeDa return retData, nil } -func (td TypeData) makeupObjToArr(obj interface{}, objDesc *TypeDescriptor) ([]interface{}, error) { +func (sv TypeData) makeupObjToArr(obj interface{}, objDesc *TypeDescriptor) ([]interface{}, error) { arrType := objDesc.getDType() dynamic := true arrLen := 0 @@ -203,7 +203,7 @@ func (td TypeData) makeupObjToArr(obj interface{}, objDesc *TypeDescriptor) ([]i } ret := make([]interface{}, prec) - rs := Dm_build_1331.Dm_build_1547(strRet, objDesc.getServerEncoding(), objDesc.m_conn) + rs := Dm_build_1.Dm_build_217(strRet, objDesc.getServerEncoding(), objDesc.m_conn) for i := 0; i < prec; i++ { ret[i] = rs[i] } @@ -214,7 +214,7 @@ func (td TypeData) makeupObjToArr(obj interface{}, objDesc *TypeDescriptor) ([]i return nil, ECGO_DATA_CONVERTION_ERROR.throw() } -func (td TypeData) toMemberObj(mem interface{}, desc *TypeDescriptor) (*TypeData, error) { +func (sv TypeData) toMemberObj(mem interface{}, desc *TypeDescriptor) (*TypeData, error) { var bs []byte scale := desc.getScale() prec := desc.getPrec() @@ -237,14 +237,14 @@ func (td TypeData) toMemberObj(mem interface{}, desc *TypeDescriptor) (*TypeData return newTypeData(mem, bs), nil } -func (td TypeData) typeDataToBytes(data *TypeData, desc *TypeDescriptor) ([]byte, error) { +func (sv TypeData) typeDataToBytes(data *TypeData, desc *TypeDescriptor) ([]byte, error) { dType := desc.getDType() var innerData []byte var err error if nil == data.m_dumyData { - innerData = td.realocBuffer(nil, 0, 2) - Dm_build_1331.Dm_build_1332(innerData, 0, byte(0)) - Dm_build_1331.Dm_build_1332(innerData, 1, byte(0)) + innerData = sv.realocBuffer(nil, 0, 2) + Dm_build_1.Dm_build_2(innerData, 0, byte(0)) + Dm_build_1.Dm_build_2(innerData, 1, byte(0)) return innerData, nil } @@ -253,33 +253,33 @@ func (td TypeData) typeDataToBytes(data *TypeData, desc *TypeDescriptor) ([]byte switch dType { case ARRAY: - innerData, err = td.arrayToBytes(data.m_dumyData.(*DmArray), desc) + innerData, err = sv.arrayToBytes(data.m_dumyData.(*DmArray), desc) if err != nil { return nil, err } - result = td.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) + result = sv.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) - Dm_build_1331.Dm_build_1332(result, 0, byte(0)) + Dm_build_1.Dm_build_2(result, 0, byte(0)) offset = 1 - Dm_build_1331.Dm_build_1332(result, offset, byte(1)) + Dm_build_1.Dm_build_2(result, offset, byte(1)) offset += 1 copy(result[offset:offset+len(innerData)], innerData[:]) return result, nil case SARRAY: - innerData, err = td.sarrayToBytes(data.m_dumyData.(*DmArray), desc) + innerData, err = sv.sarrayToBytes(data.m_dumyData.(*DmArray), desc) if err != nil { return nil, err } - result = td.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) + result = sv.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) - Dm_build_1331.Dm_build_1332(result, 0, byte(0)) + Dm_build_1.Dm_build_2(result, 0, byte(0)) offset = 1 - Dm_build_1331.Dm_build_1332(result, offset, byte(1)) + Dm_build_1.Dm_build_2(result, offset, byte(1)) offset += 1 copy(result[offset:offset+len(innerData)], innerData[:]) @@ -287,72 +287,72 @@ func (td TypeData) typeDataToBytes(data *TypeData, desc *TypeDescriptor) ([]byte case CLASS: - innerData, err = td.objToBytes(data.m_dumyData, desc) + innerData, err = sv.objToBytes(data.m_dumyData, desc) if err != nil { return nil, err } - result = td.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) + result = sv.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) - Dm_build_1331.Dm_build_1332(result, 0, byte(0)) + Dm_build_1.Dm_build_2(result, 0, byte(0)) offset = 1 - Dm_build_1331.Dm_build_1332(result, offset, byte(1)) + Dm_build_1.Dm_build_2(result, offset, byte(1)) offset += 1 copy(result[offset:offset+len(innerData)], innerData[:]) return result, nil case PLTYPE_RECORD: - innerData, err = td.recordToBytes(data.m_dumyData.(*DmStruct), desc) + innerData, err = sv.recordToBytes(data.m_dumyData.(*DmStruct), desc) if err != nil { return nil, err } - result = td.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) + result = sv.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) - Dm_build_1331.Dm_build_1332(result, 0, byte(0)) + Dm_build_1.Dm_build_2(result, 0, byte(0)) offset = 1 - Dm_build_1331.Dm_build_1332(result, offset, byte(1)) + Dm_build_1.Dm_build_2(result, offset, byte(1)) offset += 1 copy(result[offset:offset+len(innerData)], innerData[:]) return result, nil case BLOB, CLOB: - innerData, err = td.convertLobToBytes(data.m_dumyData, int(desc.column.colType), desc.getServerEncoding()) + innerData, err = sv.convertLobToBytes(data.m_dumyData, int(desc.column.colType), desc.getServerEncoding()) - result = td.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) + result = sv.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE) - Dm_build_1331.Dm_build_1332(result, 0, byte(0)) + Dm_build_1.Dm_build_2(result, 0, byte(0)) offset = 1 - Dm_build_1331.Dm_build_1332(result, offset, byte(1)) + Dm_build_1.Dm_build_2(result, offset, byte(1)) offset += 1 copy(result[offset:offset+len(innerData)], innerData[:]) return result, nil case BOOLEAN: - innerData = td.realocBuffer(nil, 0, 2) - Dm_build_1331.Dm_build_1332(innerData, 0, byte(0)) + innerData = sv.realocBuffer(nil, 0, 2) + Dm_build_1.Dm_build_2(innerData, 0, byte(0)) if data.m_dataBuf != nil && len(data.m_dataBuf) > 0 { - Dm_build_1331.Dm_build_1332(innerData, 1, data.m_dataBuf[0]) + Dm_build_1.Dm_build_2(innerData, 1, data.m_dataBuf[0]) } else { - Dm_build_1331.Dm_build_1332(innerData, 1, byte(0)) + Dm_build_1.Dm_build_2(innerData, 1, byte(0)) } return innerData, nil default: innerData = data.m_dataBuf - result = td.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE+USINT_SIZE) + result = sv.realocBuffer(nil, 0, len(innerData)+BYTE_SIZE+BYTE_SIZE+USINT_SIZE) - Dm_build_1331.Dm_build_1332(result, 0, byte(0)) + Dm_build_1.Dm_build_2(result, 0, byte(0)) offset = 1 - Dm_build_1331.Dm_build_1332(result, offset, byte(1)) + Dm_build_1.Dm_build_2(result, offset, byte(1)) offset += 1 - Dm_build_1331.Dm_build_1342(result, offset, int16(len(innerData))) + Dm_build_1.Dm_build_12(result, offset, int16(len(innerData))) offset += 2 copy(result[offset:offset+len(innerData)], innerData[:]) @@ -361,7 +361,7 @@ func (td TypeData) typeDataToBytes(data *TypeData, desc *TypeDescriptor) ([]byte } } -func (td TypeData) convertLobToBytes(value interface{}, dtype int, serverEncoding string) ([]byte, error) { +func (sv TypeData) convertLobToBytes(value interface{}, dtype int, serverEncoding string) ([]byte, error) { var tmp []byte var ret []byte if dtype == BLOB { @@ -377,7 +377,7 @@ func (td TypeData) convertLobToBytes(value interface{}, dtype int, serverEncodin } ret = make([]byte, l+ULINT_SIZE) - Dm_build_1331.Dm_build_1347(ret, 0, int32(l)) + Dm_build_1.Dm_build_17(ret, 0, int32(l)) copy(ret[:ULINT_SIZE:ULINT_SIZE+l], tmp[:l]) return ret, nil } @@ -397,9 +397,9 @@ func (td TypeData) convertLobToBytes(value interface{}, dtype int, serverEncodin return nil, err } - tmp = Dm_build_1331.Dm_build_1547(subString, serverEncoding, nil) + tmp = Dm_build_1.Dm_build_217(subString, serverEncoding, nil) ret = make([]byte, len(tmp)+ULINT_SIZE) - Dm_build_1331.Dm_build_1347(ret, 0, int32(l)) + Dm_build_1.Dm_build_17(ret, 0, int32(l)) copy(ret[:ULINT_SIZE:ULINT_SIZE+l], tmp[:l]) } return ret, nil @@ -408,19 +408,19 @@ func (td TypeData) convertLobToBytes(value interface{}, dtype int, serverEncodin return nil, ECGO_DATA_CONVERTION_ERROR.throw() } -func (td TypeData) sarrayToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, error) { +func (sv TypeData) sarrayToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, error) { realLen := len(data.m_arrData) results := make([][]byte, realLen) var rdata []byte var err error if desc.getObjId() == 4 { - return td.ctlnToBytes(data, desc) + return sv.ctlnToBytes(data, desc) } totalLen := 0 for i := 0; i < realLen; i++ { - results[i], err = td.typeDataToBytes(&data.m_arrData[i], desc.m_arrObj) + results[i], err = sv.typeDataToBytes(&data.m_arrData[i], desc.m_arrObj) if err != nil { return nil, err } @@ -428,13 +428,13 @@ func (td TypeData) sarrayToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, e } totalLen += ULINT_SIZE + ULINT_SIZE - rdata = td.realocBuffer(nil, 0, totalLen) + rdata = sv.realocBuffer(nil, 0, totalLen) off := 0 - Dm_build_1331.Dm_build_1347(rdata, off, int32(totalLen)) + Dm_build_1.Dm_build_17(rdata, off, int32(totalLen)) off += ULINT_SIZE - Dm_build_1331.Dm_build_1347(rdata, off, int32(data.m_arrDesc.getLength())) + Dm_build_1.Dm_build_17(rdata, off, int32(data.m_arrDesc.getLength())) off += ULINT_SIZE for i := 0; i < realLen; i++ { @@ -445,7 +445,7 @@ func (td TypeData) sarrayToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, e return rdata, nil } -func (td TypeData) ctlnToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, error) { +func (sv TypeData) ctlnToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, error) { results := make([][]byte, len(data.m_arrData)) var rdata []byte var err error @@ -456,29 +456,29 @@ func (td TypeData) ctlnToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, err totalLen += USINT_SIZE + USINT_SIZE + ULINT_SIZE for i := 0; i < len(data.m_arrData); i++ { - results[i], err = td.typeDataToBytes(&data.m_arrData[i], desc.m_arrObj) + results[i], err = sv.typeDataToBytes(&data.m_arrData[i], desc.m_arrObj) if err != nil { return nil, err } totalLen += len(results[i]) } - rdata = td.realocBuffer(nil, 0, totalLen) + rdata = sv.realocBuffer(nil, 0, totalLen) offset := 0 - Dm_build_1331.Dm_build_1332(rdata, offset, byte(0)) + Dm_build_1.Dm_build_2(rdata, offset, byte(0)) offset += BYTE_SIZE offset += ULINT_SIZE - Dm_build_1331.Dm_build_1342(rdata, offset, int16(desc.getCltnType())) + Dm_build_1.Dm_build_12(rdata, offset, int16(desc.getCltnType())) offset += USINT_SIZE - Dm_build_1331.Dm_build_1342(rdata, offset, int16(desc.m_arrObj.getDType())) + Dm_build_1.Dm_build_12(rdata, offset, int16(desc.m_arrObj.getDType())) offset += USINT_SIZE - Dm_build_1331.Dm_build_1347(rdata, offset, int32(len(data.m_arrData))) + Dm_build_1.Dm_build_17(rdata, offset, int32(len(data.m_arrData))) offset += ULINT_SIZE for i := 0; i < len(data.m_arrData); i++ { @@ -486,22 +486,22 @@ func (td TypeData) ctlnToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, err offset += len(results[i]) } - Dm_build_1331.Dm_build_1347(rdata, BYTE_SIZE, int32(offset)) + Dm_build_1.Dm_build_17(rdata, BYTE_SIZE, int32(offset)) return rdata, nil } -func (td TypeData) arrayToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, error) { +func (sv TypeData) arrayToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, error) { results := make([][]byte, len(data.m_arrData)) var rdata []byte var err error if desc.getObjId() == 4 { - return td.ctlnToBytes(data, desc) + return sv.ctlnToBytes(data, desc) } totalLen := 0 for i := 0; i < len(data.m_arrData); i++ { - results[i], err = td.typeDataToBytes(&data.m_arrData[i], desc.m_arrObj) + results[i], err = sv.typeDataToBytes(&data.m_arrData[i], desc.m_arrObj) if err != nil { return nil, err } @@ -515,25 +515,25 @@ func (td TypeData) arrayToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, er totalLen += USINT_SIZE * total } - rdata = td.realocBuffer(nil, 0, totalLen) + rdata = sv.realocBuffer(nil, 0, totalLen) - Dm_build_1331.Dm_build_1347(rdata, 0, int32(totalLen)) + Dm_build_1.Dm_build_17(rdata, 0, int32(totalLen)) offset := ULINT_SIZE - Dm_build_1331.Dm_build_1347(rdata, offset, int32(len(data.m_arrData))) + Dm_build_1.Dm_build_17(rdata, offset, int32(len(data.m_arrData))) offset += ULINT_SIZE - Dm_build_1331.Dm_build_1347(rdata, offset, 0) + Dm_build_1.Dm_build_17(rdata, offset, 0) offset += ULINT_SIZE - Dm_build_1331.Dm_build_1347(rdata, offset, int32(data.m_objCount)) + Dm_build_1.Dm_build_17(rdata, offset, int32(data.m_objCount)) offset += ULINT_SIZE - Dm_build_1331.Dm_build_1347(rdata, offset, int32(data.m_strCount)) + Dm_build_1.Dm_build_17(rdata, offset, int32(data.m_strCount)) offset += ULINT_SIZE for i := 0; i < total; i++ { - Dm_build_1331.Dm_build_1347(rdata, offset, int32(data.m_objStrOffs[i])) + Dm_build_1.Dm_build_17(rdata, offset, int32(data.m_objStrOffs[i])) offset += ULINT_SIZE } @@ -545,17 +545,17 @@ func (td TypeData) arrayToBytes(data *DmArray, desc *TypeDescriptor) ([]byte, er return rdata, nil } -func (td TypeData) objToBytes(data interface{}, desc *TypeDescriptor) ([]byte, error) { +func (sv TypeData) objToBytes(data interface{}, desc *TypeDescriptor) ([]byte, error) { switch data.(type) { case *DmArray: - return td.arrayToBytes(data.(*DmArray), desc) + return sv.arrayToBytes(data.(*DmArray), desc) default: - return td.structToBytes(data.(*DmStruct), desc) + return sv.structToBytes(data.(*DmStruct), desc) } } -func (td TypeData) structToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, error) { +func (sv TypeData) structToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, error) { size := desc.getStrctMemSize() results := make([][]byte, size) var rdata []byte @@ -563,7 +563,7 @@ func (td TypeData) structToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, totalLen := 0 for i := 0; i < size; i++ { - results[i], err = td.typeDataToBytes(&data.m_attribs[i], &desc.m_fieldsObj[i]) + results[i], err = sv.typeDataToBytes(&data.m_attribs[i], &desc.m_fieldsObj[i]) if err != nil { return nil, err } @@ -572,13 +572,13 @@ func (td TypeData) structToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, totalLen += BYTE_SIZE + ULINT_SIZE - rdata = td.realocBuffer(nil, 0, totalLen) + rdata = sv.realocBuffer(nil, 0, totalLen) offset := 0 - Dm_build_1331.Dm_build_1332(rdata, offset, byte(0)) + Dm_build_1.Dm_build_2(rdata, offset, byte(0)) offset += BYTE_SIZE - Dm_build_1331.Dm_build_1347(rdata, offset, int32(totalLen)) + Dm_build_1.Dm_build_17(rdata, offset, int32(totalLen)) offset += ULINT_SIZE for i := 0; i < size; i++ { @@ -589,7 +589,7 @@ func (td TypeData) structToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, return rdata, nil } -func (td TypeData) recordToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, error) { +func (sv TypeData) recordToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, error) { size := desc.getStrctMemSize() results := make([][]byte, size) var rdata []byte @@ -597,7 +597,7 @@ func (td TypeData) recordToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, totalLen := 0 for i := 0; i < size; i++ { - results[i], err = td.typeDataToBytes(&data.m_attribs[i], &desc.m_fieldsObj[i]) + results[i], err = sv.typeDataToBytes(&data.m_attribs[i], &desc.m_fieldsObj[i]) if err != nil { return nil, err } @@ -605,8 +605,8 @@ func (td TypeData) recordToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, } totalLen += ULINT_SIZE - rdata = td.realocBuffer(nil, 0, totalLen) - Dm_build_1331.Dm_build_1347(rdata, 0, int32(totalLen)) + rdata = sv.realocBuffer(nil, 0, totalLen) + Dm_build_1.Dm_build_17(rdata, 0, int32(totalLen)) offset := ULINT_SIZE for i := 0; i < desc.getStrctMemSize(); i++ { @@ -617,36 +617,36 @@ func (td TypeData) recordToBytes(data *DmStruct, desc *TypeDescriptor) ([]byte, return rdata, nil } -func (td TypeData) bytesToBlob(val []byte, out *TypeData, desc *TypeDescriptor) (*TypeData, error) { +func (sv TypeData) bytesToBlob(val []byte, out *TypeData, desc *TypeDescriptor) (*TypeData, error) { offset := out.m_offset - l := Dm_build_1331.Dm_build_1433(val, offset) + l := Dm_build_1.Dm_build_103(val, offset) offset += ULINT_SIZE - tmp := Dm_build_1331.Dm_build_1482(val, offset, int(l)) + tmp := Dm_build_1.Dm_build_152(val, offset, int(l)) offset += int(l) out.m_offset = offset return newTypeData(newBlobOfLocal(tmp, desc.m_conn), tmp), nil } -func (td TypeData) bytesToClob(val []byte, out *TypeData, desc *TypeDescriptor, serverEncoding string) (*TypeData, error) { +func (sv TypeData) bytesToClob(val []byte, out *TypeData, desc *TypeDescriptor, serverEncoding string) (*TypeData, error) { offset := out.m_offset - l := Dm_build_1331.Dm_build_1433(val, offset) + l := Dm_build_1.Dm_build_103(val, offset) offset += ULINT_SIZE - tmp := Dm_build_1331.Dm_build_1482(val, offset, int(l)) + tmp := Dm_build_1.Dm_build_152(val, offset, int(l)) offset += int(l) out.m_offset = offset - return newTypeData(newClobOfLocal(Dm_build_1331.Dm_build_1488(tmp, 0, len(tmp), serverEncoding, desc.m_conn), desc.m_conn), tmp), nil + return newTypeData(newClobOfLocal(Dm_build_1.Dm_build_158(tmp, 0, len(tmp), serverEncoding, desc.m_conn), desc.m_conn), tmp), nil } -func (td TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescriptor) (*TypeData, error) { +func (sv TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescriptor) (*TypeData, error) { offset := out.m_offset offset += 1 - null_flag := Dm_build_1331.Dm_build_1424(val, offset) + null_flag := Dm_build_1.Dm_build_94(val, offset) offset += 1 out.m_offset = offset @@ -657,7 +657,7 @@ func (td TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescript b = true } - tmp := Dm_build_1331.Dm_build_1482(val, offset-1, 1) + tmp := Dm_build_1.Dm_build_152(val, offset-1, 1) return newTypeData(b, tmp), nil } @@ -667,13 +667,13 @@ func (td TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescript switch desc.getDType() { case CLASS: if null_flag&byte(1) != byte(0) { - retObj, err = td.bytesToObj(val, out, desc) + retObj, err = sv.bytesToObj(val, out, desc) if err != nil { return nil, err } if out.m_offset > offset { - retDataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + retDataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) } return newTypeData(retObj, retDataBuf), nil @@ -683,13 +683,13 @@ func (td TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescript case ARRAY: if (null_flag & byte(1)) != byte(0) { - retObj, err = td.bytesToArray(val, out, desc) + retObj, err = sv.bytesToArray(val, out, desc) if err != nil { return nil, err } if out.m_offset > offset { - retDataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + retDataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) } return newTypeData(retObj, retDataBuf), nil @@ -699,13 +699,13 @@ func (td TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescript case PLTYPE_RECORD: if (null_flag & byte(1)) != byte(0) { - retObj, err = td.bytesToRecord(val, out, desc) + retObj, err = sv.bytesToRecord(val, out, desc) if err != nil { return nil, err } if out.m_offset > offset { - retDataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + retDataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) } return newTypeData(retObj, retDataBuf), nil @@ -715,13 +715,13 @@ func (td TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescript case SARRAY: if (null_flag & byte(1)) != byte(0) { - retObj, err = td.bytesToSArray(val, out, desc) + retObj, err = sv.bytesToSArray(val, out, desc) if err != nil { return nil, err } if out.m_offset > offset { - retDataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + retDataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) } return newTypeData(retObj, retDataBuf), nil @@ -731,21 +731,21 @@ func (td TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescript case BLOB: if null_flag&byte(1) != byte(0) { - return td.bytesToBlob(val, out, desc) + return sv.bytesToBlob(val, out, desc) } else { return newTypeData(nil, nil), nil } case CLOB: if null_flag&byte(1) != byte(0) { - return td.bytesToClob(val, out, desc, desc.getServerEncoding()) + return sv.bytesToClob(val, out, desc, desc.getServerEncoding()) } else { return newTypeData(nil, nil), nil } default: if null_flag&byte(1) != byte(0) { - return td.convertBytes2BaseData(val, out, desc) + return sv.convertBytes2BaseData(val, out, desc) } else { return newTypeData(nil, nil), nil } @@ -753,9 +753,9 @@ func (td TypeData) bytesToTypeData(val []byte, out *TypeData, desc *TypeDescript } } -func (td TypeData) checkObjExist(val []byte, out *TypeData) bool { +func (sv TypeData) checkObjExist(val []byte, out *TypeData) bool { offset := out.m_offset - exist_flag := Dm_build_1331.Dm_build_1424(val, offset) + exist_flag := Dm_build_1.Dm_build_94(val, offset) offset += 1 out.m_offset = offset @@ -768,10 +768,10 @@ func (td TypeData) checkObjExist(val []byte, out *TypeData) bool { return false } -func (td TypeData) findObjByPackId(val []byte, out *TypeData) (*DmStruct, error) { +func (sv TypeData) findObjByPackId(val []byte, out *TypeData) (*DmStruct, error) { offset := out.m_offset - pack_id := int(Dm_build_1331.Dm_build_1433(val, offset)) + pack_id := int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE out.m_offset = offset @@ -783,16 +783,16 @@ func (td TypeData) findObjByPackId(val []byte, out *TypeData) (*DmStruct, error) return out.m_objRefArr[pack_id].(*DmStruct), nil } -func (td TypeData) addObjToRefArr(out *TypeData, objToAdd interface{}) { +func (sv TypeData) addObjToRefArr(out *TypeData, objToAdd interface{}) { out.m_objRefArr = append(out.m_objRefArr, objToAdd) out.m_packid++ } -func (td TypeData) checkObjClnt(desc *TypeDescriptor) bool { +func (sv TypeData) checkObjClnt(desc *TypeDescriptor) bool { return desc.m_objId == 4 } -func (td TypeData) bytesToObj_EXACT(val []byte, out *TypeData, desc *TypeDescriptor) (*DmStruct, error) { +func (sv TypeData) bytesToObj_EXACT(val []byte, out *TypeData, desc *TypeDescriptor) (*DmStruct, error) { strOut := newDmStructByTypeData(nil, desc) var sub_desc *TypeDescriptor offset := out.m_offset @@ -804,24 +804,24 @@ func (td TypeData) bytesToObj_EXACT(val []byte, out *TypeData, desc *TypeDescrip strOut.m_attribs = make([]TypeData, size) for i := 0; i < size; i++ { sub_desc = &desc.m_fieldsObj[i] - tmp, err := td.bytesToTypeData(val, out, sub_desc) + tmp, err := sv.bytesToTypeData(val, out, sub_desc) if err != nil { return nil, err } strOut.m_attribs[i] = *tmp } - strOut.m_dataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + strOut.m_dataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) return strOut, nil } -func (td TypeData) bytesToNestTab(val []byte, out *TypeData, desc *TypeDescriptor) (*DmArray, error) { +func (sv TypeData) bytesToNestTab(val []byte, out *TypeData, desc *TypeDescriptor) (*DmArray, error) { offset := out.m_offset offset += USINT_SIZE - count := Dm_build_1331.Dm_build_1433(val, offset) + count := Dm_build_1.Dm_build_103(val, offset) offset += ULINT_SIZE out.m_offset = offset @@ -830,24 +830,24 @@ func (td TypeData) bytesToNestTab(val []byte, out *TypeData, desc *TypeDescripto arrOut.m_itemCount = int(count) arrOut.m_arrData = make([]TypeData, count) for i := 0; i < int(count); i++ { - tmp, err := td.bytesToTypeData(val, out, desc.m_arrObj) + tmp, err := sv.bytesToTypeData(val, out, desc.m_arrObj) if err != nil { return nil, err } arrOut.m_arrData[i] = *tmp } - arrOut.m_dataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + arrOut.m_dataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) return arrOut, nil } -func (td TypeData) bytesToClnt(val []byte, out *TypeData, desc *TypeDescriptor) (*DmArray, error) { +func (sv TypeData) bytesToClnt(val []byte, out *TypeData, desc *TypeDescriptor) (*DmArray, error) { var array *DmArray offset := out.m_offset - cltn_type := Dm_build_1331.Dm_build_1428(val, offset) + cltn_type := Dm_build_1.Dm_build_98(val, offset) offset += USINT_SIZE out.m_offset = offset @@ -856,35 +856,35 @@ func (td TypeData) bytesToClnt(val []byte, out *TypeData, desc *TypeDescriptor) return nil, ECGO_UNSUPPORTED_TYPE.throw() case CLTN_TYPE_NST_TABLE, CLTN_TYPE_VARRAY: - return td.bytesToNestTab(val, out, desc) + return sv.bytesToNestTab(val, out, desc) } return array, nil } -func (td TypeData) bytesToObj(val []byte, out *TypeData, desc *TypeDescriptor) (interface{}, error) { +func (sv TypeData) bytesToObj(val []byte, out *TypeData, desc *TypeDescriptor) (interface{}, error) { var retObj interface{} var err error if out == nil { out = newTypeData(nil, nil) } - if td.checkObjExist(val, out) { - retObj, err = td.findObjByPackId(val, out) + if sv.checkObjExist(val, out) { + retObj, err = sv.findObjByPackId(val, out) if err != nil { return nil, err } } else { - td.addObjToRefArr(out, retObj) + sv.addObjToRefArr(out, retObj) } - if td.checkObjClnt(desc) { - retObj, err = td.bytesToClnt(val, out, desc) + if sv.checkObjClnt(desc) { + retObj, err = sv.bytesToClnt(val, out, desc) if err != nil { return nil, err } } else { - retObj, err = td.bytesToObj_EXACT(val, out, desc) + retObj, err = sv.bytesToObj_EXACT(val, out, desc) if err != nil { return nil, err } @@ -893,7 +893,7 @@ func (td TypeData) bytesToObj(val []byte, out *TypeData, desc *TypeDescriptor) ( return retObj, nil } -func (td TypeData) bytesToArray(val []byte, out *TypeData, desc *TypeDescriptor) (*DmArray, error) { +func (sv TypeData) bytesToArray(val []byte, out *TypeData, desc *TypeDescriptor) (*DmArray, error) { arrOut := newDmArrayByTypeData(nil, desc) if out == nil { out = newTypeData(nil, nil) @@ -901,25 +901,25 @@ func (td TypeData) bytesToArray(val []byte, out *TypeData, desc *TypeDescriptor) offset := out.m_offset - arrOut.m_bufLen = int(Dm_build_1331.Dm_build_1433(val, offset)) + arrOut.m_bufLen = int(Dm_build_1.Dm_build_103(val, offset)) offset += 4 - arrOut.m_itemCount = int(Dm_build_1331.Dm_build_1433(val, offset)) + arrOut.m_itemCount = int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE - arrOut.m_itemSize = int(Dm_build_1331.Dm_build_1433(val, offset)) + arrOut.m_itemSize = int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE - arrOut.m_objCount = int(Dm_build_1331.Dm_build_1433(val, offset)) + arrOut.m_objCount = int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE - arrOut.m_strCount = int(Dm_build_1331.Dm_build_1433(val, offset)) + arrOut.m_strCount = int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE total := arrOut.m_objCount + arrOut.m_strCount arrOut.m_objStrOffs = make([]int, total) for i := 0; i < total; i++ { - arrOut.m_objStrOffs[i] = int(Dm_build_1331.Dm_build_1433(val, offset)) + arrOut.m_objStrOffs[i] = int(Dm_build_1.Dm_build_103(val, offset)) offset += 4 } @@ -927,19 +927,19 @@ func (td TypeData) bytesToArray(val []byte, out *TypeData, desc *TypeDescriptor) arrOut.m_arrData = make([]TypeData, arrOut.m_itemCount) for i := 0; i < arrOut.m_itemCount; i++ { - tmp, err := td.bytesToTypeData(val, out, desc.m_arrObj) + tmp, err := sv.bytesToTypeData(val, out, desc.m_arrObj) if err != nil { return nil, err } arrOut.m_arrData[i] = *tmp } - arrOut.m_dataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + arrOut.m_dataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) return arrOut, nil } -func (td TypeData) bytesToSArray(val []byte, out *TypeData, desc *TypeDescriptor) (*DmArray, error) { +func (sv TypeData) bytesToSArray(val []byte, out *TypeData, desc *TypeDescriptor) (*DmArray, error) { if out == nil { out = newTypeData(nil, nil) } @@ -947,29 +947,29 @@ func (td TypeData) bytesToSArray(val []byte, out *TypeData, desc *TypeDescriptor offset := out.m_offset arrOut := newDmArrayByTypeData(nil, desc) - arrOut.m_bufLen = int(Dm_build_1331.Dm_build_1433(val, offset)) + arrOut.m_bufLen = int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE - arrOut.m_itemCount = int(Dm_build_1331.Dm_build_1433(val, offset)) + arrOut.m_itemCount = int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE out.m_offset = offset arrOut.m_arrData = make([]TypeData, arrOut.m_itemCount) for i := 0; i < arrOut.m_itemCount; i++ { - tmp, err := td.bytesToTypeData(val, out, desc.m_arrObj) + tmp, err := sv.bytesToTypeData(val, out, desc.m_arrObj) if err != nil { return nil, err } arrOut.m_arrData[i] = *tmp } - arrOut.m_dataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + arrOut.m_dataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) return arrOut, nil } -func (td TypeData) bytesToRecord(val []byte, out *TypeData, desc *TypeDescriptor) (*DmStruct, error) { +func (sv TypeData) bytesToRecord(val []byte, out *TypeData, desc *TypeDescriptor) (*DmStruct, error) { if out == nil { out = newTypeData(nil, nil) } @@ -977,33 +977,33 @@ func (td TypeData) bytesToRecord(val []byte, out *TypeData, desc *TypeDescriptor offset := out.m_offset strOut := newDmStructByTypeData(nil, desc) - strOut.m_bufLen = int(Dm_build_1331.Dm_build_1433(val, offset)) + strOut.m_bufLen = int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE out.m_offset = offset strOut.m_attribs = make([]TypeData, desc.getStrctMemSize()) for i := 0; i < desc.getStrctMemSize(); i++ { - tmp, err := td.bytesToTypeData(val, out, &desc.m_fieldsObj[i]) + tmp, err := sv.bytesToTypeData(val, out, &desc.m_fieldsObj[i]) if err != nil { return nil, err } strOut.m_attribs[i] = *tmp } - strOut.m_dataBuf = Dm_build_1331.Dm_build_1482(val, offset, out.m_offset-offset) + strOut.m_dataBuf = Dm_build_1.Dm_build_152(val, offset, out.m_offset-offset) return strOut, nil } -func (td TypeData) objBlob_GetChkBuf(buf []byte, typeData *TypeData) { +func (sv TypeData) objBlob_GetChkBuf(buf []byte, typeData *TypeData) { offset := 4 - l := int(Dm_build_1331.Dm_build_1433(buf, offset)) + l := int(Dm_build_1.Dm_build_103(buf, offset)) offset += ULINT_SIZE - typeData.m_objBlobDescBuf = Dm_build_1331.Dm_build_1482(buf, offset, l) + typeData.m_objBlobDescBuf = Dm_build_1.Dm_build_152(buf, offset, l) offset += l typeData.m_isFromBlob = true @@ -1011,7 +1011,7 @@ func (td TypeData) objBlob_GetChkBuf(buf []byte, typeData *TypeData) { typeData.m_offset = offset } -func (td TypeData) objBlobToObj(lob *DmBlob, desc *TypeDescriptor) (interface{}, error) { +func (sv TypeData) objBlobToObj(lob *DmBlob, desc *TypeDescriptor) (interface{}, error) { typeData := newTypeData(nil, nil) loblen, err := lob.GetLength() if err != nil { @@ -1023,25 +1023,25 @@ func (td TypeData) objBlobToObj(lob *DmBlob, desc *TypeDescriptor) (interface{}, return nil, err } - td.objBlob_GetChkBuf(buf, typeData) + sv.objBlob_GetChkBuf(buf, typeData) - return td.bytesToObj(buf, typeData, desc) + return sv.bytesToObj(buf, typeData, desc) } -func (td TypeData) objBlobToBytes(lobBuf []byte, desc *TypeDescriptor) ([]byte, error) { +func (sv TypeData) objBlobToBytes(lobBuf []byte, desc *TypeDescriptor) ([]byte, error) { l := len(lobBuf) offset := 0 - magic := Dm_build_1331.Dm_build_1433(lobBuf, offset) + magic := Dm_build_1.Dm_build_103(lobBuf, offset) offset += ULINT_SIZE if OBJ_BLOB_MAGIC != magic { return nil, ECGO_INVALID_OBJ_BLOB.throw() } - descLen := int(Dm_build_1331.Dm_build_1433(lobBuf, offset)) + descLen := int(Dm_build_1.Dm_build_103(lobBuf, offset)) offset += ULINT_SIZE - descBuf := Dm_build_1331.Dm_build_1482(lobBuf, offset, descLen) + descBuf := Dm_build_1.Dm_build_152(lobBuf, offset, descLen) tmp, err := desc.getClassDescChkInfo() if err != nil { return nil, err @@ -1056,7 +1056,7 @@ func (td TypeData) objBlobToBytes(lobBuf []byte, desc *TypeDescriptor) ([]byte, return ret, nil } -func (td TypeData) realocBuffer(oldBuf []byte, offset int, needLen int) []byte { +func (sv TypeData) realocBuffer(oldBuf []byte, offset int, needLen int) []byte { var retBuf []byte if oldBuf == nil { @@ -1071,19 +1071,19 @@ func (td TypeData) realocBuffer(oldBuf []byte, offset int, needLen int) []byte { return retBuf } -func (td TypeData) convertBytes2BaseData(val []byte, out *TypeData, desc *TypeDescriptor) (*TypeData, error) { +func (sv TypeData) convertBytes2BaseData(val []byte, out *TypeData, desc *TypeDescriptor) (*TypeData, error) { offset := out.m_offset isNull := false - valueLen := int(Dm_build_1331.Dm_build_1455(val, offset)) + valueLen := int(Dm_build_1.Dm_build_125(val, offset)) offset += USINT_SIZE - if valueLen == int(Dm_build_742) { + if valueLen == int(Dm_build_1027) { valueLen = 0 isNull = true } if -1 == valueLen { - valueLen = int(Dm_build_1331.Dm_build_1433(val, offset)) + valueLen = int(Dm_build_1.Dm_build_103(val, offset)) offset += ULINT_SIZE } @@ -1094,7 +1094,7 @@ func (td TypeData) convertBytes2BaseData(val []byte, out *TypeData, desc *TypeDe var tmpObj interface{} var err error - temp := Dm_build_1331.Dm_build_1482(val, offset, valueLen) + temp := Dm_build_1.Dm_build_152(val, offset, valueLen) offset += valueLen out.m_offset = offset @@ -1105,7 +1105,7 @@ func (td TypeData) convertBytes2BaseData(val []byte, out *TypeData, desc *TypeDe return newTypeData(tmpObj, temp), nil } -func (td *TypeData) toJavaArray(arr *DmArray, index int64, l int, dType int) (interface{}, error) { +func (sv *TypeData) toJavaArray(arr *DmArray, index int64, l int, dType int) (interface{}, error) { if arr.m_objArray != nil { return arr.m_objArray, nil } @@ -1261,7 +1261,7 @@ func (td *TypeData) toJavaArray(arr *DmArray, index int64, l int, dType int) (in return nr, nil } -func (td *TypeData) toNumericArray(arr *DmArray, index int64, l int, flag int) (interface{}, error) { +func (sv *TypeData) toNumericArray(arr *DmArray, index int64, l int, flag int) (interface{}, error) { if nil == arr.m_objArray { return nil, nil } @@ -1305,7 +1305,7 @@ func (td *TypeData) toNumericArray(arr *DmArray, index int64, l int, flag int) ( return retObj, nil } -func (td *TypeData) toJavaArrayByDmStruct(st *DmStruct) ([]interface{}, error) { +func (sv *TypeData) toJavaArrayByDmStruct(st *DmStruct) ([]interface{}, error) { attrsData := st.getAttribsTypeData() if nil == st.getAttribsTypeData() || len(st.getAttribsTypeData()) <= 0 { return nil, nil @@ -1324,7 +1324,7 @@ func (td *TypeData) toJavaArrayByDmStruct(st *DmStruct) ([]interface{}, error) { return out, nil } -func (td *TypeData) toBytesFromDmArray(x *DmArray, typeDesc *TypeDescriptor) ([]byte, error) { +func (sv *TypeData) toBytesFromDmArray(x *DmArray, typeDesc *TypeDescriptor) ([]byte, error) { var err error desc, err := typeDesc.getClassDescChkInfo() if err != nil { @@ -1351,14 +1351,14 @@ func (td *TypeData) toBytesFromDmArray(x *DmArray, typeDesc *TypeDescriptor) ([] } } ret := make([]byte, ULINT_SIZE+ULINT_SIZE+len(desc)+len(data)) - Dm_build_1331.Dm_build_1347(ret, 0, OBJ_BLOB_MAGIC) - Dm_build_1331.Dm_build_1347(ret, ULINT_SIZE, int32(len(desc))) + Dm_build_1.Dm_build_17(ret, 0, OBJ_BLOB_MAGIC) + Dm_build_1.Dm_build_17(ret, ULINT_SIZE, int32(len(desc))) copy(ret[ULINT_SIZE+ULINT_SIZE:ULINT_SIZE+ULINT_SIZE+len(desc)], desc[:]) copy(ret[ULINT_SIZE+ULINT_SIZE+len(desc):ULINT_SIZE+ULINT_SIZE+len(desc)+len(data)], data[:]) return ret, nil } -func (td *TypeData) toBytesFromDmStruct(x *DmStruct, typeDesc *TypeDescriptor) ([]byte, error) { +func (sv *TypeData) toBytesFromDmStruct(x *DmStruct, typeDesc *TypeDescriptor) ([]byte, error) { var err error desc, err := typeDesc.getClassDescChkInfo() if err != nil { @@ -1382,8 +1382,8 @@ func (td *TypeData) toBytesFromDmStruct(x *DmStruct, typeDesc *TypeDescriptor) ( } } ret := make([]byte, ULINT_SIZE+ULINT_SIZE+len(desc)+len(data)) - Dm_build_1331.Dm_build_1347(ret, 0, OBJ_BLOB_MAGIC) - Dm_build_1331.Dm_build_1347(ret, ULINT_SIZE, int32(len(desc))) + Dm_build_1.Dm_build_17(ret, 0, OBJ_BLOB_MAGIC) + Dm_build_1.Dm_build_17(ret, ULINT_SIZE, int32(len(desc))) copy(ret[ULINT_SIZE+ULINT_SIZE:ULINT_SIZE+ULINT_SIZE+len(desc)], desc[:]) copy(ret[ULINT_SIZE+ULINT_SIZE+len(desc):ULINT_SIZE+ULINT_SIZE+len(desc)+len(data)], data[:]) return ret, nil diff --git a/dm8/zzp.go b/dm8/zzp.go index bcc3fdf..56c89a3 100644 --- a/dm8/zzp.go +++ b/dm8/zzp.go @@ -124,7 +124,7 @@ func (typeDescriptor *TypeDescriptor) parseDescByName() error { return err } typeDescriptor.m_serverEncoding = typeDescriptor.m_conn.getServerEncoding() - err = typeDescriptor.unpack(Dm_build_83(buf)) + err = typeDescriptor.unpack(Dm_build_365(buf)) if err != nil { return err } @@ -202,7 +202,7 @@ func getPackSize(typeDesc *TypeDescriptor) (int, error) { return length, nil } -func pack(typeDesc *TypeDescriptor, msg *Dm_build_78) error { +func pack(typeDesc *TypeDescriptor, msg *Dm_build_360) error { switch typeDesc.column.colType { case ARRAY, SARRAY: return packArray(typeDesc, msg) @@ -212,11 +212,11 @@ func pack(typeDesc *TypeDescriptor, msg *Dm_build_78) error { return packRecord(typeDesc, msg) } - msg.Dm_build_133(typeDesc.column.colType) + msg.Dm_build_415(typeDesc.column.colType) - msg.Dm_build_133(typeDesc.column.prec) + msg.Dm_build_415(typeDesc.column.prec) - msg.Dm_build_133(typeDesc.column.scale) + msg.Dm_build_415(typeDesc.column.scale) return nil } @@ -229,7 +229,7 @@ func getPackArraySize(arrDesc *TypeDescriptor) (int, error) { l += USINT_SIZE serverEncoding := arrDesc.getServerEncoding() - ret := Dm_build_1331.Dm_build_1547(name, serverEncoding, arrDesc.m_conn) + ret := Dm_build_1.Dm_build_217(name, serverEncoding, arrDesc.m_conn) l += len(ret) l += ULINT_SIZE @@ -248,32 +248,32 @@ func getPackArraySize(arrDesc *TypeDescriptor) (int, error) { return l, nil } -func packArray(arrDesc *TypeDescriptor, msg *Dm_build_78) error { +func packArray(arrDesc *TypeDescriptor, msg *Dm_build_360) error { - msg.Dm_build_133(arrDesc.column.colType) + msg.Dm_build_415(arrDesc.column.colType) - msg.Dm_build_189(arrDesc.m_sqlName.m_name, arrDesc.getServerEncoding(), arrDesc.m_conn) + msg.Dm_build_471(arrDesc.m_sqlName.m_name, arrDesc.getServerEncoding(), arrDesc.m_conn) - msg.Dm_build_133(int32(arrDesc.m_objId)) + msg.Dm_build_415(int32(arrDesc.m_objId)) - msg.Dm_build_133(int32(arrDesc.m_objVersion)) + msg.Dm_build_415(int32(arrDesc.m_objVersion)) - msg.Dm_build_133(int32(arrDesc.m_length)) + msg.Dm_build_415(int32(arrDesc.m_length)) return pack(arrDesc.m_arrObj, msg) } -func packRecord(strctDesc *TypeDescriptor, msg *Dm_build_78) error { +func packRecord(strctDesc *TypeDescriptor, msg *Dm_build_360) error { - msg.Dm_build_133(strctDesc.column.colType) + msg.Dm_build_415(strctDesc.column.colType) - msg.Dm_build_189(strctDesc.m_sqlName.m_name, strctDesc.getServerEncoding(), strctDesc.m_conn) + msg.Dm_build_471(strctDesc.m_sqlName.m_name, strctDesc.getServerEncoding(), strctDesc.m_conn) - msg.Dm_build_133(int32(strctDesc.m_objId)) + msg.Dm_build_415(int32(strctDesc.m_objId)) - msg.Dm_build_133(int32(strctDesc.m_objVersion)) + msg.Dm_build_415(int32(strctDesc.m_objVersion)) - msg.Dm_build_129(int16(strctDesc.m_size)) + msg.Dm_build_411(int16(strctDesc.m_size)) for i := 0; i < strctDesc.m_size; i++ { err := pack(&strctDesc.m_fieldsObj[i], msg) @@ -293,7 +293,7 @@ func getPackRecordSize(strctDesc *TypeDescriptor) (int, error) { l += USINT_SIZE serverEncoding := strctDesc.getServerEncoding() - ret := Dm_build_1331.Dm_build_1547(name, serverEncoding, strctDesc.m_conn) + ret := Dm_build_1.Dm_build_217(name, serverEncoding, strctDesc.m_conn) l += len(ret) l += ULINT_SIZE @@ -322,7 +322,7 @@ func getPackClassSize(strctDesc *TypeDescriptor) (int, error) { l += USINT_SIZE serverEncoding := strctDesc.getServerEncoding() - ret := Dm_build_1331.Dm_build_1547(name, serverEncoding, strctDesc.m_conn) + ret := Dm_build_1.Dm_build_217(name, serverEncoding, strctDesc.m_conn) l += len(ret) l += ULINT_SIZE @@ -341,32 +341,32 @@ func getPackClassSize(strctDesc *TypeDescriptor) (int, error) { return l, nil } -func packClass(strctDesc *TypeDescriptor, msg *Dm_build_78) error { +func packClass(strctDesc *TypeDescriptor, msg *Dm_build_360) error { - msg.Dm_build_133(strctDesc.column.colType) + msg.Dm_build_415(strctDesc.column.colType) - msg.Dm_build_189(strctDesc.m_sqlName.m_name, strctDesc.getServerEncoding(), strctDesc.m_conn) + msg.Dm_build_471(strctDesc.m_sqlName.m_name, strctDesc.getServerEncoding(), strctDesc.m_conn) - msg.Dm_build_133(int32(strctDesc.m_objId)) + msg.Dm_build_415(int32(strctDesc.m_objId)) - msg.Dm_build_133(int32(strctDesc.m_objVersion)) + msg.Dm_build_415(int32(strctDesc.m_objVersion)) if strctDesc.m_objId == 4 { - msg.Dm_build_133(int32(strctDesc.m_outerId)) + msg.Dm_build_415(int32(strctDesc.m_outerId)) - msg.Dm_build_133(int32(strctDesc.m_outerVer)) + msg.Dm_build_415(int32(strctDesc.m_outerVer)) - msg.Dm_build_133(int32(strctDesc.m_subId)) + msg.Dm_build_415(int32(strctDesc.m_subId)) } return nil } -func (typeDescriptor *TypeDescriptor) unpack(buffer *Dm_build_78) error { +func (typeDescriptor *TypeDescriptor) unpack(buffer *Dm_build_360) error { - typeDescriptor.column.colType = buffer.Dm_build_207() + typeDescriptor.column.colType = buffer.Dm_build_489() switch typeDescriptor.column.colType { case ARRAY, SARRAY: @@ -377,25 +377,25 @@ func (typeDescriptor *TypeDescriptor) unpack(buffer *Dm_build_78) error { return typeDescriptor.unpackRecord(buffer) } - typeDescriptor.column.prec = buffer.Dm_build_207() + typeDescriptor.column.prec = buffer.Dm_build_489() - typeDescriptor.column.scale = buffer.Dm_build_207() + typeDescriptor.column.scale = buffer.Dm_build_489() return nil } -func (typeDescriptor *TypeDescriptor) unpackArray(buffer *Dm_build_78) error { +func (typeDescriptor *TypeDescriptor) unpackArray(buffer *Dm_build_360) error { - typeDescriptor.m_sqlName.m_name = buffer.Dm_build_257(typeDescriptor.getServerEncoding(), typeDescriptor.m_conn) + typeDescriptor.m_sqlName.m_name = buffer.Dm_build_539(typeDescriptor.getServerEncoding(), typeDescriptor.m_conn) - typeDescriptor.m_sqlName.m_schId = int(buffer.Dm_build_207()) + typeDescriptor.m_sqlName.m_schId = int(buffer.Dm_build_489()) - typeDescriptor.m_sqlName.m_packId = int(buffer.Dm_build_207()) + typeDescriptor.m_sqlName.m_packId = int(buffer.Dm_build_489()) - typeDescriptor.m_objId = int(buffer.Dm_build_207()) + typeDescriptor.m_objId = int(buffer.Dm_build_489()) - typeDescriptor.m_objVersion = int(buffer.Dm_build_207()) + typeDescriptor.m_objVersion = int(buffer.Dm_build_489()) - typeDescriptor.m_length = int(buffer.Dm_build_207()) + typeDescriptor.m_length = int(buffer.Dm_build_489()) if typeDescriptor.column.colType == ARRAY { typeDescriptor.m_length = 0 } @@ -404,19 +404,19 @@ func (typeDescriptor *TypeDescriptor) unpackArray(buffer *Dm_build_78) error { return typeDescriptor.m_arrObj.unpack(buffer) } -func (typeDescriptor *TypeDescriptor) unpackRecord(buffer *Dm_build_78) error { +func (typeDescriptor *TypeDescriptor) unpackRecord(buffer *Dm_build_360) error { - typeDescriptor.m_sqlName.m_name = buffer.Dm_build_257(typeDescriptor.getServerEncoding(), typeDescriptor.m_conn) + typeDescriptor.m_sqlName.m_name = buffer.Dm_build_539(typeDescriptor.getServerEncoding(), typeDescriptor.m_conn) - typeDescriptor.m_sqlName.m_schId = int(buffer.Dm_build_207()) + typeDescriptor.m_sqlName.m_schId = int(buffer.Dm_build_489()) - typeDescriptor.m_sqlName.m_packId = int(buffer.Dm_build_207()) + typeDescriptor.m_sqlName.m_packId = int(buffer.Dm_build_489()) - typeDescriptor.m_objId = int(buffer.Dm_build_207()) + typeDescriptor.m_objId = int(buffer.Dm_build_489()) - typeDescriptor.m_objVersion = int(buffer.Dm_build_207()) + typeDescriptor.m_objVersion = int(buffer.Dm_build_489()) - typeDescriptor.m_size = int(buffer.Dm_build_222()) + typeDescriptor.m_size = int(buffer.Dm_build_504()) typeDescriptor.m_fieldsObj = make([]TypeDescriptor, typeDescriptor.m_size) for i := 0; i < typeDescriptor.m_size; i++ { @@ -427,9 +427,9 @@ func (typeDescriptor *TypeDescriptor) unpackRecord(buffer *Dm_build_78) error { return nil } -func (typeDescriptor *TypeDescriptor) unpackClnt_nestTab(buffer *Dm_build_78) error { +func (typeDescriptor *TypeDescriptor) unpackClnt_nestTab(buffer *Dm_build_360) error { - typeDescriptor.m_maxCnt = int(buffer.Dm_build_207()) + typeDescriptor.m_maxCnt = int(buffer.Dm_build_489()) typeDescriptor.m_arrObj = newTypeDescriptor(typeDescriptor.m_conn) @@ -438,15 +438,15 @@ func (typeDescriptor *TypeDescriptor) unpackClnt_nestTab(buffer *Dm_build_78) er return nil } -func (typeDescriptor *TypeDescriptor) unpackClnt(buffer *Dm_build_78) error { +func (typeDescriptor *TypeDescriptor) unpackClnt(buffer *Dm_build_360) error { - typeDescriptor.m_outerId = int(buffer.Dm_build_207()) + typeDescriptor.m_outerId = int(buffer.Dm_build_489()) - typeDescriptor.m_outerVer = int(buffer.Dm_build_207()) + typeDescriptor.m_outerVer = int(buffer.Dm_build_489()) - typeDescriptor.m_subId = int(buffer.Dm_build_222()) + typeDescriptor.m_subId = int(buffer.Dm_build_504()) - typeDescriptor.m_cltnType = int(buffer.Dm_build_222()) + typeDescriptor.m_cltnType = int(buffer.Dm_build_504()) switch typeDescriptor.m_cltnType { case CLTN_TYPE_IND_TABLE: @@ -459,23 +459,23 @@ func (typeDescriptor *TypeDescriptor) unpackClnt(buffer *Dm_build_78) error { return nil } -func (typeDescriptor *TypeDescriptor) unpackClass(buffer *Dm_build_78) error { +func (typeDescriptor *TypeDescriptor) unpackClass(buffer *Dm_build_360) error { - typeDescriptor.m_sqlName.m_name = buffer.Dm_build_257(typeDescriptor.getServerEncoding(), typeDescriptor.m_conn) + typeDescriptor.m_sqlName.m_name = buffer.Dm_build_539(typeDescriptor.getServerEncoding(), typeDescriptor.m_conn) - typeDescriptor.m_sqlName.m_schId = int(buffer.Dm_build_207()) + typeDescriptor.m_sqlName.m_schId = int(buffer.Dm_build_489()) - typeDescriptor.m_sqlName.m_packId = int(buffer.Dm_build_207()) + typeDescriptor.m_sqlName.m_packId = int(buffer.Dm_build_489()) - typeDescriptor.m_objId = int(buffer.Dm_build_207()) + typeDescriptor.m_objId = int(buffer.Dm_build_489()) - typeDescriptor.m_objVersion = int(buffer.Dm_build_207()) + typeDescriptor.m_objVersion = int(buffer.Dm_build_489()) if typeDescriptor.m_objId == 4 { return typeDescriptor.unpackClnt(buffer) } else { - typeDescriptor.m_size = int(buffer.Dm_build_222()) + typeDescriptor.m_size = int(buffer.Dm_build_504()) typeDescriptor.m_fieldsObj = make([]TypeDescriptor, typeDescriptor.m_size) for i := 0; i < typeDescriptor.m_size; i++ { @@ -621,10 +621,10 @@ func calcChkDescLen(desc *TypeDescriptor) (int, error) { func (typeDescriptor *TypeDescriptor) makeChkDesc_array(offset int, desc *TypeDescriptor) (int, error) { - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, ARRAY) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, ARRAY) offset += USINT_SIZE - Dm_build_1331.Dm_build_1347(typeDescriptor.m_descBuf, offset, int32(desc.m_length)) + Dm_build_1.Dm_build_17(typeDescriptor.m_descBuf, offset, int32(desc.m_length)) offset += ULINT_SIZE return typeDescriptor.makeChkDesc(offset, desc) @@ -632,10 +632,10 @@ func (typeDescriptor *TypeDescriptor) makeChkDesc_array(offset int, desc *TypeDe func (typeDescriptor *TypeDescriptor) makeChkDesc_record(offset int, desc *TypeDescriptor) (int, error) { - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, PLTYPE_RECORD) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, PLTYPE_RECORD) offset += USINT_SIZE - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, int16(desc.m_size)) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, int16(desc.m_size)) offset += USINT_SIZE var err error for i := 0; i < desc.m_size; i++ { @@ -658,13 +658,13 @@ func (typeDescriptor *TypeDescriptor) makeChkDesc_buildin(offset int, desc *Type scale = desc.getScale() } - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, dtype) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, dtype) offset += USINT_SIZE - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, int16(prec)) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, int16(prec)) offset += USINT_SIZE - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, int16(scale)) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, int16(scale)) offset += USINT_SIZE return offset @@ -672,7 +672,7 @@ func (typeDescriptor *TypeDescriptor) makeChkDesc_buildin(offset int, desc *Type func (typeDescriptor *TypeDescriptor) makeChkDesc_class_normal(offset int, desc *TypeDescriptor) (int, error) { - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, int16(desc.m_size)) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, int16(desc.m_size)) offset += USINT_SIZE var err error @@ -688,10 +688,10 @@ func (typeDescriptor *TypeDescriptor) makeChkDesc_class_normal(offset int, desc func (typeDescriptor *TypeDescriptor) makeChkDesc_class_clnt(offset int, desc *TypeDescriptor) (int, error) { - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, int16(desc.m_cltnType)) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, int16(desc.m_cltnType)) offset += USINT_SIZE - Dm_build_1331.Dm_build_1347(typeDescriptor.m_descBuf, offset, int32(desc.getMaxCnt())) + Dm_build_1.Dm_build_17(typeDescriptor.m_descBuf, offset, int32(desc.getMaxCnt())) offset += ULINT_SIZE switch desc.m_cltnType { @@ -708,7 +708,7 @@ func (typeDescriptor *TypeDescriptor) makeChkDesc_class_clnt(offset int, desc *T func (typeDescriptor *TypeDescriptor) makeChkDesc_class(offset int, desc *TypeDescriptor) (int, error) { - Dm_build_1331.Dm_build_1342(typeDescriptor.m_descBuf, offset, CLASS) + Dm_build_1.Dm_build_12(typeDescriptor.m_descBuf, offset, CLASS) offset += USINT_SIZE isClnt := false @@ -717,9 +717,9 @@ func (typeDescriptor *TypeDescriptor) makeChkDesc_class(offset int, desc *TypeDe } if isClnt { - Dm_build_1331.Dm_build_1332(typeDescriptor.m_descBuf, offset, byte(1)) + Dm_build_1.Dm_build_2(typeDescriptor.m_descBuf, offset, byte(1)) } else { - Dm_build_1331.Dm_build_1332(typeDescriptor.m_descBuf, offset, byte(0)) + Dm_build_1.Dm_build_2(typeDescriptor.m_descBuf, offset, byte(0)) } offset += BYTE_SIZE diff --git a/migrator.go b/migrator.go index beae420..0e22239 100644 --- a/migrator.go +++ b/migrator.go @@ -3,6 +3,7 @@ package dameng import ( "database/sql" "fmt" + "regexp" "strings" "gorm.io/gorm" @@ -11,6 +12,10 @@ import ( "gorm.io/gorm/schema" ) +var ( + regFullDataType = regexp.MustCompile(`\D*(\d+)\D?`) +) + type Migrator struct { migrator.Migrator Dialector @@ -168,9 +173,137 @@ func (m Migrator) AlterColumn(value interface{}, field string) error { }) } +// containsUnique: 原本是否就有UNIQUE字段 +func (m Migrator) alterColumn(value interface{}, field string, containsUnique bool) error { + return m.RunWithValue(value, func(stmt *gorm.Statement) error { + if field := stmt.Schema.LookUpField(field); field != nil { + typeof := m.FullDataTypeOf(field) + // 如果列原本就有UNIQUE,且修改后仍有UNIQUE,则在MODIFY COLUMN时不再添加UNIQUE字段 + // 这样也不会影响 有UNIQUE -> 无UNIQUE、无UNIQUE -> 有UNIQUE、无UNIQUE -> 无UNIQUE的情况 + if containsUnique && field.Unique { + typeof.SQL = strings.Replace(typeof.SQL, " UNIQUE", "", 1) + } + return m.DB.Exec( + "ALTER TABLE ? MODIFY ? ?", + clause.Table{Name: stmt.Table}, + clause.Column{Name: field.DBName}, + typeof, + ).Error + } + return fmt.Errorf("failed to look up field with name: %s", field) + }) +} + func (m Migrator) MigrateColumn(dst interface{}, field *schema.Field, columnType gorm.ColumnType) error { // super - return m.Migrator.MigrateColumn(dst, field, columnType) + // return m.Migrator.MigrateColumn(dst, field, columnType) + // bug629968 不再使用父类默认的MigrateColumn函数,主要修改: + // 添加了containsUnique参数和最后的调用从AlterColumn改为alterColumn + + // found, smart migrate + fullDataType := strings.TrimSpace(strings.ToLower(m.DB.Migrator().FullDataTypeOf(field).SQL)) + realDataType := strings.ToLower(columnType.DatabaseTypeName()) + containsUnique := false + if unique, ok := columnType.Unique(); ok { + containsUnique = unique + } + + var ( + alterColumn bool + isSameType = fullDataType == realDataType + ) + + if !field.PrimaryKey { + // check type + if !strings.HasPrefix(fullDataType, realDataType) { + // check type aliases + aliases := m.DB.Migrator().GetTypeAliases(realDataType) + for _, alias := range aliases { + if strings.HasPrefix(fullDataType, alias) { + isSameType = true + break + } + } + + if !isSameType { + alterColumn = true + } + } + } + + if !isSameType { + // check size + if length, ok := columnType.Length(); length != int64(field.Size) { + if length > 0 && field.Size > 0 { + alterColumn = true + } else { + // has size in data type and not equal + // Since the following code is frequently called in the for loop, reg optimization is needed here + matches2 := regFullDataType.FindAllStringSubmatch(fullDataType, -1) + if !field.PrimaryKey && + (len(matches2) == 1 && matches2[0][1] != fmt.Sprint(length) && ok) { + alterColumn = true + } + } + } + + // check precision + if precision, _, ok := columnType.DecimalSize(); ok && int64(field.Precision) != precision { + if regexp.MustCompile(fmt.Sprintf("[^0-9]%d[^0-9]", field.Precision)).MatchString(m.Migrator.DataTypeOf(field)) { + alterColumn = true + } + } + } + + // check nullable + if nullable, ok := columnType.Nullable(); ok && nullable == field.NotNull { + // not primary key & database is nullable + if !field.PrimaryKey && nullable { + alterColumn = true + } + } + + // check unique + if unique, ok := columnType.Unique(); ok && unique != field.Unique { + // not primary key + if !field.PrimaryKey { + alterColumn = true + } + } + + // check default value + if !field.PrimaryKey { + currentDefaultNotNull := field.HasDefaultValue && (field.DefaultValueInterface != nil || !strings.EqualFold(field.DefaultValue, "NULL")) + dv, dvNotNull := columnType.DefaultValue() + if dvNotNull && !currentDefaultNotNull { + // defalut value -> null + alterColumn = true + } else if !dvNotNull && currentDefaultNotNull { + // null -> default value + alterColumn = true + } else if (field.GORMDataType != schema.Time && dv != field.DefaultValue) || + (field.GORMDataType == schema.Time && !strings.EqualFold(strings.TrimSuffix(dv, "()"), strings.TrimSuffix(field.DefaultValue, "()"))) { + // default value not equal + // not both null + if currentDefaultNotNull || dvNotNull { + alterColumn = true + } + } + } + + // check comment + if comment, ok := columnType.Comment(); ok && comment != field.Comment { + // not primary key + if !field.PrimaryKey { + alterColumn = true + } + } + + if alterColumn && !field.IgnoreMigration { + return m.DB.Migrator().(Migrator).alterColumn(dst, field.DBName, containsUnique) + } + + return nil } func (m Migrator) HasColumn(value interface{}, field string) bool { @@ -193,8 +326,116 @@ func (m Migrator) RenameColumn(value interface{}, oldName, newName string) error } func (m Migrator) ColumnTypes(dst interface{}) ([]gorm.ColumnType, error) { - // super - return m.Migrator.ColumnTypes(dst) + columnTypes := make([]gorm.ColumnType, 0) + execErr := m.RunWithValue(dst, func(stmt *gorm.Statement) error { + var ( + currentDatabase = m.CurrentDatabase() + table = stmt.Table + columnTypeSQL = `SELECT /*+ MAX_OPT_N_TABLES(5) */ COLS.NAME, COLS.DEFVAL FROM +(SELECT ID FROM SYS.SYSOBJECTS WHERE TYPE$ = 'SCH' AND NAME = ?) SCHS, +(SELECT ID, SCHID FROM SYS.SYSOBJECTS WHERE TYPE$ = 'SCHOBJ' AND SUBTYPE$ IN ('UTAB', 'STAB', 'VIEW') AND NAME = ?) TABS, +SYS.SYSCOLUMNS COLS +WHERE TABS.ID=COLS.ID AND SCHS.ID = TABS.SCHID` + columnConsSQL = `SELECT /*+ MAX_OPT_N_TABLES(5) */ COLS.NAME, LNNVL(CONS.TYPE$!='P'), LNNVL(CONS.TYPE$!='U') FROM +(SELECT ID FROM SYS.SYSOBJECTS WHERE TYPE$ = 'SCH' AND NAME = ?) SCHS, +(SELECT ID, SCHID FROM SYS.SYSOBJECTS WHERE TYPE$ = 'SCHOBJ' AND SUBTYPE$ IN ('UTAB', 'STAB', 'VIEW') AND NAME = ?) TABS, +SYS.SYSCOLUMNS COLS, +SYS.SYSCONS CONS, +SYS.SYSINDEXES INDS +WHERE SCHS.ID=TABS.SCHID AND TABS.ID=COLS.ID AND COLS.ID=CONS.TABLEID and CONS.INDEXID=INDS.ID and SF_COL_IS_IDX_KEY(INDS.KEYNUM, INDS.KEYINFO, COLS.COLID)=1` + consMap = make(map[string][][]bool) + rows, err = m.DB.Session(&gorm.Session{}).Table(stmt.Table).Limit(1).Rows() + ) + + if err != nil { + return err + } + + rawColumnTypes, err := rows.ColumnTypes() + + if err := rows.Close(); err != nil { + return err + } + + // 约束 + cons, consErr := m.DB.Table(table).Raw(columnConsSQL, currentDatabase, table).Rows() + if consErr != nil { + return consErr + } + defer func(cons *sql.Rows) { + _ = cons.Close() + }(cons) + + for cons.Next() { + var ( + colName string + values = make([]bool, 2) + ) + if scanErr := cons.Scan(&colName, &values[0], &values[1]); scanErr != nil { + return scanErr + } + + if consMap[colName] == nil { + consMap[colName] = *new([][]bool) + } + consMap[colName] = append(consMap[colName], values) + } + + // 列信息 + columns, rowErr := m.DB.Table(table).Raw(columnTypeSQL, currentDatabase, table).Rows() + if rowErr != nil { + return rowErr + } + defer func(columns *sql.Rows) { + _ = columns.Close() + }(columns) + + for columns.Next() { + var ( + column migrator.ColumnType + values = []interface{}{ + &column.NameValue, &column.DefaultValueValue, + } + ) + + if scanErr := columns.Scan(values...); scanErr != nil { + return scanErr + } + + column.DefaultValueValue.String = strings.Trim(column.DefaultValueValue.String, "'") + + // 设置列的主键和值唯一信息 + for key, value := range consMap { + if key == column.NameValue.String { + for _, con := range value { + if con[0] { + column.PrimaryKeyValue.Bool = true + column.PrimaryKeyValue.Valid = true + } + if con[1] { + column.UniqueValue.Bool = true + column.UniqueValue.Valid = true + } + } + break + } + } + + // 设置默认的列信息(来自go驱动标准类型sql.ColumnType) + for _, c := range rawColumnTypes { + if c.Name() == column.NameValue.String { + column.SQLColumnType = c + break + } + } + + columnTypes = append(columnTypes, column) + } + + return nil + }) + + return columnTypes, execErr } func (m Migrator) CreateView(name string, option gorm.ViewOption) error { @@ -227,11 +468,13 @@ where CON_OBJ.ID=CONS.ID and TAB_OBJ.ID=CONS.TABLEID and TAB_OBJ.SCHID=SCH_OBJ.I var count int64 _ = m.RunWithValue(value, func(stmt *gorm.Statement) error { - constraint, chk, _ := m.GuessConstraintAndTable(stmt, name) - if constraint != nil { - name = constraint.Name - } else if chk != nil { - name = chk.Name + constraint, _ := m.GuessConstraintInterfaceAndTable(stmt, name) + switch c := constraint.(type) { + case *schema.Constraint: + name = c.Name + case *schema.CheckConstraint: + name = c.Name + default: } return m.DB.Raw(conSql, m.CurrentDatabase(), name).Row().Scan(&count) })