drda

package
v0.0.0-...-99ec6c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DRDA_CP_DATA        = 0x0000
	DRDA_CP_CODPNT      = 0x000C
	DRDA_CP_FDODSC      = 0x0010
	DRDA_CP_TYPDEFNAM   = 0x002F
	DRDA_CP_TYPDEFOVR   = 0x0035
	DRDA_CP_CODPNTDR    = 0x0064
	DRDA_CP_EXCSAT      = 0x1041
	DRDA_CP_SYNCCTL     = 0x1055
	DRDA_CP_SYNCRSY     = 0x1069
	DRDA_CP_ACCSEC      = 0x106D
	DRDA_CP_SECCHK      = 0x106E
	DRDA_CP_SYNCLOG     = 0x106F
	DRDA_CP_RSCTYP      = 0x111F
	DRDA_CP_RSNCOD      = 0x1127
	DRDA_CP_RSCNAM      = 0x112D
	DRDA_CP_PRDID       = 0x112E
	DRDA_CP_PRCCNVCD    = 0x113F
	DRDA_CP_VRSNAM      = 0x1144
	DRDA_CP_SRVCLSNM    = 0x1147
	DRDA_CP_SVRCOD      = 0x1149
	DRDA_CP_SYNERRCD    = 0x114A
	DRDA_CP_SRVDGN      = 0x1153
	DRDA_CP_SRVRLSLV    = 0x115A
	DRDA_CP_SPVNAM      = 0x115D
	DRDA_CP_EXTNAM      = 0x115E
	DRDA_CP_SRVNAM      = 0x116D
	DRDA_CP_SECMGRNM    = 0x1196
	DRDA_CP_DEPERRCD    = 0x119B
	DRDA_CP_CCSIDSBC    = 0x119C
	DRDA_CP_CCSIDDBC    = 0x119D
	DRDA_CP_CCSIDMBC    = 0x119E
	DRDA_CP_RLSCONV     = 0x119F
	DRDA_CP_USRID       = 0x11A0
	DRDA_CP_PASSWORD    = 0x11A1
	DRDA_CP_SECMEC      = 0x11A2
	DRDA_CP_SECCHKCD    = 0x11A4
	DRDA_CP_SVCERRNO    = 0x11B4
	DRDA_CP_SECTKN      = 0x11DC
	DRDA_CP_NEWPASSWORD = 0x11DE
	DRDA_CP_MGRLVLRM    = 0x1210
	DRDA_CP_MGRDEPRM    = 0x1218
	DRDA_CP_SECCHKRM    = 0x1219
	DRDA_CP_CMDATHRM    = 0x121C
	DRDA_CP_AGNPRMRM    = 0x1232
	DRDA_CP_RSCLMTRM    = 0x1233
	DRDA_CP_PRCCNVRM    = 0x1245
	DRDA_CP_CMDCMPRM    = 0x124B
	DRDA_CP_SYNTAXRM    = 0x124C
	DRDA_CP_CMDNSPRM    = 0x1250
	DRDA_CP_PRMNSPRM    = 0x1251
	DRDA_CP_VALNSPRM    = 0x1252
	DRDA_CP_OBJNSPRM    = 0x1253
	DRDA_CP_CMDCHKRM    = 0x1254
	DRDA_CP_TRGNSPRM    = 0x125F
	DRDA_CP_AGENT       = 0x1403
	DRDA_CP_MGRLVLLS    = 0x1404
	DRDA_CP_SUPERVISOR  = 0x143C
	DRDA_CP_SECMGR      = 0x1440
	DRDA_CP_EXCSATRD    = 0x1443
	DRDA_CP_CMNAPPC     = 0x1444
	DRDA_CP_DICTIONARY  = 0x1458
	DRDA_CP_MGRLVLN     = 0x1473
	DRDA_CP_CMNTCPIP    = 0x1474
	DRDA_CP_FDODTA      = 0x147A
	DRDA_CP_CMNSYNCPT   = 0x147C
	DRDA_CP_ACCSECRD    = 0x14AC
	DRDA_CP_SYNCPTMGR   = 0x14C0
	DRDA_CP_RSYNCMGR    = 0x14C1
	DRDA_CP_CCSIDMGR    = 0x14CC
	DRDA_CP_SNDPKT      = 0x1805
	DRDA_CP_MONITOR     = 0x1900
	DRDA_CP_ETIME       = 0x1901
	DRDA_CP_RESPKTSZ    = 0x1908
	DRDA_CP_CCSIDXML    = 0x1913
	DRDA_CP_MONITORRD   = 0x1C00
	DRDA_CP_XAMGR       = 0x1C01
	DRDA_CP_PKTOBJ      = 0x1C04
	DRDA_CP_UNICODEMGR  = 0x1C08
	DRDA_CP_ACCRDB      = 0x2001
	DRDA_CP_BGNBND      = 0x2002
	DRDA_CP_BNDSQLSTT   = 0x2004
	DRDA_CP_CLSQRY      = 0x2005
	DRDA_CP_CNTQRY      = 0x2006
	DRDA_CP_DRPPKG      = 0x2007
	DRDA_CP_DSCSQLSTT   = 0x2008
	DRDA_CP_ENDBND      = 0x2009
	DRDA_CP_EXCSQLIMM   = 0x200A
	DRDA_CP_EXCSQLSTT   = 0x200B
	DRDA_CP_OPNQRY      = 0x200C
	DRDA_CP_PRPSQLSTT   = 0x200D
	DRDA_CP_RDBCMM      = 0x200E
	DRDA_CP_RDBRLLBCK   = 0x200F
	DRDA_CP_REBIND      = 0x2010
	DRDA_CP_DSCRDBTBL   = 0x2012
	DRDA_CP_EXCSQLSET   = 0x2014
	DRDA_CP_DSCERRCD    = 0x2101
	DRDA_CP_QRYPRCTYP   = 0x2102
	DRDA_CP_RDBINTTKN   = 0x2103
	DRDA_CP_PRDDTA      = 0x2104
	DRDA_CP_RDBCMTOK    = 0x2105
	DRDA_CP_RDBCOLID    = 0x2108
	DRDA_CP_PKGID       = 0x2109
	DRDA_CP_PKGNAM      = 0x210A
	DRDA_CP_PKGSN       = 0x210C
	DRDA_CP_PKGCNSTKN   = 0x210D
	DRDA_CP_RTNSETSTT   = 0x210E
	DRDA_CP_RDBACCCL    = 0x210F
	DRDA_CP_RDBNAM      = 0x2110
	DRDA_CP_OUTEXP      = 0x2111
	DRDA_CP_PKGNAMCT    = 0x2112
	DRDA_CP_PKGNAMCSN   = 0x2113
	DRDA_CP_QRYBLKSZ    = 0x2114
	DRDA_CP_UOWDSP      = 0x2115
	DRDA_CP_RTNSQLDA    = 0x2116
	DRDA_CP_RDBALWUPD   = 0x211A
	DRDA_CP_SQLCSRHLD   = 0x211F
	DRDA_CP_STTSTRDEL   = 0x2120
	DRDA_CP_STTDECDEL   = 0x2121
	DRDA_CP_PKGDFTCST   = 0x2125
	DRDA_CP_QRYBLKCTL   = 0x2132
	DRDA_CP_QRYEXTDTASZ = 0x2134
	DRDA_CP_CRRTKN      = 0x2135
	DRDA_CP_SMLDTASZ    = 0x2136
	DRDA_CP_MEDDTASZ    = 0x2137
	DRDA_CP_PRCNAM      = 0x2138
	DRDA_CP_PKGSNLST    = 0x2139
	DRDA_CP_NBRROW      = 0x213A
	DRDA_CP_TRGDFTRT    = 0x213B
	DRDA_CP_QRYRELSCR   = 0x213C
	DRDA_CP_QRYROWNBR   = 0x213D
	DRDA_CP_QRYRFRTBL   = 0x213E
	DRDA_CP_MAXRSLCNT   = 0x2140
	DRDA_CP_MAXBLKEXT   = 0x2141
	DRDA_CP_RSLSETFLG   = 0x2142
	DRDA_CP_TYPSQLDA    = 0x2146
	DRDA_CP_OUTOVROPT   = 0x2147
	DRDA_CP_RTNEXTDTA   = 0x2148
	DRDA_CP_QRYATTSCR   = 0x2149
	DRDA_CP_DYNDTAFMT   = 0x214B
	DRDA_CP_QRYATTUPD   = 0x2150
	DRDA_CP_QRYSCRORN   = 0x2152
	DRDA_CP_QRYROWSNS   = 0x2153
	DRDA_CP_QRYBLKRST   = 0x2154
	DRDA_CP_QRYRTNDTA   = 0x2155
	DRDA_CP_QRYROWSET   = 0x2156
	DRDA_CP_QRYATTSNS   = 0x2157
	DRDA_CP_QRYINSID    = 0x215B
	DRDA_CP_QRYCLSIMP   = 0x215D
	DRDA_CP_QRYCLSRLS   = 0x215E
	DRDA_CP_QRYBLKFCT   = 0x215F
	DRDA_CP_DIAGLVL     = 0x2160
	DRDA_CP_ACCRDBRM    = 0x2201
	DRDA_CP_QRYNOPRM    = 0x2202
	DRDA_CP_RDBNACRM    = 0x2204
	DRDA_CP_OPNQRYRM    = 0x2205
	DRDA_CP_PKGBNARM    = 0x2206
	DRDA_CP_RDBACCRM    = 0x2207
	DRDA_CP_BGNBNDRM    = 0x2208
	DRDA_CP_PKGBPARM    = 0x2209
	DRDA_CP_DSCINVRM    = 0x220A
	DRDA_CP_ENDQRYRM    = 0x220B
	DRDA_CP_ENDUOWRM    = 0x220C
	DRDA_CP_ABNUOWRM    = 0x220D
	DRDA_CP_DTAMCHRM    = 0x220E
	DRDA_CP_QRYPOPRM    = 0x220F
	DRDA_CP_RDBNFNRM    = 0x2211
	DRDA_CP_OPNQFLRM    = 0x2212
	DRDA_CP_SQLERRRM    = 0x2213
	DRDA_CP_RDBUPDRM    = 0x2218
	DRDA_CP_RSLSETRM    = 0x2219
	DRDA_CP_RDBAFLRM    = 0x221A
	DRDA_CP_CMDVLTRM    = 0x221D
	DRDA_CP_CMMRQSRM    = 0x2225
	DRDA_CP_RDBATHRM    = 0x22CB
	DRDA_CP_SQLAM       = 0x2407
	DRDA_CP_SQLCARD     = 0x2408
	DRDA_CP_SQLCINRD    = 0x240B
	DRDA_CP_SQLRSLRD    = 0x240E
	DRDA_CP_RDB         = 0x240F
	DRDA_CP_FRCFIXROW   = 0x2410
	DRDA_CP_SQLDARD     = 0x2411
	DRDA_CP_SQLDTA      = 0x2412
	DRDA_CP_SQLDTARD    = 0x2413
	DRDA_CP_SQLSTT      = 0x2414
	DRDA_CP_OUTOVR      = 0x2415
	DRDA_CP_LMTBLKPRC   = 0x2417
	DRDA_CP_FIXROWPRC   = 0x2418
	DRDA_CP_SQLSTTVRB   = 0x2419
	DRDA_CP_QRYDSC      = 0x241A
	DRDA_CP_QRYDTA      = 0x241B
	DRDA_CP_CSTSYSDFT   = 0x2432
	DRDA_CP_CSTBITS     = 0x2433
	DRDA_CP_CSTSBCS     = 0x2434
	DRDA_CP_CSTMBCS     = 0x2435
	DRDA_CP_ISOLVLCHG   = 0x2441
	DRDA_CP_ISOLVLCS    = 0x2442
	DRDA_CP_ISOLVLALL   = 0x2443
	DRDA_CP_ISOLVLRR    = 0x2444
	DRDA_CP_ISOLVLNC    = 0x2445
	DRDA_CP_SRVLST      = 0x244E
	DRDA_CP_SQLATTR     = 0x2450
)
View Source
const (
	EXTNAM   = "GOLANG DRDA"
	SRVCLSNM = "DRDA/GOLANG"
	SRVRLSLV = "SQL11055"
)
View Source
const (
	// LOGIN
	// DRDA (Exchange Server Attributes)
	CP_EXCSAT   = 0x1041 // DDM (EXCSAT)
	CP_EXTNAM   = 0x115e // Parameter (External Name)
	CP_MGRLVLLS = 0x1404 // Parameter (Manager-Level List)
	CP_SRVCLSNM = 0x1147 // Parameter (Server Class Name)
	CP_SRVNAM   = 0x116d // Parameter (Server Name)
	CP_SRVRLSLV = 0x115a // Parameter (Server Product Release Level)

	// DRDA (Server Attributes Reply Data)
	CP_EXCSATRD = 0x1443 // DDM (EXCSATRD)

	CP_RDBNFNRM = 0x2211
	CP_SRVDGN   = 0x1153

	CP_SQLCARD = 0x2408

	// DRDA (Access Security)
	CP_ACCSEC = 0x106d // DDM (ACCSEC)
	CP_SECMEC = 0x11a2 // Parameter (Security Mechanism)
	CP_RDBNAM = 0x2110 // Parameter (Relational Database Name)
	CP_SECTKN = 0x11dc // Parameter (Security Token)

	// DRDA (Access Security Reply Data)
	CP_ACCSECRD = 0x14ac // DDM (ACCSECRD)

	CP_SQLERRRM = 0x2213

	// DRDA (Security Check)
	CP_SECCHK   = 0x106e // DDM (SECCHK)
	CP_USRID    = 0x11a0 // Parameter (User ID at the Target System)
	CP_PASSWORD = 0x11a1 // Parameter (Password)

	// DRDA (Access RDB)
	CP_ACCRDB    = 0x2001 // DDM (ACCRDB)
	CP_RDBACCCL  = 0x210f // Parameter (RDB Access Manager Class)
	CP_PRDID     = 0x112e // Parameter (Product-Specific Identifier)
	CP_PRDDTA    = 0x2104 // Parameter (Product-Specific Data)
	CP_TYPDEFNAM = 0x002f // Parameter (Data Type Definition Name)
	CP_TYPDEFOVR = 0x0035 // Parameter (TYPDEF Overrides)

	// SELECT
	// DRDA (Prepare SQL Statement)
	CP_PRPSQLSTT = 0x200d // DDM (PRPSQLSTT)
	CP_PKGNAMCSN = 0x2113 // Parameter (RDB Package Name, Consistency Token, and Section Number)
	CP_RTNSQLDA  = 0x2116 // Parameter (Maximum Result Set Count)
	CP_TYPSQLDA  = 0x2146 // Parameter (Type of SQL Descriptor Area)

	// DRDA (SQL Statement Attributes)
	CP_SQLATTR = 0x2450 // DDM (SQLATTR)
	CP_DATA    = 0x0000 // Parameter (Data)

	// DRDA (SQL Statement)
	CP_SQLSTT = 0x2414 // DDM (SQLSTT)

	// DRDA (Open Query)
	CP_OPNQRY    = 0x200c // DDM (OPNQRY)
	CP_QRYBLKSZ  = 0x2114 // Parameter (Query Block Size)
	CP_QRYCLSIMP = 0x215d // Parameter (Query Close Implicit)
	CP_OUTOVROPT = 0x2147 // Parameter (Output Override Option)
	CP_UNKNOWN   = 0x214b // Parameter (Unknown (0x214b))

	// DRDA (RDB Commit Unit of Work)
	CP_RDBCMM = 0x200e // DDM (RDBCMM)
)
View Source
const (
	DRDA_TP_Nullable   byte = 0x01
	DRDA_TP_CHAR       byte = 0x30
	DRDA_TP_NCHAR      byte = 0x31
	DRDA_TP_VARCHAR    byte = 0x32
	DRDA_TP_NVARCHAR   byte = 0x33
	DRDA_TP_VARMIX     byte = 0x3E
	DRDA_TP_NVARMIX    byte = 0x3F
	DRDA_TP_LONG       byte = 0x34
	DRDA_TP_NLONG      byte = 0x35
	DRDA_TP_LONGMIX    byte = 0x40
	DRDA_TP_NLONGMIX   byte = 0x41
	DRDA_TP_INTEGER    byte = 0x02
	DRDA_TP_NINTEGER   byte = 0x03
	DRDA_TP_BOOLEAN    byte = 0xBE
	DRDA_TP_NBOOLEAN   byte = 0xBF
	DRDA_TP_SMALL      byte = 0x04
	DRDA_TP_NSMALL     byte = 0x05
	DRDA_TP_DATE       byte = 0x20
	DRDA_TP_NDATE      byte = 0x21
	DRDA_TP_INTEGER8   byte = 0x16
	DRDA_TP_NINTEGER8  byte = 0x17
	DRDA_TP_FLOAT8     byte = 0x0A
	DRDA_TP_NFLOAT8    byte = 0x0B
	DRDA_TP_FLOAT4     byte = 0x0C
	DRDA_TP_NFLOAT4    byte = 0x0D
	DRDA_TP_TIME       byte = 0x22
	DRDA_TP_NTIME      byte = 0x23
	DRDA_TP_TIMESTAMP  byte = 0x24
	DRDA_TP_NTIMESTAMP byte = 0x25
	DRDA_TP_DECIMAL    byte = 0x0E
	DRDA_TP_NDECIMAL   byte = 0x0F
	DRDA_TP_LOBBYTES   byte = 0xC8
	DRDA_TP_NLOBBYTES  byte = 0xC9
	DRDA_TP_LOBCMIXED  byte = 0xCE
	DRDA_TP_NLOBCMIXED byte = 0xCF
)
View Source
const (
	DB2_TP_DATE       int16 = 0x180
	DB2_TP_NDATE      int16 = 0x181
	DB2_TP_TIME       int16 = 0x184
	DB2_TP_NTIME      int16 = 0x185
	DB2_TP_TIMESTAMP  int16 = 0x188
	DB2_TP_NTIMESTAMP int16 = 0x189
	DB2_TP_BLOB       int16 = 0x194
	DB2_TP_NBLOB      int16 = 0x195
	DB2_TP_CLOB       int16 = 0x198
	DB2_TP_NCLOB      int16 = 0x199
	DB2_TP_VARCHAR    int16 = 0x1C0
	DB2_TP_NVARCHAR   int16 = 0x1C1
	DB2_TP_CHAR       int16 = 0x1C4
	DB2_TP_NCHAR      int16 = 0x1C5
	DB2_TP_LONG       int16 = 0x1C8
	DB2_TP_NLONG      int16 = 0x1C9
	DB2_TP_FLOAT      int16 = 0x1E0
	DB2_TP_NFLOAT     int16 = 0x1E1
	DB2_TP_DECIMAL    int16 = 0x1E4
	DB2_TP_NDECIMAL   int16 = 0x1E5
	DB2_TP_BIGINT     int16 = 0x1EC
	DB2_TP_NBIGINT    int16 = 0x1ED
	DB2_TP_INTEGER    int16 = 0x1F0
	DB2_TP_NINTEGER   int16 = 0x1F1
	DB2_TP_SMALL      int16 = 0x1F4
	DB2_TP_NSMALL     int16 = 0x1F5
	DB2_TP_NUMERIC    int16 = 0x1F8
	DB2_TP_NNUMERIC   int16 = 0x1F9
	DB2_TP_BOOLEAN    int16 = 0x984
	DB2_TP_NBOOLEAN   int16 = 0x985
)
View Source
const CP_DSCSQLSTT = 0x2008
View Source
const CP_FDODSC = 0x0010
View Source
const CP_FDODTA = 0x147a
View Source
const CP_SQLDARD = 0x2411
View Source
const CP_SQLDTA = 0x2412

