[Zope-Checkins] CVS: Products/DCOracle2/src - dco2.c:1.129
Matthew T. Kromer
matt@zope.com
Sat, 21 Dec 2002 15:27:37 -0500
Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv13205/src
Modified Files:
dco2.c
Log Message:
Fix OCINumeric for longs,
add LOB File operators to lobs for BFILE and CFILE types
=== Products/DCOracle2/src/dco2.c 1.128 => 1.129 === (524/624 lines abridged)
--- Products/DCOracle2/src/dco2.c:1.128 Tue Dec 10 21:08:18 2002
+++ Products/DCOracle2/src/dco2.c Sat Dec 21 15:27:36 2002
@@ -197,8 +197,9 @@
*/
/* 1 2 3 4
-** 12345678901234567890123456789012345678901234567890 */
-#define NUMFORMAT "9999999999999999999999999999999999999999D999999999"
+** 12345678901234567890123456789012345678901234567890 */
+#define NUMFORMAT "9999999999999999999999999999999999999999D999999999"
+#define NUMFORMATD "9999999999999999999999999999999999999999"
/* TRACE defines (trace globals are elsewhere)
**
@@ -233,6 +234,15 @@
/* Do doubleword alignment on ResultSet columns */
#define PADSIZE 8
+#define SETLOBTYPE(t, n, i) if (t == SQLT_BLOB || t == SQLT_CLOB) { \
+ n = "OCI_DTYPE_LOB"; \
+ i = OCI_DTYPE_LOB; \
+ } else { \
+ n = "OCI_DTYPE_FILE"; \
+ i = OCI_DTYPE_FILE; \
+ }
+
+
/*-----------------------------------------------------------------------
**
** Data types
@@ -620,6 +630,11 @@
static PyObject *LobLocator_read(LobLocator *self, PyObject *args);
static PyObject *LobLocator_write(LobLocator *self, PyObject *args);
static PyObject *LobLocator_trim(LobLocator *self, PyObject *args);
+static PyObject *LobLocator_open(LobLocator *self, PyObject *args);
+static PyObject *LobLocator_close(LobLocator *self, PyObject *args);
+static PyObject *LobLocator_getFileName(LobLocator *self, PyObject *args);
+static PyObject *LobLocator_setFileName(LobLocator *self, PyObject *args);
+static PyObject *LobLocator_fileExists(LobLocator *self, PyObject *args);
static TransactionContext *TransactionContext_alloc(ServerContext *sc,
int makeHandle);
static PyObject *TransactionContext_getattr(TransactionContext *self,
@@ -696,6 +711,8 @@
CONVERTOUTF(SQLT_LBI);
CONVERTOUTF(SQLT_BLOB);
CONVERTOUTF(SQLT_CLOB);
+CONVERTOUTF(SQLT_BFILE);
+CONVERTOUTF(SQLT_CFILE);
CONVERTOUTF(SQLT_RDD);
CONVERTOUTF(SQLT_CUR);
[-=- -=- -=- 524 lines omitted -=- -=- -=-]
return obj;
}
@@ -7254,15 +7522,45 @@
/*
** SQLT_CLOB
**
-** BLOB output
+** CLOB output
*/
CONVERTOUTF(SQLT_CLOB) {
PyObject *obj;
TRACE(T_ENTRY,("s", "CONVERTOUT(SQLT_CLOB)"));
- obj = conversionFromLob(sc, data);
+ obj = conversionFromLob(sc, data, type);
TRACE(T_EXIT,("sA", "CONVERTOUT(SQLT_CLOB)", obj));
+ return obj;
+}
+
+/*
+** SQLT_CFILE
+**
+** CFILE output
+*/
+
+CONVERTOUTF(SQLT_CFILE) {
+ PyObject *obj;
+
+ TRACE(T_ENTRY,("s", "CONVERTOUT(SQLT_CFILE)"));
+ obj = conversionFromLob(sc, data, type);
+ TRACE(T_EXIT,("sA", "CONVERTOUT(SQLT_CFILE)", obj));
+ return obj;
+}
+
+/*
+** SQLT_BFILE
+**
+** BFILE output
+*/
+
+CONVERTOUTF(SQLT_BFILE) {
+ PyObject *obj;
+
+ TRACE(T_ENTRY,("s", "CONVERTOUT(SQLT_BFILE)"));
+ obj = conversionFromLob(sc, data, type);
+ TRACE(T_EXIT,("sA", "CONVERTOUT(SQLT_BFILE)", obj));
return obj;
}