blob: af6d5cb3cb8d407798a1a9073692fb62accfb3e0 [file] [log] [blame]
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001/* statement.c - the statement type
2 *
Gerhard Häringe7ea7452008-03-29 00:45:29 +00003 * Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de>
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004 *
5 * This file is part of pysqlite.
6 *
7 * This software is provided 'as-is', without any express or implied
8 * warranty. In no event will the authors be held liable for any damages
9 * arising from the use of this software.
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software. If you use this software
17 * in a product, an acknowledgment in the product documentation would be
18 * appreciated but is not required.
19 * 2. Altered source versions must be plainly marked as such, and must not be
20 * misrepresented as being the original software.
21 * 3. This notice may not be removed or altered from any source distribution.
22 */
23
24#include "statement.h"
25#include "cursor.h"
26#include "connection.h"
27#include "microprotocols.h"
28#include "prepare_protocol.h"
29#include "sqlitecompat.h"
30
31/* prototypes */
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +000032static int pysqlite_check_remaining_sql(const char* tail);
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000033
34typedef enum {
35 LINECOMMENT_1,
36 IN_LINECOMMENT,
37 COMMENTSTART_1,
38 IN_COMMENT,
39 COMMENTEND_1,
40 NORMAL
41} parse_remaining_sql_state;
42
Gerhard Häringe7ea7452008-03-29 00:45:29 +000043typedef enum {
44 TYPE_LONG,
45 TYPE_FLOAT,
46 TYPE_STRING,
47 TYPE_UNICODE,
48 TYPE_BUFFER,
49 TYPE_UNKNOWN
50} parameter_type;
51
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +000052int pysqlite_statement_create(pysqlite_Statement* self, pysqlite_Connection* connection, PyObject* sql)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000053{
54 const char* tail;
55 int rc;
Guido van Rossum83857e32007-05-09 23:37:01 +000056 const char* sql_cstr;
57 Py_ssize_t sql_cstr_len;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000058
59 self->st = NULL;
60 self->in_use = 0;
61
Marc-André Lemburg4cc0f242008-08-07 18:54:33 +000062 sql_cstr = _PyUnicode_AsStringAndSize(sql, &sql_cstr_len);
Guido van Rossumfa9a1212007-08-29 03:34:29 +000063 if (sql_cstr == NULL) {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000064 rc = PYSQLITE_SQL_WRONG_TYPE;
65 return rc;
66 }
67
Thomas Wouters477c8d52006-05-27 19:21:47 +000068 self->in_weakreflist = NULL;
Guido van Rossum83857e32007-05-09 23:37:01 +000069 Py_INCREF(sql);
70 self->sql = sql;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000071
Benjamin Petersond7b03282008-09-13 15:58:53 +000072 Py_BEGIN_ALLOW_THREADS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000073 rc = sqlite3_prepare(connection->db,
74 sql_cstr,
75 -1,
76 &self->st,
77 &tail);
Benjamin Petersond7b03282008-09-13 15:58:53 +000078 Py_END_ALLOW_THREADS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000079
80 self->db = connection->db;
81
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +000082 if (rc == SQLITE_OK && pysqlite_check_remaining_sql(tail)) {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000083 (void)sqlite3_finalize(self->st);
84 self->st = NULL;
85 rc = PYSQLITE_TOO_MUCH_SQL;
86 }
87
88 return rc;
89}
90
Gerhard Häringe7ea7452008-03-29 00:45:29 +000091int pysqlite_statement_bind_parameter(pysqlite_Statement* self, int pos, PyObject* parameter, int allow_8bit_chars)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000092{
93 int rc = SQLITE_OK;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000094 PY_LONG_LONG longlongval;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000095 const char* buffer;
96 char* string;
97 Py_ssize_t buflen;
Gerhard Häringe7ea7452008-03-29 00:45:29 +000098 parameter_type paramtype;
99 char* c;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000100
101 if (parameter == Py_None) {
102 rc = sqlite3_bind_null(self->st, pos);
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000103 goto final;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000104 }
105
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000106 if (PyLong_CheckExact(parameter)) {
107 paramtype = TYPE_LONG;
108 } else if (PyFloat_CheckExact(parameter)) {
109 paramtype = TYPE_FLOAT;
110 } else if (PyUnicode_CheckExact(parameter)) {
111 paramtype = TYPE_UNICODE;
112 } else if (PyLong_Check(parameter)) {
113 paramtype = TYPE_LONG;
114 } else if (PyFloat_Check(parameter)) {
115 paramtype = TYPE_FLOAT;
116 } else if (PyUnicode_Check(parameter)) {
117 paramtype = TYPE_STRING;
118 } else if (PyObject_CheckBuffer(parameter)) {
119 paramtype = TYPE_BUFFER;
120 } else {
121 paramtype = TYPE_UNKNOWN;
122 }
123
124 if (paramtype == TYPE_STRING && !allow_8bit_chars) {
Christian Heimes72b710a2008-05-26 13:28:38 +0000125 string = PyBytes_AS_STRING(parameter);
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000126 for (c = string; *c != 0; c++) {
127 if (*c & 0x80) {
128 PyErr_SetString(pysqlite_ProgrammingError, "You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.");
129 rc = -1;
130 goto final;
131 }
132 }
133 }
134
135 switch (paramtype) {
136 case TYPE_LONG:
137 /* in the overflow error case, longval/longlongval is -1, and an exception is set */
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000138 longlongval = PyLong_AsLongLong(parameter);
139 rc = sqlite3_bind_int64(self->st, pos, (sqlite_int64)longlongval);
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000140 break;
141 case TYPE_FLOAT:
142 rc = sqlite3_bind_double(self->st, pos, PyFloat_AsDouble(parameter));
143 break;
144 case TYPE_UNICODE:
Marc-André Lemburg4cc0f242008-08-07 18:54:33 +0000145 string = _PyUnicode_AsString(parameter);
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000146 rc = sqlite3_bind_text(self->st, pos, string, -1, SQLITE_TRANSIENT);
147 break;
148 case TYPE_BUFFER:
149 if (PyObject_AsCharBuffer(parameter, &buffer, &buflen) == 0) {
150 rc = sqlite3_bind_blob(self->st, pos, buffer, buflen, SQLITE_TRANSIENT);
151 } else {
152 PyErr_SetString(PyExc_ValueError, "could not convert BLOB to buffer");
153 rc = -1;
154 }
155 break;
156 case TYPE_UNKNOWN:
157 rc = -1;
158 }
159
160final:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000161 return rc;
162}
163
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000164/* returns 0 if the object is one of Python's internal ones that don't need to be adapted */
165static int _need_adapt(PyObject* obj)
166{
167 if (pysqlite_BaseTypeAdapted) {
168 return 1;
169 }
170
171 if (PyLong_CheckExact(obj) || PyFloat_CheckExact(obj)
Christian Heimes9c4756e2008-05-26 13:22:05 +0000172 || PyUnicode_CheckExact(obj) || PyByteArray_CheckExact(obj)) {
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000173 return 0;
174 } else {
175 return 1;
176 }
177}
178
179void pysqlite_statement_bind_parameters(pysqlite_Statement* self, PyObject* parameters, int allow_8bit_chars)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000180{
181 PyObject* current_param;
182 PyObject* adapted;
183 const char* binding_name;
184 int i;
185 int rc;
186 int num_params_needed;
187 int num_params;
188
189 Py_BEGIN_ALLOW_THREADS
190 num_params_needed = sqlite3_bind_parameter_count(self->st);
191 Py_END_ALLOW_THREADS
192
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000193 if (PyTuple_CheckExact(parameters) || PyList_CheckExact(parameters) || (!PyDict_Check(parameters) && PySequence_Check(parameters))) {
194 /* parameters passed as sequence */
195 if (PyTuple_CheckExact(parameters)) {
196 num_params = PyTuple_GET_SIZE(parameters);
197 } else if (PyList_CheckExact(parameters)) {
198 num_params = PyList_GET_SIZE(parameters);
199 } else {
200 num_params = PySequence_Size(parameters);
201 }
202 if (num_params != num_params_needed) {
203 PyErr_Format(pysqlite_ProgrammingError, "Incorrect number of bindings supplied. The current statement uses %d, and there are %d supplied.",
204 num_params_needed, num_params);
205 return;
206 }
207 for (i = 0; i < num_params; i++) {
208 if (PyTuple_CheckExact(parameters)) {
209 current_param = PyTuple_GET_ITEM(parameters, i);
210 Py_XINCREF(current_param);
211 } else if (PyList_CheckExact(parameters)) {
212 current_param = PyList_GET_ITEM(parameters, i);
213 Py_XINCREF(current_param);
214 } else {
215 current_param = PySequence_GetItem(parameters, i);
216 }
217 if (!current_param) {
218 return;
219 }
220
221 if (!_need_adapt(current_param)) {
222 adapted = current_param;
223 } else {
Benjamin Petersond7b03282008-09-13 15:58:53 +0000224 adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)&pysqlite_PrepareProtocolType, NULL);
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000225 if (adapted) {
226 Py_DECREF(current_param);
227 } else {
228 PyErr_Clear();
229 adapted = current_param;
230 }
231 }
232
233 rc = pysqlite_statement_bind_parameter(self, i + 1, adapted, allow_8bit_chars);
234 Py_DECREF(adapted);
235
236 if (rc != SQLITE_OK) {
237 if (!PyErr_Occurred()) {
238 PyErr_Format(pysqlite_InterfaceError, "Error binding parameter %d - probably unsupported type.", i);
239 }
240 return;
241 }
242 }
243 } else if (PyDict_Check(parameters)) {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000244 /* parameters passed as dictionary */
245 for (i = 1; i <= num_params_needed; i++) {
246 Py_BEGIN_ALLOW_THREADS
247 binding_name = sqlite3_bind_parameter_name(self->st, i);
248 Py_END_ALLOW_THREADS
249 if (!binding_name) {
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000250 PyErr_Format(pysqlite_ProgrammingError, "Binding %d has no name, but you supplied a dictionary (which has only names).", i);
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000251 return;
252 }
253
254 binding_name++; /* skip first char (the colon) */
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000255 if (PyDict_CheckExact(parameters)) {
256 current_param = PyDict_GetItemString(parameters, binding_name);
257 Py_XINCREF(current_param);
258 } else {
259 current_param = PyMapping_GetItemString(parameters, (char*)binding_name);
260 }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000261 if (!current_param) {
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000262 PyErr_Format(pysqlite_ProgrammingError, "You did not supply a value for binding %d.", i);
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000263 return;
264 }
265
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000266 if (!_need_adapt(current_param)) {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000267 adapted = current_param;
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000268 } else {
Benjamin Petersond7b03282008-09-13 15:58:53 +0000269 adapted = pysqlite_microprotocols_adapt(current_param, (PyObject*)&pysqlite_PrepareProtocolType, NULL);
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000270 if (adapted) {
271 Py_DECREF(current_param);
272 } else {
273 PyErr_Clear();
274 adapted = current_param;
275 }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000276 }
277
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000278 rc = pysqlite_statement_bind_parameter(self, i, adapted, allow_8bit_chars);
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000279 Py_DECREF(adapted);
280
281 if (rc != SQLITE_OK) {
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000282 if (!PyErr_Occurred()) {
283 PyErr_Format(pysqlite_InterfaceError, "Error binding parameter :%s - probably unsupported type.", binding_name);
284 }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000285 return;
286 }
287 }
288 } else {
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000289 PyErr_SetString(PyExc_ValueError, "parameters are of unsupported type");
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000290 }
291}
292
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000293int pysqlite_statement_recompile(pysqlite_Statement* self, PyObject* params)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000294{
295 const char* tail;
296 int rc;
Guido van Rossum83857e32007-05-09 23:37:01 +0000297 const char* sql_cstr;
298 Py_ssize_t sql_len;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000299 sqlite3_stmt* new_st;
300
Marc-André Lemburg4cc0f242008-08-07 18:54:33 +0000301 sql_cstr = _PyUnicode_AsStringAndSize(self->sql, &sql_len);
Guido van Rossumfa9a1212007-08-29 03:34:29 +0000302 if (sql_cstr == NULL) {
Guido van Rossum83857e32007-05-09 23:37:01 +0000303 rc = PYSQLITE_SQL_WRONG_TYPE;
304 return rc;
305 }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000306
Benjamin Petersond7b03282008-09-13 15:58:53 +0000307 Py_BEGIN_ALLOW_THREADS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000308 rc = sqlite3_prepare(self->db,
309 sql_cstr,
310 -1,
311 &new_st,
312 &tail);
Benjamin Petersond7b03282008-09-13 15:58:53 +0000313 Py_END_ALLOW_THREADS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000314
315 if (rc == SQLITE_OK) {
316 /* The efficient sqlite3_transfer_bindings is only available in SQLite
317 * version 3.2.2 or later. For older SQLite releases, that might not
318 * even define SQLITE_VERSION_NUMBER, we do it the manual way.
319 */
320 #ifdef SQLITE_VERSION_NUMBER
321 #if SQLITE_VERSION_NUMBER >= 3002002
Christian Heimes38053212007-12-14 01:24:44 +0000322 /* The check for the number of parameters is necessary to not trigger a
323 * bug in certain SQLite versions (experienced in 3.2.8 and 3.3.4). */
324 if (sqlite3_bind_parameter_count(self->st) > 0) {
325 (void)sqlite3_transfer_bindings(self->st, new_st);
326 }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000327 #endif
328 #else
329 statement_bind_parameters(self, params);
330 #endif
331
332 (void)sqlite3_finalize(self->st);
333 self->st = new_st;
334 }
335
336 return rc;
337}
338
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000339int pysqlite_statement_finalize(pysqlite_Statement* self)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000340{
341 int rc;
342
343 rc = SQLITE_OK;
344 if (self->st) {
345 Py_BEGIN_ALLOW_THREADS
346 rc = sqlite3_finalize(self->st);
347 Py_END_ALLOW_THREADS
348 self->st = NULL;
349 }
350
351 self->in_use = 0;
352
353 return rc;
354}
355
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000356int pysqlite_statement_reset(pysqlite_Statement* self)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000357{
358 int rc;
359
360 rc = SQLITE_OK;
361
362 if (self->in_use && self->st) {
363 Py_BEGIN_ALLOW_THREADS
364 rc = sqlite3_reset(self->st);
365 Py_END_ALLOW_THREADS
366
367 if (rc == SQLITE_OK) {
368 self->in_use = 0;
369 }
370 }
371
372 return rc;
373}
374
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000375void pysqlite_statement_mark_dirty(pysqlite_Statement* self)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000376{
377 self->in_use = 1;
378}
379
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000380void pysqlite_statement_dealloc(pysqlite_Statement* self)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000381{
382 int rc;
383
384 if (self->st) {
385 Py_BEGIN_ALLOW_THREADS
386 rc = sqlite3_finalize(self->st);
387 Py_END_ALLOW_THREADS
388 }
389
390 self->st = NULL;
391
392 Py_XDECREF(self->sql);
393
Thomas Wouters477c8d52006-05-27 19:21:47 +0000394 if (self->in_weakreflist != NULL) {
395 PyObject_ClearWeakRefs((PyObject*)self);
396 }
397
Christian Heimes90aa7642007-12-19 02:45:37 +0000398 Py_TYPE(self)->tp_free((PyObject*)self);
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000399}
400
401/*
402 * Checks if there is anything left in an SQL string after SQLite compiled it.
403 * This is used to check if somebody tried to execute more than one SQL command
404 * with one execute()/executemany() command, which the DB-API and we don't
405 * allow.
406 *
407 * Returns 1 if there is more left than should be. 0 if ok.
408 */
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000409static int pysqlite_check_remaining_sql(const char* tail)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000410{
411 const char* pos = tail;
412
413 parse_remaining_sql_state state = NORMAL;
414
415 for (;;) {
416 switch (*pos) {
417 case 0:
418 return 0;
419 case '-':
420 if (state == NORMAL) {
421 state = LINECOMMENT_1;
422 } else if (state == LINECOMMENT_1) {
423 state = IN_LINECOMMENT;
424 }
425 break;
426 case ' ':
427 case '\t':
428 break;
429 case '\n':
430 case 13:
431 if (state == IN_LINECOMMENT) {
432 state = NORMAL;
433 }
434 break;
435 case '/':
436 if (state == NORMAL) {
437 state = COMMENTSTART_1;
438 } else if (state == COMMENTEND_1) {
439 state = NORMAL;
440 } else if (state == COMMENTSTART_1) {
441 return 1;
442 }
443 break;
444 case '*':
445 if (state == NORMAL) {
446 return 1;
447 } else if (state == LINECOMMENT_1) {
448 return 1;
449 } else if (state == COMMENTSTART_1) {
450 state = IN_COMMENT;
451 } else if (state == IN_COMMENT) {
452 state = COMMENTEND_1;
453 }
454 break;
455 default:
456 if (state == COMMENTEND_1) {
457 state = IN_COMMENT;
458 } else if (state == IN_LINECOMMENT) {
459 } else if (state == IN_COMMENT) {
460 } else {
461 return 1;
462 }
463 }
464
465 pos++;
466 }
467
468 return 0;
469}
470
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000471PyTypeObject pysqlite_StatementType = {
Martin v. Löwis9f2e3462007-07-21 17:22:18 +0000472 PyVarObject_HEAD_INIT(NULL, 0)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000473 MODULE_NAME ".Statement", /* tp_name */
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000474 sizeof(pysqlite_Statement), /* tp_basicsize */
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000475 0, /* tp_itemsize */
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000476 (destructor)pysqlite_statement_dealloc, /* tp_dealloc */
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000477 0, /* tp_print */
478 0, /* tp_getattr */
479 0, /* tp_setattr */
480 0, /* tp_compare */
481 0, /* tp_repr */
482 0, /* tp_as_number */
483 0, /* tp_as_sequence */
484 0, /* tp_as_mapping */
485 0, /* tp_hash */
486 0, /* tp_call */
487 0, /* tp_str */
488 0, /* tp_getattro */
489 0, /* tp_setattro */
490 0, /* tp_as_buffer */
Gerhard Häringe7ea7452008-03-29 00:45:29 +0000491 Py_TPFLAGS_DEFAULT, /* tp_flags */
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000492 0, /* tp_doc */
493 0, /* tp_traverse */
494 0, /* tp_clear */
495 0, /* tp_richcompare */
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000496 offsetof(pysqlite_Statement, in_weakreflist), /* tp_weaklistoffset */
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000497 0, /* tp_iter */
498 0, /* tp_iternext */
499 0, /* tp_methods */
500 0, /* tp_members */
501 0, /* tp_getset */
502 0, /* tp_base */
503 0, /* tp_dict */
504 0, /* tp_descr_get */
505 0, /* tp_descr_set */
506 0, /* tp_dictoffset */
507 (initproc)0, /* tp_init */
508 0, /* tp_alloc */
509 0, /* tp_new */
510 0 /* tp_free */
511};
512
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000513extern int pysqlite_statement_setup_types(void)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000514{
Thomas Woutersfc7bb8c2007-01-15 15:49:28 +0000515 pysqlite_StatementType.tp_new = PyType_GenericNew;
516 return PyType_Ready(&pysqlite_StatementType);
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000517}