Variables

This section is empty.

Functions

func BytesToInt32

func BytesToInt32(data []byte) int32

func Int32ToBytes

func Int32ToBytes(value int32) []byte

func ToASCII

func ToASCII(data []byte) []byte

func ToEBCDIC

func ToEBCDIC(data []byte) []byte

func Unmarshal

func Unmarshal(data []byte, v any) error

Unmarshal Unmarshal

func WriteDRDA

func WriteDRDA(drda *DRDA) ([]byte, error)

Types

type A

type A struct {
	B string
	C []byte
	D byte
}

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func NewConnect

func NewConnect(addr, dbname, userid, passwd string) (*Conn, error)

func (*Conn) Close

func (conn *Conn) Close() error

func (*Conn) Login

func (conn *Conn) Login() error

func (*Conn) Read

func (conn *Conn) Read() (*DRDA, error)

func (*Conn) Select

func (conn *Conn) Select() error

func (*Conn) Write

func (conn *Conn) Write(drdas ...*DRDA) error

type DB2Type

type DB2Type struct {
	Type int16
	Len  uint16
}

func (DB2Type) ToDRDAType

func (t DB2Type) ToDRDAType() (o DRDAType, err error)

type DDM

type DDM struct {
	Length    int32
	Magic     byte
	Format    byte
	CorrelId  int32
	Length2   int32
	CodePoint int32
}

