123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- package xugu
- import (
- "fmt"
- )
- const RETURN_PREPARE_SELECT = 19665
- func xuguPrepare(pConn *xuguConn, cmd_sql string, prepareName string) error {
- fmt.Println("\n ---xuguPrepare")
- sqlRet := fmt.Sprintf("PREPARE %s AS %s", prepareName, cmd_sql)
-
-
-
- sockSendPutStatement(pConn, []byte(sqlRet), nil, 0)
- XGC_Execute(pConn)
-
-
-
- _, err := xuguSockRecvMsg(pConn)
- if err != nil {
- fmt.Println("xuguPrepare parseMsg(&pConn.readBuff, pConn)")
- return err
- }
- fmt.Println("Message from server:", pConn.readBuff.buf[pConn.readBuff.idx:])
- fmt.Println("Message from server:", string(pConn.readBuff.buf[pConn.readBuff.idx:]))
- fmt.Println("\n ---xuguPrepare end")
- return nil
- }
|