Comments (4)
As most of the time, direct path is used with text files, its support was made using string in OCILIB.
You're right indeed. It is a nice enhancement.
from ocilib.
Also I think it's worse to be able to handle BINARY_FLOAT, BINARY_DOUBLE the same way, though I have not faced with those types yet:
https://support.oracle.com/knowledge/Oracle%20Database%20Products/1315200_1.html
and INTERVAL types - those do work fine with current textual conversion at the moment, but taking into account that such conversion is potentially buggy - I'd copy them using DUMP()ed values as well.
from ocilib.
Final findings for today:
- While DATE, TIMESTAMP values can be copied using
memcpy(data, value, (size_t) size);
the NUMBER raw values need to be copied using
memcpy(data, value, (size_t) size + 1);
due subsequent
dpcol->lens[row-1] = size;
- Also I was not able to find any documented example how to handle the TIMESTAMP values for Direct Path API properly, in terms of the sqlcode values - do we need to specify SQLT_ ones or actual DUMP() Types, probably it worse to debug SQL*Loader calls - gbd is able to set breakpoint on OCIAttrSet()
Accodring to the next link
https://ellebaek.wordpress.com/2011/02/25/oracle-type-code-mappings/
for NUMBER and DATE the SQLT_NUM, SQLT_DAT and DUMP()ed type codes are the same (2 and 12, respectively),
while for timestamps those differ, and each type has own behavior:
for TIMESTAMP WITH LOCAL TIMEZONE only 232 (SQLT_TIMESTAMP_LTZ) - fits, DUMP() shows 231 as result, if we initially specify 231 then OCI gives AV error.
for TIMESTAMP WITH TIMEZONE both 181 and 188 (SQLT_TIMESTAMP_TZ) work fine, DUMP() shows 181 as result but
for TIMESTAMP only 180 fits, while 187 code, i.e. SQLT_TIMESTAMP gives conversion result.
DUMP() shows 180
So there is no unambiguous way how to handle sqlcode for the TIMESTAMPs, unfortunately.
from ocilib.
Closing this issue (7 years old) as it won't be addressed in a near future.
from ocilib.
Related Issues (20)
- OCI_RefToText() return garbage when charset is OCI_CHARSET_WIDE HOT 1
- Error occurred at OcilibEnvironmentInitialize: Cannot load OCI shared library (oci.dll) HOT 4
- Error occurred at OcilibResultsetFetchFirst: A null Resultset handle has been provided HOT 5
- Regarding the use of connection pool to obtain links, will it be automatically recycled by connection pool? HOT 1
- I don't know why I suddenly reported this error: ocilib\include\ocilibcpp\detail\exception.hpp(92): error C2061: syntax error: identifier 'nothrow' HOT 1
- Regarding using ocilib::Pool to get links ,what happens if the maximum link is reached? HOT 1
- symbol not found in flat namespace '_OCIAQDeq' (macOS arm64) HOT 3
- Wrapper for OCINlsGetInfo() HOT 1
- On connection pool problem HOT 6
- On the limitation of the number of preprocessing bindings? HOT 1
- Why does ocilib::Resultset restrict the default construct? HOT 1
- crash with using change notification HOT 1
- Free memory after dequeue HOT 1
- DCN getObjectName display mess code HOT 1
- Invalid problem of batch std::vector<ocilib::Date > date display. HOT 4
- C++ Value types perform handle assignment instead of value assignment
- Two doubts ! HOT 1
- Reusing prepared statement hangs HOT 2
- OcilibElementSetRaw bug HOT 1
- Pool connection is never released (C++) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ocilib.