type DRDA

type DRDA struct {
	DDM        *DDM
	Parameters []*Parameter
}

func ReadDRDA

func ReadDRDA(data []byte) (*DRDA, error)

func (*DRDA) GetParameter

func (drda *DRDA) GetParameter(cp int32) *Parameter

type DRDAType

type DRDAType struct {
	Type byte
	Len  uint16
}

type DSCSQLSTT

type DSCSQLSTT struct {
	DDM       *DDM
	RDBNAM    string
	RDBCOLID  string // NULLID
	PKGID     string // SYSSH200
	PKGCNSTKN string // SYSLVL01
	PKGSN     int16
}

func (*DSCSQLSTT) WriteDSCSQLSTT

func (o *DSCSQLSTT) WriteDSCSQLSTT() (*DRDA, error)

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder Decoder

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder NewDecoder

func (*Decoder) Decode

func (dec *Decoder) Decode(v any) error

Decode Decode

func (*Decoder) DecodeSQLCAGRP

func (dec *Decoder) DecodeSQLCAGRP(v *SQLCAGRP) error

DecodeSQLCAGRP DecodeSQLCAGRP

func (*Decoder) DecodeSQLCAXGRP

func (dec *Decoder) DecodeSQLCAXGRP(v *SQLCAXGRP) error

