<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta name="Generator" content="Zarafa WebAccess v6.20.4-14107">
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<title>hu.dwim.rdbms+oracle+utf+read-from-server-problem-5</title>
<style type="text/css">
body
{
font-family: Arial, Verdana, Sans-Serif;
font-size: 12px;
padding: 5px 5px 5px 5px;
margin: 0px;
border-style: none;
background-color: #ffffff;
}
p, ul, li
{
margin-top: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body>
<p>Looking at the source and debug output now. How can I find out more about the converter.<br />For example the function typemap-oci-to-lisp is somewhat mysterious to me. Where is it defined?<br /><br /><br />ORACLE> (describe #'typemap-oci-to-lisp)<br />#<CLOSURE (LAMBDA (SB-KERNEL:INSTANCE)) {1003A97B79}><br /> [compiled closure]<br /><br />Lambda-list: (INSTANCE)<br />Derived type: (FUNCTION (T) (VALUES T &OPTIONAL))<br />Source file: SYS:SRC;CODE;TARGET-DEFSTRUCT.LISP<br />; No value<br />ORACLE> <br /><br /><br />chris@catch22:~/code/lisp-tp$ ls hu-dwim/<br />hu.dwim.asdf hu.dwim.common hu.dwim.common-lisp hu.dwim.def hu.dwim.defclass-star hu.dwim.logger hu.dwim.rdbms hu.dwim.syntax-sugar hu.dwim.util hu.dwim.walker local-time<br /><br />chris@catch22:~/code/lisp-tp$ grep -R "typemap-oci-to-lisp" hu-dwim<br />hu-dwim/hu.dwim.rdbms/source/oracle/backend.lisp: (converter (typemap-oci-to-lisp (typemap-of column-descriptor))))<br /><br /><br />*** source/oracle/backend.lisp<br /><br />(def function fetch-column-value (column-descriptor row-index)<br /> (rdbms.debug "Fetching ~S from buffer at index ~D" (name-of column-descriptor) row-index)<br /> (aprog1 (let* ((indicator (cffi:mem-aref (indicators-of column-descriptor) :short row-index)))<br /> (if (= indicator -1)<br /> :null<br /> (let* ((buffer (buffer-of column-descriptor))<br /> (size (size-of column-descriptor))<br /> (converter (typemap-oci-to-lisp (typemap-of column-descriptor))))<br /> #+nil<br /> (rdbms.dribble "Buffer:~%~A"<br /> (dump-c-byte-array buffer (* size +number-of-buffered-rows+)))<br /> (rdbms.dribble "Convert from ~D, size is ~D, content:~%~A"<br /> (typemap-external-type (typemap-of column-descriptor)) size<br /> (dump-c-byte-array (cffi:inc-pointer buffer (* row-index size))<br /> size))<br /><br /> (funcall converter<br /> (cffi:inc-pointer buffer (* row-index size))<br /> size))))<br /> (rdbms.debug "Fetched: ~S" it)))<br /><br /><br />*** sbcl/shell<br /><br />* (setf (hu.dwim.rdbms::log-level 'rdbms) 0)<br />* (select-symtag)<br />12:20 0 RDBMS DEBUG About to BEGIN transaction in database #<ORACLE {1002AB8041}><br />12:20 0 SQL DRIBBLE SELECT SYMTAG_KEY FROM symtag<br />12:20 0 RDBMS DEBUG Executing "SELECT SYMTAG_KEY FROM symtag"<br />STYLE-WARNING: Undefined alien: "OCIGetInstantClientPackageName"<br />STYLE-WARNING: Undefined alien: "OCIGetInstantClientPackageName"<br />12:20 0 RDBMS DEBUG Connecting in transaction #<#<STANDARD-CLASS NIL {10030AFD91}> :begin-executed-p #t {1003D1DE11}><br />12:20 0 RDBMS DEBUG Logging on in transaction #<#<STANDARD-CLASS NIL {10030AFD91}> :begin-executed-p #t {1003D1DE11}><br />12:20 0 RDBMS DEBUG Preparing command: "SELECT SYMTAG_KEY FROM symtag"<br />12:20 0 RDBMS DRIBBLE Statement is allocated<br />12:20 0 RDBMS DRIBBLE Retrieving column: name="??????????", type=1, size=44<br />12:20 0 RDBMS DEBUG Fetching "??????????" from buffer at index 0<br />12:20 0 RDBMS DRIBBLE Convert from 5, size is 90, content:<br />66 00 6F 00 6F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <br />12:20 0 RDBMS DEBUG Fetched: "???"<br />12:20 0 RDBMS DEBUG Fetching "??????????" from buffer at index 0<br />12:20 0 RDBMS DRIBBLE Convert from 5, size is 90, content:<br />66 00 6F 00 6F 00 31 00 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <br />12:20 0 RDBMS DEBUG Fetched: "?????"<br />12:20 0 RDBMS DEBUG Fetching "??????????" from buffer at index 0<br />12:20 0 RDBMS DRIBBLE Convert from 5, size is 90, content:<br />66 00 6F 00 6F 00 62 00 61 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <br />12:20 0 RDBMS DEBUG Fetched: "??????"<br />12:20 0 RDBMS DEBUG Fetching "??????????" from buffer at index 0<br />12:20 0 RDBMS DRIBBLE Convert from 5, size is 90, content:<br />66 00 6F 00 6F 00 62 00 61 00 72 00 33 00 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <br />12:20 0 RDBMS DEBUG Fetched: "????????"<br />12:20 0 RDBMS DEBUG About to COMMIT transaction #<#<STANDARD-CLASS NIL {10030AFD91}> :begin-executed-p #t {1003D1DE11}><br />12:20 0 RDBMS DEBUG Cleaning up Oracle transaction #<#<STANDARD-CLASS NIL {10030AFD91}> :begin-executed-p #t {1003D1DE11}> to database #<ORACLE {1002AB8041}><br />12:20 0 RDBMS DEBUG Calling logoff in transaction #<#<STANDARD-CLASS NIL {10030AFD91}> :begin-executed-p #t {1003D1DE11}><br />12:20 0 RDBMS DEBUG Freeing environment handle of transaction #<#<STANDARD-CLASS NIL {10030AFD91}> :begin-executed-p #t {1003D1DE11}><br />#<(AND (VECTOR T 8) (NOT SIMPLE-ARRAY)) {1003DCCCBF}><br />* <br /><br /><br />66 00 6F 00 6F 00 equals "foo"<br /><br />66 00 6F 00 6F 00 31 00 31 00 equals "foo11"<br /><br />66 00 6F 00 6F 00 62 00 61 00 72 00 equals "foobar"<br /><br />66 00 6F 00 6F 00 62 00 61 00 72 00 33 00 33 00 equals "foobar33"<br /><br /><br /><br /><br />*** sqlplus<br /><br />SQL> select "SYMTAG_KEY" from symtag;<br /><br />SYMTAG_KEY<br />--------------------------------------------------------------------------------<br />foo<br />foobar<br />foo11<br />foobar33<br /><br />SQL><br /><br /><br /><br /><br />Regards,<br />chris</p>
!DSPAM:4cd154f948581496711765!
</body>
</html>