DecodeSQLCAXGRP DecodeSQLCAXGRP

func (*Decoder) DecodeSQLDAGRP

func (dec *Decoder) DecodeSQLDAGRP(v *SQLDAGRP) error

DecodeSQLDAGRP DecodeSQLDAGRP

func (*Decoder) DecodeSQLDARD

func (dec *Decoder) DecodeSQLDARD(v *SQLDARD) error

DecodeSQLDARD DecodeSQLDARD

func (*Decoder) DecodeSQLDHGRP

func (dec *Decoder) DecodeSQLDHGRP(v *SQLDHGRP) error

DecodeSQLDHGRP DecodeSQLDHGRP

func (*Decoder) DecodeSQLDOPTGRP

func (dec *Decoder) DecodeSQLDOPTGRP(v *SQLDOPTGRP) error

DecodeSQLDOPTGRP DecodeSQLDOPTGRP

func (*Decoder) DecodeSQLDXGRP

func (dec *Decoder) DecodeSQLDXGRP(v *SQLDXGRP) error

DecodeSQLDXGRP DecodeSQLDXGRP

func (*Decoder) DecodeSQLUDTGRP

func (dec *Decoder) DecodeSQLUDTGRP(v *SQLUDTGRP) error

DecodeSQLUDTGRP DecodeSQLUDTGRP

func (*Decoder) ReadBool

func (dec *Decoder) ReadBool() (bool, error)

ReadBool ReadBool

func (*Decoder) ReadByteArray

func (dec *Decoder) ReadByteArray(v []byte) error

ReadByteArray ReadByteArray

func (*Decoder) ReadByteSlice

func (dec *Decoder) ReadByteSlice() ([]byte, error)

ReadByteSlice ReadByteSlice

func (*Decoder) ReadInt16

func (dec *Decoder) ReadInt16() (int16, error)

ReadInt16 ReadInt16

func (*Decoder) ReadInt32

func (dec *Decoder) ReadInt32() (int32, error)

ReadInt32 ReadInt32

func (*Decoder) ReadInt64

func (dec *Decoder) ReadInt64() (int64, error)

ReadInt64 ReadInt64

func (*Decoder) ReadInt8

func (dec *Decoder) ReadInt8() (int8, error)

ReadInt8 ReadInt8

func (*Decoder) ReadString

func (dec *Decoder) ReadString() (string, error)

ReadString ReadString

func (*Decoder) ReadUint16

func (dec *Decoder) ReadUint16() (uint16, error)

ReadUint16 ReadUint16

func (*Decoder) ReadUint32

func (dec *Decoder) ReadUint32() (uint32, error)

ReadUint32 ReadUint32

func (*Decoder) ReadUint64

func (dec *Decoder) ReadUint64() (uint64, error)

ReadUint64 ReadUint64

func (*Decoder) ReadUint8

func (dec *Decoder) ReadUint8() (uint8, error)

ReadUint8 ReadUint8

type EXCSAT

type EXCSAT struct {
	DDM        *DDM
	EXTNAM     string
	SRVNAM     string
	SRVCLSNM   string
	SRVRLSLV   string
	AGENT      int
	SQLAM      int
	RDB        int
	SECMGR     int
	CMNTCPIP   int
	UNICODEMGR int
}

func (*EXCSAT) WriteEXCSAT

func (o *EXCSAT) WriteEXCSAT() (*DRDA, error)

type OPNQRY

type OPNQRY struct {
	DDM       *DDM
	RDBNAM    string
	RDBCOLID  string // NULLID
	PKGID     string // SYSSH200
	PKGCNSTKN string // SYSLVL01
	PKGSN     int16
	DYNDTAFMT bool
}

func (*OPNQRY) WriteOPNQRY

func (o *OPNQRY) WriteOPNQRY() (*DRDA, error)

type PRPSQLSTT

type PRPSQLSTT struct {
	DDM       *DDM
	RDBNAM    string
	RDBCOLID  string // NULLID
	PKGID     string // SYSSH200
	PKGCNSTKN string // SYSLVL01
	PKGSN     int16
}

func (*PRPSQLSTT) WritePRPSQLSTT

func (o *PRPSQLSTT) WritePRPSQLSTT() (*DRDA, error)

type Parameter

type Parameter struct {
	Length    int32
	CodePoint int32
	Payload   []byte
}

type RDBCMM

type RDBCMM struct {
	DDM *DDM
}

func (*RDBCMM) WriteRDBCMM

func (o *RDBCMM) WriteRDBCMM() (*DRDA, error)

type Reader

type Reader bytes.Reader

func (*Reader) ReadByte

func (r *Reader) ReadByte() (byte, error)

func (*Reader) ReadUint8

func (r *Reader) ReadUint8() (uint8, error)

type SQLCAGRP

type SQLCAGRP struct {
	SQLSTATE      [5]byte
	SQLERRPROC    [8]byte
	SQLCAXGRPFLAG byte
	SQLCAXGRP     *SQLCAXGRP
}

SQLCAGRP SQLCAGRP

type SQLCARD

type SQLCARD struct {
	DDM         *DDM
	SqlState    int64
	SqlErrProc  string
	RowsFetched uint64
	RowsUpdated uint32
	SqlErrs     []byte
	SqlWarn     []byte
	SqlRDBName  string
	SqlMessageM string
	SqlMessageS string
}

type SQLCAXGRP

type SQLCAXGRP struct {
	ROWSFETCHED uint64
	ROWSUPDATED uint32
	SQLERRD     [12]byte
	SQLWARN     [11]byte
	SQLRDBNAME  string
	SQLERRMSGM  string
	SQLERRMSGS  string
}

SQLCAXGRP SQLCAXGRP

type SQLDAGRP

type SQLDAGRP struct {
	SQLPRECISION   uint16
	SQLSCALE       uint16
	SQLLENGTH      uint64
	SQLTYPE        uint16
	SQLCCSID       uint16
	SQLDOPTGRPFLAG byte
	SQLDOPTGRP     *SQLDOPTGRP
}

SQLDAGRP SQLDAGRP

type SQLDARD

type SQLDARD struct {
	SQLCAGRPFLAG byte
	SQLCAGRP     *SQLCAGRP
	SQLDHGRPFLAG byte
	SQLDHGRP     *SQLDHGRP
	SQLNUMBRP    uint16
	SQLDAGRP     []*SQLDAGRP `len:"SQLNUMBRP"`
}

SQLDARD SQLDARD

type SQLDHGRP

type SQLDHGRP struct {
	SQLDHOLD      uint16
	SQLDRETURN    uint16
	SQLDSCROLL    uint16
	SQLDSENSITIVE uint16
	SQLDFCODE     uint16
	SQLDKEYTYPE   uint16
	SQLDRDBNAM    string
	SQLDSCHEMAM   string
	SQLDSCHEMAS   string
}

SQLDHGRP SQLDHGRP

type SQLDOPTGRP

type SQLDOPTGRP struct {
	SQLUNNAMED    uint16
	SQLNAMEM      string
	SQLNAMES      string
	SQLLABELM     string
	SQLLABELS     string
	SQLCOMMENTSM  string
	SQLCOMMENTSS  string
	SQLUDTGRPFLAG byte
	SQLUDTGRP     *SQLUDTGRP
}

SQLDOPTGRP SQLDOPTGRP

type SQLDTA

type SQLDTA struct {
	DDM  *DDM
	Data []struct {
		Type  byte
		Len   int16
		Value []byte
	}
}

func (*SQLDTA) WriteSQLDTA

func (o *SQLDTA) WriteSQLDTA() (*DRDA, error)

type SQLDXGRP

type SQLDXGRP struct {
	SQLXKEYMEM     int16
	SQLXUPDATEABLE int16
	SQLXGENERATED  int16
	SQLXPARMMODE   int16
	SQLXRDBNAM     string
	SQLXCORNAMEM   string
	SQLXCORNAMES   string
	SQLXBASENAMEM  string
	SQLXBASENAMES  string
	SQLXSCHEMAM    string
	SQLXSCHEMAS    string
	SQLXNAMEM      string
	SQLXNAMES      string
}

SQLDXGRP SQLDXGRP

type SQLSTT

type SQLSTT struct {
	DDM  *DDM
	DATA string
}

func (*SQLSTT) WriteSQLSTT

func (o *SQLSTT) WriteSQLSTT() (*DRDA, error)

type SQLUDTGRP

type SQLUDTGRP struct {
	SQLUDTXTYPE   int16
	SQLUDTRDB     string
	SQLUDTSCHEMAM string
	SQLUDTSCHEMAS string
	SQLUDTNAMEM   string
	SQLUDTNAMES   string
	SQLDXGRPFLAG  byte
	SQLDXGRP      *SQLDXGRP
}

SQLUDTGRP SQLUDTGRP

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL