ruby-informix 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Changelog +10 -0
- data/README +5 -9
- data/ext/extconf.rb +8 -7
- data/ext/informixc.c +454 -471
- data/ext/informixc.ec +65 -79
- data/lib/informix.rb +13 -9
- data/lib/informix/exceptions.rb +2 -2
- data/lib/informix/interval.rb +2 -2
- data/lib/informix/scrollcursor.rb +2 -2
- data/lib/informix/seqcursor.rb +2 -2
- data/test/ifx_all.rb +0 -0
- data/test/ifx_test_create_table.rb +0 -0
- data/test/ifx_test_errinfo.rb +0 -0
- data/test/ifx_test_exceptions.rb +0 -0
- data/test/ifx_test_fetch_n_each.rb +0 -0
- data/test/ifx_test_insert.rb +0 -0
- data/test/ifx_test_select.rb +0 -0
- data/test/testcase.rb +0 -0
- metadata +43 -37
data/Changelog
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
0.7.2 2008-11-21
|
2
|
+
------------------
|
3
|
+
Bugs fixed:
|
4
|
+
* rb_cArray symbol was duplicated
|
5
|
+
|
6
|
+
Caveats:
|
7
|
+
* Database#each and Database#each_hash renamed to Database#foreach and
|
8
|
+
Database#foreach_hash respectively.
|
9
|
+
|
10
|
+
|
1
11
|
0.7.1 04/02/2008
|
2
12
|
------------------
|
3
13
|
Bugs fixed:
|
data/README
CHANGED
@@ -103,12 +103,12 @@ http://ruby-informix.rubyforge.org/examples.html
|
|
103
103
|
|
104
104
|
NULL values can be inserted and are retrieved as +nil+.
|
105
105
|
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
Any IO-like object that provides a read method, e.g. StringIO or File objects,
|
107
|
+
can be used to insert data in BYTE or TEXT fields. Data retrieved from
|
108
|
+
BYTE and TEXT fields are stored in String objects.
|
109
109
|
|
110
|
-
Strings can be used
|
111
|
-
|
110
|
+
Strings can be used where Informix accepts them for non-character data types,
|
111
|
+
like DATE, DATETIME, INTERVAL, BOOL, DECIMAL and MONEY
|
112
112
|
|
113
113
|
|
114
114
|
== Recommendations
|
@@ -140,7 +140,3 @@ questions directly to my mailbox or the following forums:
|
|
140
140
|
Ruby/Informix is available under the three-clause BSD license
|
141
141
|
|
142
142
|
:include: COPYRIGHT
|
143
|
-
|
144
|
-
-----------------------------------------
|
145
|
-
Gerardo Santana <gerardo.santana gmail>
|
146
|
-
http://santanatechnotes.blogspot.com
|
data/ext/extconf.rb
CHANGED
@@ -2,20 +2,21 @@ require 'mkmf'
|
|
2
2
|
|
3
3
|
env = nil
|
4
4
|
informixdir = ENV["INFORMIXDIR"]
|
5
|
+
MSWindows = /djgpp|(cyg|ms|bcc)win|mingw/
|
5
6
|
|
6
7
|
if informixdir.nil?
|
7
|
-
informixdir = RUBY_PLATFORM =~
|
8
|
+
informixdir = RUBY_PLATFORM =~ MSWindows ? "C:/informix" : "/usr/informix"
|
8
9
|
end
|
9
10
|
|
10
|
-
esql =
|
11
|
-
idefault =
|
12
|
-
ldefault = [
|
13
|
-
ldefault <<
|
11
|
+
esql = informixdir + "/bin/esql"
|
12
|
+
idefault = informixdir + "/incl/esql"
|
13
|
+
ldefault = [ informixdir + "/lib" ]
|
14
|
+
ldefault << informixdir + "/lib/esql" if RUBY_PLATFORM !~ MSWindows
|
14
15
|
|
15
16
|
dir_config("informix", idefault, ldefault)
|
16
17
|
|
17
|
-
if RUBY_PLATFORM =~
|
18
|
-
$libs += "
|
18
|
+
if RUBY_PLATFORM =~ MSWindows
|
19
|
+
$libs += informixdir + "/lib/isqlt09a.lib"
|
19
20
|
else
|
20
21
|
env = "/usr/bin/env"
|
21
22
|
|
data/ext/informixc.c
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#include <sqlhdr.h>
|
2
2
|
#include <sqliapi.h>
|
3
3
|
#line 1 "informixc.ec"
|
4
|
-
/* $Id: informixc.ec,v 1.28 2008/04/02 19:28:06 santana Exp $ */
|
5
4
|
/*
|
6
5
|
* Copyright (c) 2006-2008, Gerardo Santana Gomez Garrido <gerardo.santana@gmail.com>
|
7
6
|
* All rights reserved.
|
@@ -31,8 +30,6 @@
|
|
31
30
|
* POSSIBILITY OF SUCH DAMAGE.
|
32
31
|
*/
|
33
32
|
|
34
|
-
static const char rcsid[] = "$Id: informixc.ec,v 1.28 2008/04/02 19:28:06 santana Exp $";
|
35
|
-
|
36
33
|
#include "ruby.h"
|
37
34
|
|
38
35
|
#include <sqlstype.h>
|
@@ -52,8 +49,6 @@ static VALUE rb_cStatement, rb_cCursorBase;
|
|
52
49
|
static VALUE rb_cSequentialCursor, rb_cScrollCursor, rb_cInsertCursor;
|
53
50
|
static VALUE rb_cIfxVersion;
|
54
51
|
|
55
|
-
static VALUE rb_cArray;
|
56
|
-
|
57
52
|
/* Exceptions */
|
58
53
|
static VALUE rb_eError, rb_eWarning, rb_eInternalError;
|
59
54
|
static VALUE rb_eProgrammingError, rb_eOperationalError, rb_eDatabaseError;
|
@@ -169,8 +164,8 @@ rbifx_ext_exception(VALUE exception_class)
|
|
169
164
|
/*
|
170
165
|
* EXEC SQL BEGIN DECLARE SECTION;
|
171
166
|
*/
|
172
|
-
#line
|
173
|
-
#line
|
167
|
+
#line 161 "informixc.ec"
|
168
|
+
#line 162 "informixc.ec"
|
174
169
|
int4 sql_code;
|
175
170
|
char sql_state[6];
|
176
171
|
char class_origin_val[256];
|
@@ -185,72 +180,67 @@ mint i;
|
|
185
180
|
/*
|
186
181
|
* EXEC SQL END DECLARE SECTION;
|
187
182
|
*/
|
188
|
-
#line
|
183
|
+
#line 176 "informixc.ec"
|
189
184
|
|
190
185
|
|
191
|
-
|
186
|
+
new_instance = rb_class_new_instance(0, 0, exception_class);
|
192
187
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
rb_class2name(rb_eError));
|
203
|
-
}
|
188
|
+
/* Check that instance of exception_class is derived from Informix::Error */
|
189
|
+
if (!rb_obj_is_kind_of(new_instance, rb_eError) &&
|
190
|
+
!rb_obj_is_kind_of(new_instance, rb_eWarning)) {
|
191
|
+
rb_raise(rb_eRuntimeError, "Can't instantiate exception from %s, "
|
192
|
+
"only from %s or %s or their children",
|
193
|
+
rb_class2name(exception_class),
|
194
|
+
rb_class2name(rb_eWarning),
|
195
|
+
rb_class2name(rb_eError));
|
196
|
+
}
|
204
197
|
|
205
198
|
/*
|
206
|
-
*
|
199
|
+
* EXEC SQL GET DIAGNOSTICS :exc_count = NUMBER;
|
207
200
|
*/
|
208
|
-
#line
|
201
|
+
#line 190 "informixc.ec"
|
209
202
|
{
|
210
|
-
#line
|
203
|
+
#line 190 "informixc.ec"
|
211
204
|
static ifx_hostvar_t _SQhtab[] =
|
212
205
|
{
|
213
206
|
{ 0, 1, 102, sizeof(exc_count), 0, 0, 0, 0 },
|
214
207
|
{ 0, 0, 0, 0, 0, 0, 0, 0 }
|
215
|
-
#line
|
208
|
+
#line 190 "informixc.ec"
|
216
209
|
};
|
217
210
|
_SQhtab[0].hostaddr = (char *)&exc_count;
|
218
|
-
#line
|
211
|
+
#line 190 "informixc.ec"
|
219
212
|
sqli_diag_get(ESQLINTVERSION, _SQhtab, -1);
|
220
|
-
#line
|
213
|
+
#line 190 "informixc.ec"
|
221
214
|
}
|
222
215
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
*
|
241
|
-
*
|
242
|
-
*
|
243
|
-
*
|
244
|
-
*
|
245
|
-
*
|
246
|
-
*
|
247
|
-
|
248
|
-
|
249
|
-
* ;
|
250
|
-
*/
|
251
|
-
#line 215 "informixc.ec"
|
216
|
+
if (exc_count == 0) { /* Something went wrong */
|
217
|
+
char message[128];
|
218
|
+
snprintf(message, sizeof(message), "SQL ERROR: SQLCODE %d "
|
219
|
+
"(sorry, no GET DIAGNOSTICS information available)", SQLCODE);
|
220
|
+
{
|
221
|
+
VALUE argv[] = { rb_str_new2(message) };
|
222
|
+
return rb_class_new_instance(NUM_ELEMS(argv),argv,rb_eOperationalError);
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
for (i = 0; i < exc_count; ++i) {
|
227
|
+
sql_exception_number = i + 1;
|
228
|
+
|
229
|
+
/*
|
230
|
+
* EXEC SQL GET DIAGNOSTICS EXCEPTION :sql_exception_number
|
231
|
+
* :sql_code = INFORMIX_SQLCODE,
|
232
|
+
* :sql_state = RETURNED_SQLSTATE,
|
233
|
+
* :class_origin_val = CLASS_ORIGIN,
|
234
|
+
* :subclass_origin_val = SUBCLASS_ORIGIN,
|
235
|
+
* :message = MESSAGE_TEXT,
|
236
|
+
* :message_len = MESSAGE_LENGTH,
|
237
|
+
* :server_name = SERVER_NAME,
|
238
|
+
* :connection_name = CONNECTION_NAME
|
239
|
+
* ;
|
240
|
+
*/
|
241
|
+
#line 205 "informixc.ec"
|
252
242
|
{
|
253
|
-
#line
|
243
|
+
#line 214 "informixc.ec"
|
254
244
|
static ifx_hostvar_t _SQhtab[] =
|
255
245
|
{
|
256
246
|
{ 0, 11, 103, sizeof(sql_code), 0, 0, 0, 0 },
|
@@ -262,7 +252,7 @@ mint i;
|
|
262
252
|
{ 0, 9, 100, 256, 0, 0, 0, 0 },
|
263
253
|
{ 0, 10, 100, 256, 0, 0, 0, 0 },
|
264
254
|
{ 0, 0, 0, 0, 0, 0, 0, 0 }
|
265
|
-
#line
|
255
|
+
#line 214 "informixc.ec"
|
266
256
|
};
|
267
257
|
_SQhtab[0].hostaddr = (char *)&sql_code;
|
268
258
|
_SQhtab[1].hostaddr = (sql_state);
|
@@ -272,44 +262,41 @@ mint i;
|
|
272
262
|
_SQhtab[5].hostaddr = (char *)&message_len;
|
273
263
|
_SQhtab[6].hostaddr = (server_name);
|
274
264
|
_SQhtab[7].hostaddr = (connection_name);
|
275
|
-
#line
|
265
|
+
#line 214 "informixc.ec"
|
276
266
|
sqli_diag_get(ESQLINTVERSION, _SQhtab, sql_exception_number);
|
277
|
-
#line
|
267
|
+
#line 214 "informixc.ec"
|
278
268
|
}
|
279
269
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
270
|
+
TRIM_BLANKS(class_origin_val);
|
271
|
+
TRIM_BLANKS(subclass_origin_val);
|
272
|
+
TRIM_BLANKS(server_name);
|
273
|
+
TRIM_BLANKS(connection_name);
|
274
|
+
message[message_len - 1] = '\0';
|
275
|
+
TRIM_BLANKS(message);
|
276
|
+
|
277
|
+
{
|
278
|
+
VALUE sprintf_args[] = { rb_str_new2(message), rb_str_new2(sqlca.sqlerrm) };
|
279
|
+
VALUE argv[] = {
|
280
|
+
INT2FIX(sql_code),
|
281
|
+
rb_str_new2(sql_state),
|
282
|
+
rb_str_new2(class_origin_val),
|
283
|
+
rb_str_new2(subclass_origin_val),
|
284
|
+
rb_f_sprintf(NUM_ELEMS(sprintf_args), sprintf_args),
|
285
|
+
rb_str_new2(server_name),
|
286
|
+
rb_str_new2(connection_name)
|
287
|
+
};
|
288
|
+
|
289
|
+
rb_funcall(new_instance, s_add_info, 1, rb_ary_new4(7, argv));
|
290
|
+
}
|
291
|
+
}
|
292
|
+
|
293
|
+
return new_instance;
|
304
294
|
}
|
305
295
|
|
306
|
-
/*
|
307
|
-
* C helper functions (see ifx_except.h for documentation)
|
308
|
-
*/
|
309
296
|
static void
|
310
297
|
raise_ifx_extended(void)
|
311
298
|
{
|
312
|
-
|
299
|
+
rb_exc_raise(rbifx_ext_exception(rb_eDatabaseError));
|
313
300
|
}
|
314
301
|
/*
|
315
302
|
*****************************************************************************
|
@@ -351,13 +338,13 @@ rb_slobstat_initialize(VALUE self, VALUE slob)
|
|
351
338
|
/*
|
352
339
|
* EXEC SQL begin declare section;
|
353
340
|
*/
|
354
|
-
#line
|
355
|
-
#line
|
341
|
+
#line 284 "informixc.ec"
|
342
|
+
#line 285 "informixc.ec"
|
356
343
|
char *did;
|
357
344
|
/*
|
358
345
|
* EXEC SQL end declare section;
|
359
346
|
*/
|
360
|
-
#line
|
347
|
+
#line 286 "informixc.ec"
|
361
348
|
|
362
349
|
|
363
350
|
Data_Get_Struct(slob, slob_t, sb);
|
@@ -371,11 +358,11 @@ rb_slobstat_initialize(VALUE self, VALUE slob)
|
|
371
358
|
/*
|
372
359
|
* EXEC SQL set connection :did;
|
373
360
|
*/
|
374
|
-
#line
|
361
|
+
#line 296 "informixc.ec"
|
375
362
|
{
|
376
|
-
#line
|
363
|
+
#line 296 "informixc.ec"
|
377
364
|
sqli_connect_set(0, did, 0);
|
378
|
-
#line
|
365
|
+
#line 296 "informixc.ec"
|
379
366
|
}
|
380
367
|
if (SQLCODE < 0)
|
381
368
|
raise_ifx_extended();
|
@@ -522,24 +509,24 @@ slob_free(slob_t *slob)
|
|
522
509
|
/*
|
523
510
|
* EXEC SQL begin declare section;
|
524
511
|
*/
|
525
|
-
#line
|
526
|
-
#line
|
512
|
+
#line 439 "informixc.ec"
|
513
|
+
#line 440 "informixc.ec"
|
527
514
|
char *did;
|
528
515
|
/*
|
529
516
|
* EXEC SQL end declare section;
|
530
517
|
*/
|
531
|
-
#line
|
518
|
+
#line 441 "informixc.ec"
|
532
519
|
|
533
520
|
|
534
521
|
did = slob->database_id;
|
535
522
|
/*
|
536
523
|
* EXEC SQL set connection :did;
|
537
524
|
*/
|
538
|
-
#line
|
525
|
+
#line 444 "informixc.ec"
|
539
526
|
{
|
540
|
-
#line
|
527
|
+
#line 444 "informixc.ec"
|
541
528
|
sqli_connect_set(0, did, 0);
|
542
|
-
#line
|
529
|
+
#line 444 "informixc.ec"
|
543
530
|
}
|
544
531
|
if (SQLCODE >= 0)
|
545
532
|
ifx_lo_close(slob->fd);
|
@@ -577,13 +564,13 @@ rb_slob_initialize(int argc, VALUE *argv, VALUE self)
|
|
577
564
|
/*
|
578
565
|
* EXEC SQL begin declare section;
|
579
566
|
*/
|
580
|
-
#line
|
581
|
-
#line
|
567
|
+
#line 478 "informixc.ec"
|
568
|
+
#line 479 "informixc.ec"
|
582
569
|
char *did;
|
583
570
|
/*
|
584
571
|
* EXEC SQL end declare section;
|
585
572
|
*/
|
586
|
-
#line
|
573
|
+
#line 480 "informixc.ec"
|
587
574
|
|
588
575
|
|
589
576
|
rb_scan_args(argc, argv, "12", &db, &type, &options);
|
@@ -592,11 +579,11 @@ rb_slob_initialize(int argc, VALUE *argv, VALUE self)
|
|
592
579
|
/*
|
593
580
|
* EXEC SQL set connection :did;
|
594
581
|
*/
|
595
|
-
#line
|
582
|
+
#line 485 "informixc.ec"
|
596
583
|
{
|
597
|
-
#line
|
584
|
+
#line 485 "informixc.ec"
|
598
585
|
sqli_connect_set(0, did, 0);
|
599
|
-
#line
|
586
|
+
#line 485 "informixc.ec"
|
600
587
|
}
|
601
588
|
if (SQLCODE < 0)
|
602
589
|
raise_ifx_extended();
|
@@ -704,13 +691,13 @@ rb_slob_open(int argc, VALUE *argv, VALUE self)
|
|
704
691
|
/*
|
705
692
|
* EXEC SQL begin declare section;
|
706
693
|
*/
|
707
|
-
#line
|
708
|
-
#line
|
694
|
+
#line 589 "informixc.ec"
|
695
|
+
#line 590 "informixc.ec"
|
709
696
|
char *did;
|
710
697
|
/*
|
711
698
|
* EXEC SQL end declare section;
|
712
699
|
*/
|
713
|
-
#line
|
700
|
+
#line 591 "informixc.ec"
|
714
701
|
|
715
702
|
|
716
703
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -722,11 +709,11 @@ rb_slob_open(int argc, VALUE *argv, VALUE self)
|
|
722
709
|
/*
|
723
710
|
* EXEC SQL set connection :did;
|
724
711
|
*/
|
725
|
-
#line
|
712
|
+
#line 599 "informixc.ec"
|
726
713
|
{
|
727
|
-
#line
|
714
|
+
#line 599 "informixc.ec"
|
728
715
|
sqli_connect_set(0, did, 0);
|
729
|
-
#line
|
716
|
+
#line 599 "informixc.ec"
|
730
717
|
}
|
731
718
|
if (SQLCODE < 0)
|
732
719
|
raise_ifx_extended();
|
@@ -757,24 +744,24 @@ rb_slob_close(VALUE self)
|
|
757
744
|
/*
|
758
745
|
* EXEC SQL begin declare section;
|
759
746
|
*/
|
760
|
-
#line
|
761
|
-
#line
|
747
|
+
#line 626 "informixc.ec"
|
748
|
+
#line 627 "informixc.ec"
|
762
749
|
char *did;
|
763
750
|
/*
|
764
751
|
* EXEC SQL end declare section;
|
765
752
|
*/
|
766
|
-
#line
|
753
|
+
#line 628 "informixc.ec"
|
767
754
|
|
768
755
|
|
769
756
|
did = slob->database_id;
|
770
757
|
/*
|
771
758
|
* EXEC SQL set connection :did;
|
772
759
|
*/
|
773
|
-
#line
|
760
|
+
#line 631 "informixc.ec"
|
774
761
|
{
|
775
|
-
#line
|
762
|
+
#line 631 "informixc.ec"
|
776
763
|
sqli_connect_set(0, did, 0);
|
777
|
-
#line
|
764
|
+
#line 631 "informixc.ec"
|
778
765
|
}
|
779
766
|
if (SQLCODE < 0)
|
780
767
|
return self;
|
@@ -805,13 +792,13 @@ rb_slob_read(VALUE self, VALUE nbytes)
|
|
805
792
|
/*
|
806
793
|
* EXEC SQL begin declare section;
|
807
794
|
*/
|
808
|
-
#line
|
809
|
-
#line
|
795
|
+
#line 658 "informixc.ec"
|
796
|
+
#line 659 "informixc.ec"
|
810
797
|
char *did;
|
811
798
|
/*
|
812
799
|
* EXEC SQL end declare section;
|
813
800
|
*/
|
814
|
-
#line
|
801
|
+
#line 660 "informixc.ec"
|
815
802
|
|
816
803
|
|
817
804
|
|
@@ -824,11 +811,11 @@ rb_slob_read(VALUE self, VALUE nbytes)
|
|
824
811
|
/*
|
825
812
|
* EXEC SQL set connection :did;
|
826
813
|
*/
|
827
|
-
#line
|
814
|
+
#line 669 "informixc.ec"
|
828
815
|
{
|
829
|
-
#line
|
816
|
+
#line 669 "informixc.ec"
|
830
817
|
sqli_connect_set(0, did, 0);
|
831
|
-
#line
|
818
|
+
#line 669 "informixc.ec"
|
832
819
|
}
|
833
820
|
if (SQLCODE < 0)
|
834
821
|
raise_ifx_extended();
|
@@ -868,13 +855,13 @@ rb_slob_write(VALUE self, VALUE data)
|
|
868
855
|
/*
|
869
856
|
* EXEC SQL begin declare section;
|
870
857
|
*/
|
871
|
-
#line
|
872
|
-
#line
|
858
|
+
#line 705 "informixc.ec"
|
859
|
+
#line 706 "informixc.ec"
|
873
860
|
char *did;
|
874
861
|
/*
|
875
862
|
* EXEC SQL end declare section;
|
876
863
|
*/
|
877
|
-
#line
|
864
|
+
#line 707 "informixc.ec"
|
878
865
|
|
879
866
|
|
880
867
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -886,11 +873,11 @@ rb_slob_write(VALUE self, VALUE data)
|
|
886
873
|
/*
|
887
874
|
* EXEC SQL set connection :did;
|
888
875
|
*/
|
889
|
-
#line
|
876
|
+
#line 715 "informixc.ec"
|
890
877
|
{
|
891
|
-
#line
|
878
|
+
#line 715 "informixc.ec"
|
892
879
|
sqli_connect_set(0, did, 0);
|
893
|
-
#line
|
880
|
+
#line 715 "informixc.ec"
|
894
881
|
}
|
895
882
|
if (SQLCODE < 0)
|
896
883
|
raise_ifx_extended();
|
@@ -952,13 +939,13 @@ rb_slob_seek(VALUE self, VALUE offset, VALUE whence)
|
|
952
939
|
/*
|
953
940
|
* EXEC SQL begin declare section;
|
954
941
|
*/
|
955
|
-
#line
|
956
|
-
#line
|
942
|
+
#line 773 "informixc.ec"
|
943
|
+
#line 774 "informixc.ec"
|
957
944
|
char *did;
|
958
945
|
/*
|
959
946
|
* EXEC SQL end declare section;
|
960
947
|
*/
|
961
|
-
#line
|
948
|
+
#line 775 "informixc.ec"
|
962
949
|
|
963
950
|
|
964
951
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -970,11 +957,11 @@ rb_slob_seek(VALUE self, VALUE offset, VALUE whence)
|
|
970
957
|
/*
|
971
958
|
* EXEC SQL set connection :did;
|
972
959
|
*/
|
973
|
-
#line
|
960
|
+
#line 783 "informixc.ec"
|
974
961
|
{
|
975
|
-
#line
|
962
|
+
#line 783 "informixc.ec"
|
976
963
|
sqli_connect_set(0, did, 0);
|
977
|
-
#line
|
964
|
+
#line 783 "informixc.ec"
|
978
965
|
}
|
979
966
|
if (SQLCODE < 0)
|
980
967
|
raise_ifx_extended();
|
@@ -1030,13 +1017,13 @@ rb_slob_tell(VALUE self)
|
|
1030
1017
|
/*
|
1031
1018
|
* EXEC SQL begin declare section;
|
1032
1019
|
*/
|
1033
|
-
#line
|
1034
|
-
#line
|
1020
|
+
#line 835 "informixc.ec"
|
1021
|
+
#line 836 "informixc.ec"
|
1035
1022
|
char *did;
|
1036
1023
|
/*
|
1037
1024
|
* EXEC SQL end declare section;
|
1038
1025
|
*/
|
1039
|
-
#line
|
1026
|
+
#line 837 "informixc.ec"
|
1040
1027
|
|
1041
1028
|
|
1042
1029
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -1048,11 +1035,11 @@ rb_slob_tell(VALUE self)
|
|
1048
1035
|
/*
|
1049
1036
|
* EXEC SQL set connection :did;
|
1050
1037
|
*/
|
1051
|
-
#line
|
1038
|
+
#line 845 "informixc.ec"
|
1052
1039
|
{
|
1053
|
-
#line
|
1040
|
+
#line 845 "informixc.ec"
|
1054
1041
|
sqli_connect_set(0, did, 0);
|
1055
|
-
#line
|
1042
|
+
#line 845 "informixc.ec"
|
1056
1043
|
}
|
1057
1044
|
if (SQLCODE < 0)
|
1058
1045
|
raise_ifx_extended();
|
@@ -1083,13 +1070,13 @@ rb_slob_truncate(VALUE self, VALUE offset)
|
|
1083
1070
|
/*
|
1084
1071
|
* EXEC SQL begin declare section;
|
1085
1072
|
*/
|
1086
|
-
#line
|
1087
|
-
#line
|
1073
|
+
#line 872 "informixc.ec"
|
1074
|
+
#line 873 "informixc.ec"
|
1088
1075
|
char *did;
|
1089
1076
|
/*
|
1090
1077
|
* EXEC SQL end declare section;
|
1091
1078
|
*/
|
1092
|
-
#line
|
1079
|
+
#line 874 "informixc.ec"
|
1093
1080
|
|
1094
1081
|
|
1095
1082
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -1101,11 +1088,11 @@ rb_slob_truncate(VALUE self, VALUE offset)
|
|
1101
1088
|
/*
|
1102
1089
|
* EXEC SQL set connection :did;
|
1103
1090
|
*/
|
1104
|
-
#line
|
1091
|
+
#line 882 "informixc.ec"
|
1105
1092
|
{
|
1106
|
-
#line
|
1093
|
+
#line 882 "informixc.ec"
|
1107
1094
|
sqli_connect_set(0, did, 0);
|
1108
|
-
#line
|
1095
|
+
#line 882 "informixc.ec"
|
1109
1096
|
}
|
1110
1097
|
if (SQLCODE < 0)
|
1111
1098
|
raise_ifx_extended();
|
@@ -1155,13 +1142,13 @@ rb_slob_lock(VALUE self, VALUE offset, VALUE whence, VALUE range, VALUE mode)
|
|
1155
1142
|
/*
|
1156
1143
|
* EXEC SQL begin declare section;
|
1157
1144
|
*/
|
1158
|
-
#line
|
1159
|
-
#line
|
1145
|
+
#line 928 "informixc.ec"
|
1146
|
+
#line 929 "informixc.ec"
|
1160
1147
|
char *did;
|
1161
1148
|
/*
|
1162
1149
|
* EXEC SQL end declare section;
|
1163
1150
|
*/
|
1164
|
-
#line
|
1151
|
+
#line 930 "informixc.ec"
|
1165
1152
|
|
1166
1153
|
|
1167
1154
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -1173,11 +1160,11 @@ rb_slob_lock(VALUE self, VALUE offset, VALUE whence, VALUE range, VALUE mode)
|
|
1173
1160
|
/*
|
1174
1161
|
* EXEC SQL set connection :did;
|
1175
1162
|
*/
|
1176
|
-
#line
|
1163
|
+
#line 938 "informixc.ec"
|
1177
1164
|
{
|
1178
|
-
#line
|
1165
|
+
#line 938 "informixc.ec"
|
1179
1166
|
sqli_connect_set(0, did, 0);
|
1180
|
-
#line
|
1167
|
+
#line 938 "informixc.ec"
|
1181
1168
|
}
|
1182
1169
|
if (SQLCODE < 0)
|
1183
1170
|
raise_ifx_extended();
|
@@ -1215,13 +1202,13 @@ rb_slob_unlock(VALUE self, VALUE offset, VALUE whence, VALUE range)
|
|
1215
1202
|
/*
|
1216
1203
|
* EXEC SQL begin declare section;
|
1217
1204
|
*/
|
1218
|
-
#line
|
1219
|
-
#line
|
1205
|
+
#line 972 "informixc.ec"
|
1206
|
+
#line 973 "informixc.ec"
|
1220
1207
|
char *did;
|
1221
1208
|
/*
|
1222
1209
|
* EXEC SQL end declare section;
|
1223
1210
|
*/
|
1224
|
-
#line
|
1211
|
+
#line 974 "informixc.ec"
|
1225
1212
|
|
1226
1213
|
|
1227
1214
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -1233,11 +1220,11 @@ rb_slob_unlock(VALUE self, VALUE offset, VALUE whence, VALUE range)
|
|
1233
1220
|
/*
|
1234
1221
|
* EXEC SQL set connection :did;
|
1235
1222
|
*/
|
1236
|
-
#line
|
1223
|
+
#line 982 "informixc.ec"
|
1237
1224
|
{
|
1238
|
-
#line
|
1225
|
+
#line 982 "informixc.ec"
|
1239
1226
|
sqli_connect_set(0, did, 0);
|
1240
|
-
#line
|
1227
|
+
#line 982 "informixc.ec"
|
1241
1228
|
}
|
1242
1229
|
if (SQLCODE < 0)
|
1243
1230
|
raise_ifx_extended();
|
@@ -1272,13 +1259,13 @@ slob_specget(VALUE self, slob_option_t option)
|
|
1272
1259
|
/*
|
1273
1260
|
* EXEC SQL begin declare section;
|
1274
1261
|
*/
|
1275
|
-
#line
|
1276
|
-
#line
|
1262
|
+
#line 1013 "informixc.ec"
|
1263
|
+
#line 1014 "informixc.ec"
|
1277
1264
|
char *did;
|
1278
1265
|
/*
|
1279
1266
|
* EXEC SQL end declare section;
|
1280
1267
|
*/
|
1281
|
-
#line
|
1268
|
+
#line 1015 "informixc.ec"
|
1282
1269
|
|
1283
1270
|
|
1284
1271
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -1290,11 +1277,11 @@ slob_specget(VALUE self, slob_option_t option)
|
|
1290
1277
|
/*
|
1291
1278
|
* EXEC SQL set connection :did;
|
1292
1279
|
*/
|
1293
|
-
#line
|
1280
|
+
#line 1023 "informixc.ec"
|
1294
1281
|
{
|
1295
|
-
#line
|
1282
|
+
#line 1023 "informixc.ec"
|
1296
1283
|
sqli_connect_set(0, did, 0);
|
1297
|
-
#line
|
1284
|
+
#line 1023 "informixc.ec"
|
1298
1285
|
}
|
1299
1286
|
if (SQLCODE < 0)
|
1300
1287
|
raise_ifx_extended();
|
@@ -1358,13 +1345,13 @@ slob_specset(VALUE self, slob_option_t option, VALUE value)
|
|
1358
1345
|
/*
|
1359
1346
|
* EXEC SQL begin declare section;
|
1360
1347
|
*/
|
1361
|
-
#line
|
1362
|
-
#line
|
1348
|
+
#line 1083 "informixc.ec"
|
1349
|
+
#line 1084 "informixc.ec"
|
1363
1350
|
char *did;
|
1364
1351
|
/*
|
1365
1352
|
* EXEC SQL end declare section;
|
1366
1353
|
*/
|
1367
|
-
#line
|
1354
|
+
#line 1085 "informixc.ec"
|
1368
1355
|
|
1369
1356
|
|
1370
1357
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -1376,11 +1363,11 @@ slob_specset(VALUE self, slob_option_t option, VALUE value)
|
|
1376
1363
|
/*
|
1377
1364
|
* EXEC SQL set connection :did;
|
1378
1365
|
*/
|
1379
|
-
#line
|
1366
|
+
#line 1093 "informixc.ec"
|
1380
1367
|
{
|
1381
|
-
#line
|
1368
|
+
#line 1093 "informixc.ec"
|
1382
1369
|
sqli_connect_set(0, did, 0);
|
1383
|
-
#line
|
1370
|
+
#line 1093 "informixc.ec"
|
1384
1371
|
}
|
1385
1372
|
if (SQLCODE < 0)
|
1386
1373
|
raise_ifx_extended();
|
@@ -1516,13 +1503,13 @@ slob_stat(VALUE self, slob_stat_t stat)
|
|
1516
1503
|
/*
|
1517
1504
|
* EXEC SQL begin declare section;
|
1518
1505
|
*/
|
1519
|
-
#line
|
1520
|
-
#line
|
1506
|
+
#line 1225 "informixc.ec"
|
1507
|
+
#line 1226 "informixc.ec"
|
1521
1508
|
char *did;
|
1522
1509
|
/*
|
1523
1510
|
* EXEC SQL end declare section;
|
1524
1511
|
*/
|
1525
|
-
#line
|
1512
|
+
#line 1227 "informixc.ec"
|
1526
1513
|
|
1527
1514
|
|
1528
1515
|
Data_Get_Struct(self, slob_t, slob);
|
@@ -1535,11 +1522,11 @@ slob_stat(VALUE self, slob_stat_t stat)
|
|
1535
1522
|
/*
|
1536
1523
|
* EXEC SQL set connection :did;
|
1537
1524
|
*/
|
1538
|
-
#line
|
1525
|
+
#line 1236 "informixc.ec"
|
1539
1526
|
{
|
1540
|
-
#line
|
1527
|
+
#line 1236 "informixc.ec"
|
1541
1528
|
sqli_connect_set(0, did, 0);
|
1542
|
-
#line
|
1529
|
+
#line 1236 "informixc.ec"
|
1543
1530
|
}
|
1544
1531
|
if (SQLCODE < 0)
|
1545
1532
|
raise_ifx_extended();
|
@@ -1805,7 +1792,7 @@ free_output_slots(cursor_t *c)
|
|
1805
1792
|
{
|
1806
1793
|
if (c->daOutput != NULL) {
|
1807
1794
|
struct sqlvar_struct *var = c->daOutput->sqlvar;
|
1808
|
-
if (var) {
|
1795
|
+
if (var != NULL) {
|
1809
1796
|
register int i;
|
1810
1797
|
for (i = 0; i < c->daOutput->sqld; i++, var++) {
|
1811
1798
|
if (ISBLOBTYPE(var->sqltype)) {
|
@@ -1816,6 +1803,7 @@ free_output_slots(cursor_t *c)
|
|
1816
1803
|
if (ISSMARTBLOB(var->sqltype, var->sqlxid))
|
1817
1804
|
xfree(var->sqldata);
|
1818
1805
|
}
|
1806
|
+
c->daOutput->sqlvar = NULL;
|
1819
1807
|
}
|
1820
1808
|
xfree(c->daOutput);
|
1821
1809
|
c->daOutput = NULL;
|
@@ -2231,13 +2219,13 @@ database_free(void *p)
|
|
2231
2219
|
/*
|
2232
2220
|
* EXEC SQL begin declare section;
|
2233
2221
|
*/
|
2234
|
-
#line
|
2235
|
-
#line
|
2222
|
+
#line 1925 "informixc.ec"
|
2223
|
+
#line 1926 "informixc.ec"
|
2236
2224
|
char *id;
|
2237
2225
|
/*
|
2238
2226
|
* EXEC SQL end declare section;
|
2239
2227
|
*/
|
2240
|
-
#line
|
2228
|
+
#line 1927 "informixc.ec"
|
2241
2229
|
|
2242
2230
|
|
2243
2231
|
dbt = p;
|
@@ -2245,11 +2233,11 @@ database_free(void *p)
|
|
2245
2233
|
/*
|
2246
2234
|
* EXEC SQL disconnect :id;
|
2247
2235
|
*/
|
2248
|
-
#line
|
2236
|
+
#line 1931 "informixc.ec"
|
2249
2237
|
{
|
2250
|
-
#line
|
2238
|
+
#line 1931 "informixc.ec"
|
2251
2239
|
sqli_connect_close(0, id, 0, 0);
|
2252
|
-
#line
|
2240
|
+
#line 1931 "informixc.ec"
|
2253
2241
|
}
|
2254
2242
|
xfree(p);
|
2255
2243
|
}
|
@@ -2276,8 +2264,8 @@ rb_database_initialize(int argc, VALUE *argv, VALUE self)
|
|
2276
2264
|
/*
|
2277
2265
|
* EXEC SQL begin declare section;
|
2278
2266
|
*/
|
2279
|
-
#line
|
2280
|
-
#line
|
2267
|
+
#line 1954 "informixc.ec"
|
2268
|
+
#line 1955 "informixc.ec"
|
2281
2269
|
char *dbname, *user = NULL, *pass = NULL;
|
2282
2270
|
char *did, *cid, *sid;
|
2283
2271
|
struct version_t
|
@@ -2288,7 +2276,7 @@ struct version_t
|
|
2288
2276
|
/*
|
2289
2277
|
* EXEC SQL end declare section;
|
2290
2278
|
*/
|
2291
|
-
#line
|
2279
|
+
#line 1961 "informixc.ec"
|
2292
2280
|
|
2293
2281
|
|
2294
2282
|
rb_scan_args(argc, argv, "12", &arg[0], &arg[1], &arg[2]);
|
@@ -2316,24 +2304,24 @@ struct version_t
|
|
2316
2304
|
* EXEC SQL connect to :dbname as :did user :user
|
2317
2305
|
* using :pass with concurrent transaction;
|
2318
2306
|
*/
|
2319
|
-
#line
|
2307
|
+
#line 1984 "informixc.ec"
|
2320
2308
|
{
|
2321
|
-
#line
|
2309
|
+
#line 1985 "informixc.ec"
|
2322
2310
|
ifx_conn_t *_sqiconn;
|
2323
2311
|
_sqiconn = (ifx_conn_t *)ifx_alloc_conn_user(user, pass);
|
2324
2312
|
sqli_connect_open(ESQLINTVERSION, 0, dbname, did, _sqiconn, 1);
|
2325
2313
|
ifx_free_conn_user(&_sqiconn);
|
2326
|
-
#line
|
2314
|
+
#line 1985 "informixc.ec"
|
2327
2315
|
}
|
2328
2316
|
else
|
2329
2317
|
/*
|
2330
2318
|
* EXEC SQL connect to :dbname as :did with concurrent transaction;
|
2331
2319
|
*/
|
2332
|
-
#line
|
2320
|
+
#line 1987 "informixc.ec"
|
2333
2321
|
{
|
2334
|
-
#line
|
2322
|
+
#line 1987 "informixc.ec"
|
2335
2323
|
sqli_connect_open(ESQLINTVERSION, 0, dbname, did, (ifx_conn_t *)0, 1);
|
2336
|
-
#line
|
2324
|
+
#line 1987 "informixc.ec"
|
2337
2325
|
}
|
2338
2326
|
|
2339
2327
|
if (SQLCODE < 0)
|
@@ -2350,11 +2338,11 @@ struct version_t
|
|
2350
2338
|
* where c.tabid = ? and c.tabid = d.tabid and c.colno = d.colno
|
2351
2339
|
* order by c.colno';
|
2352
2340
|
*/
|
2353
|
-
#line
|
2341
|
+
#line 1995 "informixc.ec"
|
2354
2342
|
{
|
2355
|
-
#line
|
2343
|
+
#line 2000 "informixc.ec"
|
2356
2344
|
sqli_prep(ESQLINTVERSION, sid, "select colname, coltype, collength, extended_id, type, default, c.colno from syscolumns c, outer sysdefaults d where c.tabid = ? and c.tabid = d.tabid and c.colno = d.colno order by c.colno",(ifx_literal_t *)0, (ifx_namelist_t *)0, 2, 0, 0 );
|
2357
|
-
#line
|
2345
|
+
#line 2000 "informixc.ec"
|
2358
2346
|
}
|
2359
2347
|
|
2360
2348
|
if (SQLCODE < 0)
|
@@ -2363,11 +2351,11 @@ struct version_t
|
|
2363
2351
|
/*
|
2364
2352
|
* EXEC SQL declare :cid cursor for :sid;
|
2365
2353
|
*/
|
2366
|
-
#line
|
2354
|
+
#line 2005 "informixc.ec"
|
2367
2355
|
{
|
2368
|
-
#line
|
2356
|
+
#line 2005 "informixc.ec"
|
2369
2357
|
sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 0), cid, sqli_curs_locate(ESQLINTVERSION, sid, 1), 0, 0);
|
2370
|
-
#line
|
2358
|
+
#line 2005 "informixc.ec"
|
2371
2359
|
}
|
2372
2360
|
|
2373
2361
|
if (SQLCODE < 0)
|
@@ -2382,17 +2370,17 @@ struct version_t
|
|
2382
2370
|
* dbinfo('version', 'full')
|
2383
2371
|
* into :c_version from systables where tabid = 1;
|
2384
2372
|
*/
|
2385
|
-
#line
|
2373
|
+
#line 2010 "informixc.ec"
|
2386
2374
|
{
|
2387
|
-
#line
|
2375
|
+
#line 2016 "informixc.ec"
|
2388
2376
|
static const char *sqlcmdtxt[] =
|
2389
|
-
#line
|
2377
|
+
#line 2016 "informixc.ec"
|
2390
2378
|
{
|
2391
|
-
#line
|
2379
|
+
#line 2016 "informixc.ec"
|
2392
2380
|
"select dbinfo ( 'version' , 'server-type' ) , dbinfo ( 'version' , 'major' ) , dbinfo ( 'version' , 'minor' ) , dbinfo ( 'version' , 'os' ) , dbinfo ( 'version' , 'level' ) , dbinfo ( 'version' , 'full' ) from systables where tabid = 1",
|
2393
2381
|
0
|
2394
2382
|
};
|
2395
|
-
#line
|
2383
|
+
#line 2016 "informixc.ec"
|
2396
2384
|
static ifx_cursor_t _SQ0 = {0};
|
2397
2385
|
static ifx_sqlvar_t _sqobind[] =
|
2398
2386
|
{
|
@@ -2402,23 +2390,23 @@ static ifx_cursor_t _SQ0 = {0};
|
|
2402
2390
|
{ 114, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2403
2391
|
{ 114, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2404
2392
|
{ 114, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2405
|
-
#line
|
2393
|
+
#line 2016 "informixc.ec"
|
2406
2394
|
};
|
2407
|
-
#line
|
2395
|
+
#line 2016 "informixc.ec"
|
2408
2396
|
_sqobind[0].sqldata = (c_version).server_type;
|
2409
|
-
#line
|
2397
|
+
#line 2016 "informixc.ec"
|
2410
2398
|
_sqobind[1].sqldata = (c_version).major;
|
2411
|
-
#line
|
2399
|
+
#line 2016 "informixc.ec"
|
2412
2400
|
_sqobind[2].sqldata = (c_version).minor;
|
2413
|
-
#line
|
2401
|
+
#line 2016 "informixc.ec"
|
2414
2402
|
_sqobind[3].sqldata = (c_version).os;
|
2415
|
-
#line
|
2403
|
+
#line 2016 "informixc.ec"
|
2416
2404
|
_sqobind[4].sqldata = (c_version).level;
|
2417
|
-
#line
|
2405
|
+
#line 2016 "informixc.ec"
|
2418
2406
|
_sqobind[5].sqldata = (c_version).full;
|
2419
|
-
#line
|
2407
|
+
#line 2016 "informixc.ec"
|
2420
2408
|
sqli_slct(ESQLINTVERSION, &_SQ0,sqlcmdtxt,0,(ifx_sqlvar_t *)0,6,_sqobind,0,(ifx_literal_t *)0,(ifx_namelist_t *)0,0);
|
2421
|
-
#line
|
2409
|
+
#line 2016 "informixc.ec"
|
2422
2410
|
}
|
2423
2411
|
|
2424
2412
|
|
@@ -2450,13 +2438,13 @@ rb_database_close(VALUE self)
|
|
2450
2438
|
/*
|
2451
2439
|
* EXEC SQL begin declare section;
|
2452
2440
|
*/
|
2453
|
-
#line
|
2454
|
-
#line
|
2441
|
+
#line 2044 "informixc.ec"
|
2442
|
+
#line 2045 "informixc.ec"
|
2455
2443
|
char *id;
|
2456
2444
|
/*
|
2457
2445
|
* EXEC SQL end declare section;
|
2458
2446
|
*/
|
2459
|
-
#line
|
2447
|
+
#line 2046 "informixc.ec"
|
2460
2448
|
|
2461
2449
|
|
2462
2450
|
Data_Get_Struct(self, database_t, dbt);
|
@@ -2464,11 +2452,11 @@ rb_database_close(VALUE self)
|
|
2464
2452
|
/*
|
2465
2453
|
* EXEC SQL disconnect :id;
|
2466
2454
|
*/
|
2467
|
-
#line
|
2455
|
+
#line 2050 "informixc.ec"
|
2468
2456
|
{
|
2469
|
-
#line
|
2457
|
+
#line 2050 "informixc.ec"
|
2470
2458
|
sqli_connect_close(0, id, 0, 0);
|
2471
|
-
#line
|
2459
|
+
#line 2050 "informixc.ec"
|
2472
2460
|
}
|
2473
2461
|
|
2474
2462
|
return Qnil;
|
@@ -2500,13 +2488,13 @@ rb_database_immediate(VALUE self, VALUE arg)
|
|
2500
2488
|
/*
|
2501
2489
|
* EXEC SQL begin declare section;
|
2502
2490
|
*/
|
2503
|
-
#line
|
2504
|
-
#line
|
2491
|
+
#line 2078 "informixc.ec"
|
2492
|
+
#line 2079 "informixc.ec"
|
2505
2493
|
char *query, *did;
|
2506
2494
|
/*
|
2507
2495
|
* EXEC SQL end declare section;
|
2508
2496
|
*/
|
2509
|
-
#line
|
2497
|
+
#line 2080 "informixc.ec"
|
2510
2498
|
|
2511
2499
|
|
2512
2500
|
Data_Get_Struct(self, database_t, dbt);
|
@@ -2514,11 +2502,11 @@ rb_database_immediate(VALUE self, VALUE arg)
|
|
2514
2502
|
/*
|
2515
2503
|
* EXEC SQL set connection :did;
|
2516
2504
|
*/
|
2517
|
-
#line
|
2505
|
+
#line 2084 "informixc.ec"
|
2518
2506
|
{
|
2519
|
-
#line
|
2507
|
+
#line 2084 "informixc.ec"
|
2520
2508
|
sqli_connect_set(0, did, 0);
|
2521
|
-
#line
|
2509
|
+
#line 2084 "informixc.ec"
|
2522
2510
|
}
|
2523
2511
|
|
2524
2512
|
if (SQLCODE < 0)
|
@@ -2528,11 +2516,11 @@ rb_database_immediate(VALUE self, VALUE arg)
|
|
2528
2516
|
/*
|
2529
2517
|
* EXEC SQL execute immediate :query;
|
2530
2518
|
*/
|
2531
|
-
#line
|
2519
|
+
#line 2090 "informixc.ec"
|
2532
2520
|
{
|
2533
|
-
#line
|
2521
|
+
#line 2090 "informixc.ec"
|
2534
2522
|
sqli_exec_immed(query);
|
2535
|
-
#line
|
2523
|
+
#line 2090 "informixc.ec"
|
2536
2524
|
}
|
2537
2525
|
if (SQLCODE < 0)
|
2538
2526
|
raise_ifx_extended();
|
@@ -2553,13 +2541,13 @@ rb_database_rollback(VALUE self)
|
|
2553
2541
|
/*
|
2554
2542
|
* EXEC SQL begin declare section;
|
2555
2543
|
*/
|
2556
|
-
#line
|
2557
|
-
#line
|
2544
|
+
#line 2107 "informixc.ec"
|
2545
|
+
#line 2108 "informixc.ec"
|
2558
2546
|
char *did;
|
2559
2547
|
/*
|
2560
2548
|
* EXEC SQL end declare section;
|
2561
2549
|
*/
|
2562
|
-
#line
|
2550
|
+
#line 2109 "informixc.ec"
|
2563
2551
|
|
2564
2552
|
|
2565
2553
|
Data_Get_Struct(self, database_t, dbt);
|
@@ -2567,11 +2555,11 @@ rb_database_rollback(VALUE self)
|
|
2567
2555
|
/*
|
2568
2556
|
* EXEC SQL set connection :did;
|
2569
2557
|
*/
|
2570
|
-
#line
|
2558
|
+
#line 2113 "informixc.ec"
|
2571
2559
|
{
|
2572
|
-
#line
|
2560
|
+
#line 2113 "informixc.ec"
|
2573
2561
|
sqli_connect_set(0, did, 0);
|
2574
|
-
#line
|
2562
|
+
#line 2113 "informixc.ec"
|
2575
2563
|
}
|
2576
2564
|
|
2577
2565
|
if (SQLCODE < 0)
|
@@ -2580,11 +2568,11 @@ rb_database_rollback(VALUE self)
|
|
2580
2568
|
/*
|
2581
2569
|
* EXEC SQL rollback;
|
2582
2570
|
*/
|
2583
|
-
#line
|
2571
|
+
#line 2118 "informixc.ec"
|
2584
2572
|
{
|
2585
|
-
#line
|
2573
|
+
#line 2118 "informixc.ec"
|
2586
2574
|
sqli_trans_rollback();
|
2587
|
-
#line
|
2575
|
+
#line 2118 "informixc.ec"
|
2588
2576
|
}
|
2589
2577
|
|
2590
2578
|
return self;
|
@@ -2603,13 +2591,13 @@ rb_database_commit(VALUE self)
|
|
2603
2591
|
/*
|
2604
2592
|
* EXEC SQL begin declare section;
|
2605
2593
|
*/
|
2606
|
-
#line
|
2607
|
-
#line
|
2594
|
+
#line 2133 "informixc.ec"
|
2595
|
+
#line 2134 "informixc.ec"
|
2608
2596
|
char *did;
|
2609
2597
|
/*
|
2610
2598
|
* EXEC SQL end declare section;
|
2611
2599
|
*/
|
2612
|
-
#line
|
2600
|
+
#line 2135 "informixc.ec"
|
2613
2601
|
|
2614
2602
|
|
2615
2603
|
Data_Get_Struct(self, database_t, dbt);
|
@@ -2617,11 +2605,11 @@ rb_database_commit(VALUE self)
|
|
2617
2605
|
/*
|
2618
2606
|
* EXEC SQL set connection :did;
|
2619
2607
|
*/
|
2620
|
-
#line
|
2608
|
+
#line 2139 "informixc.ec"
|
2621
2609
|
{
|
2622
|
-
#line
|
2610
|
+
#line 2139 "informixc.ec"
|
2623
2611
|
sqli_connect_set(0, did, 0);
|
2624
|
-
#line
|
2612
|
+
#line 2139 "informixc.ec"
|
2625
2613
|
}
|
2626
2614
|
|
2627
2615
|
if (SQLCODE < 0)
|
@@ -2630,11 +2618,11 @@ rb_database_commit(VALUE self)
|
|
2630
2618
|
/*
|
2631
2619
|
* EXEC SQL commit;
|
2632
2620
|
*/
|
2633
|
-
#line
|
2621
|
+
#line 2144 "informixc.ec"
|
2634
2622
|
{
|
2635
|
-
#line
|
2623
|
+
#line 2144 "informixc.ec"
|
2636
2624
|
sqli_trans_commit();
|
2637
|
-
#line
|
2625
|
+
#line 2144 "informixc.ec"
|
2638
2626
|
}
|
2639
2627
|
|
2640
2628
|
return self;
|
@@ -2679,13 +2667,13 @@ rb_database_transaction(VALUE self)
|
|
2679
2667
|
/*
|
2680
2668
|
* EXEC SQL begin declare section;
|
2681
2669
|
*/
|
2682
|
-
#line
|
2683
|
-
#line
|
2670
|
+
#line 2185 "informixc.ec"
|
2671
|
+
#line 2186 "informixc.ec"
|
2684
2672
|
char *did;
|
2685
2673
|
/*
|
2686
2674
|
* EXEC SQL end declare section;
|
2687
2675
|
*/
|
2688
|
-
#line
|
2676
|
+
#line 2187 "informixc.ec"
|
2689
2677
|
|
2690
2678
|
|
2691
2679
|
Data_Get_Struct(self, database_t, dbt);
|
@@ -2693,11 +2681,11 @@ rb_database_transaction(VALUE self)
|
|
2693
2681
|
/*
|
2694
2682
|
* EXEC SQL set connection :did;
|
2695
2683
|
*/
|
2696
|
-
#line
|
2684
|
+
#line 2191 "informixc.ec"
|
2697
2685
|
{
|
2698
|
-
#line
|
2686
|
+
#line 2191 "informixc.ec"
|
2699
2687
|
sqli_connect_set(0, did, 0);
|
2700
|
-
#line
|
2688
|
+
#line 2191 "informixc.ec"
|
2701
2689
|
}
|
2702
2690
|
|
2703
2691
|
if (SQLCODE < 0)
|
@@ -2706,20 +2694,20 @@ rb_database_transaction(VALUE self)
|
|
2706
2694
|
/*
|
2707
2695
|
* EXEC SQL commit;
|
2708
2696
|
*/
|
2709
|
-
#line
|
2697
|
+
#line 2196 "informixc.ec"
|
2710
2698
|
{
|
2711
|
-
#line
|
2699
|
+
#line 2196 "informixc.ec"
|
2712
2700
|
sqli_trans_commit();
|
2713
|
-
#line
|
2701
|
+
#line 2196 "informixc.ec"
|
2714
2702
|
}
|
2715
2703
|
/*
|
2716
2704
|
* EXEC SQL begin work;
|
2717
2705
|
*/
|
2718
|
-
#line
|
2706
|
+
#line 2197 "informixc.ec"
|
2719
2707
|
{
|
2720
|
-
#line
|
2708
|
+
#line 2197 "informixc.ec"
|
2721
2709
|
sqli_trans_begin2((mint)1);
|
2722
|
-
#line
|
2710
|
+
#line 2197 "informixc.ec"
|
2723
2711
|
}
|
2724
2712
|
ret = rb_rescue(rb_yield, self, database_transfail, self);
|
2725
2713
|
|
@@ -2729,11 +2717,11 @@ rb_database_transaction(VALUE self)
|
|
2729
2717
|
/*
|
2730
2718
|
* EXEC SQL commit;
|
2731
2719
|
*/
|
2732
|
-
#line
|
2720
|
+
#line 2203 "informixc.ec"
|
2733
2721
|
{
|
2734
|
-
#line
|
2722
|
+
#line 2203 "informixc.ec"
|
2735
2723
|
sqli_trans_commit();
|
2736
|
-
#line
|
2724
|
+
#line 2203 "informixc.ec"
|
2737
2725
|
}
|
2738
2726
|
|
2739
2727
|
return self;
|
@@ -2766,8 +2754,8 @@ rb_database_columns(VALUE self, VALUE tablename)
|
|
2766
2754
|
/*
|
2767
2755
|
* EXEC SQL begin declare section;
|
2768
2756
|
*/
|
2769
|
-
#line
|
2770
|
-
#line
|
2757
|
+
#line 2232 "informixc.ec"
|
2758
|
+
#line 2233 "informixc.ec"
|
2771
2759
|
char *did, *cid;
|
2772
2760
|
char *tabname;
|
2773
2761
|
int tabid, xid;
|
@@ -2778,7 +2766,7 @@ short coltype, collength;
|
|
2778
2766
|
/*
|
2779
2767
|
* EXEC SQL end declare section;
|
2780
2768
|
*/
|
2781
|
-
#line
|
2769
|
+
#line 2240 "informixc.ec"
|
2782
2770
|
|
2783
2771
|
|
2784
2772
|
Data_Get_Struct(self, database_t, dbt);
|
@@ -2786,11 +2774,11 @@ short coltype, collength;
|
|
2786
2774
|
/*
|
2787
2775
|
* EXEC SQL set connection :did;
|
2788
2776
|
*/
|
2789
|
-
#line
|
2777
|
+
#line 2244 "informixc.ec"
|
2790
2778
|
{
|
2791
|
-
#line
|
2779
|
+
#line 2244 "informixc.ec"
|
2792
2780
|
sqli_connect_set(0, did, 0);
|
2793
|
-
#line
|
2781
|
+
#line 2244 "informixc.ec"
|
2794
2782
|
}
|
2795
2783
|
|
2796
2784
|
if (SQLCODE < 0)
|
@@ -2801,35 +2789,35 @@ short coltype, collength;
|
|
2801
2789
|
/*
|
2802
2790
|
* EXEC SQL select tabid into :tabid from systables where tabname = :tabname;
|
2803
2791
|
*/
|
2804
|
-
#line
|
2792
|
+
#line 2251 "informixc.ec"
|
2805
2793
|
{
|
2806
|
-
#line
|
2794
|
+
#line 2251 "informixc.ec"
|
2807
2795
|
static const char *sqlcmdtxt[] =
|
2808
|
-
#line
|
2796
|
+
#line 2251 "informixc.ec"
|
2809
2797
|
{
|
2810
|
-
#line
|
2798
|
+
#line 2251 "informixc.ec"
|
2811
2799
|
"select tabid from systables where tabname = ?",
|
2812
2800
|
0
|
2813
2801
|
};
|
2814
|
-
#line
|
2802
|
+
#line 2251 "informixc.ec"
|
2815
2803
|
static ifx_cursor_t _SQ0 = {0};
|
2816
2804
|
static ifx_sqlvar_t _sqibind[] =
|
2817
2805
|
{
|
2818
2806
|
{ 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2819
|
-
#line
|
2807
|
+
#line 2251 "informixc.ec"
|
2820
2808
|
};
|
2821
2809
|
static ifx_sqlvar_t _sqobind[] =
|
2822
2810
|
{
|
2823
2811
|
{ 102, sizeof(tabid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2824
|
-
#line
|
2812
|
+
#line 2251 "informixc.ec"
|
2825
2813
|
};
|
2826
|
-
#line
|
2814
|
+
#line 2251 "informixc.ec"
|
2827
2815
|
_sqibind[0].sqldata = tabname;
|
2828
|
-
#line
|
2816
|
+
#line 2251 "informixc.ec"
|
2829
2817
|
_sqobind[0].sqldata = (char *) &tabid;
|
2830
|
-
#line
|
2818
|
+
#line 2251 "informixc.ec"
|
2831
2819
|
sqli_slct(ESQLINTVERSION, &_SQ0,sqlcmdtxt,1,_sqibind,1,_sqobind,0,(ifx_literal_t *)0,(ifx_namelist_t *)0,0);
|
2832
|
-
#line
|
2820
|
+
#line 2251 "informixc.ec"
|
2833
2821
|
}
|
2834
2822
|
|
2835
2823
|
if (SQLCODE == SQLNOTFOUND)
|
@@ -2840,19 +2828,19 @@ static ifx_cursor_t _SQ0 = {0};
|
|
2840
2828
|
/*
|
2841
2829
|
* EXEC SQL open :cid using :tabid;
|
2842
2830
|
*/
|
2843
|
-
#line
|
2831
|
+
#line 2258 "informixc.ec"
|
2844
2832
|
{
|
2845
|
-
#line
|
2833
|
+
#line 2258 "informixc.ec"
|
2846
2834
|
static ifx_sqlvar_t _sqibind[] =
|
2847
2835
|
{
|
2848
2836
|
{ 102, sizeof(tabid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2849
|
-
#line
|
2837
|
+
#line 2258 "informixc.ec"
|
2850
2838
|
};
|
2851
2839
|
static ifx_sqlda_t _SD0 = { 1, _sqibind, {0}, 1, 0 };
|
2852
|
-
#line
|
2840
|
+
#line 2258 "informixc.ec"
|
2853
2841
|
_sqibind[0].sqldata = (char *) &tabid;
|
2854
2842
|
sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), &_SD0, (char *)0, (struct value *)0, 1, 0);
|
2855
|
-
#line
|
2843
|
+
#line 2258 "informixc.ec"
|
2856
2844
|
}
|
2857
2845
|
|
2858
2846
|
if (SQLCODE < 0)
|
@@ -2863,9 +2851,9 @@ static ifx_cursor_t _SQ0 = {0};
|
|
2863
2851
|
* EXEC SQL fetch :cid into :colname, :coltype, :collength, :xid,
|
2864
2852
|
* :deftype, :defvalue;
|
2865
2853
|
*/
|
2866
|
-
#line
|
2854
|
+
#line 2264 "informixc.ec"
|
2867
2855
|
{
|
2868
|
-
#line
|
2856
|
+
#line 2265 "informixc.ec"
|
2869
2857
|
static ifx_sqlvar_t _sqobind[] =
|
2870
2858
|
{
|
2871
2859
|
{ 114, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
@@ -2874,24 +2862,24 @@ static ifx_cursor_t _SQ0 = {0};
|
|
2874
2862
|
{ 102, sizeof(xid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2875
2863
|
{ 100, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2876
2864
|
{ 114, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
2877
|
-
#line
|
2865
|
+
#line 2265 "informixc.ec"
|
2878
2866
|
};
|
2879
2867
|
static ifx_sqlda_t _SD0 = { 6, _sqobind, {0}, 6, 0 };
|
2880
2868
|
static _FetchSpec _FS1 = { 0, 1, 0 };
|
2881
|
-
#line
|
2869
|
+
#line 2265 "informixc.ec"
|
2882
2870
|
_sqobind[0].sqldata = colname;
|
2883
|
-
#line
|
2871
|
+
#line 2265 "informixc.ec"
|
2884
2872
|
_sqobind[1].sqldata = (char *) &coltype;
|
2885
|
-
#line
|
2873
|
+
#line 2265 "informixc.ec"
|
2886
2874
|
_sqobind[2].sqldata = (char *) &collength;
|
2887
|
-
#line
|
2875
|
+
#line 2265 "informixc.ec"
|
2888
2876
|
_sqobind[3].sqldata = (char *) &xid;
|
2889
|
-
#line
|
2877
|
+
#line 2265 "informixc.ec"
|
2890
2878
|
_sqobind[4].sqldata = deftype;
|
2891
|
-
#line
|
2879
|
+
#line 2265 "informixc.ec"
|
2892
2880
|
_sqobind[5].sqldata = defvalue;
|
2893
2881
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), (ifx_sqlda_t *)0, &_SD0, (char *)0, &_FS1);
|
2894
|
-
#line
|
2882
|
+
#line 2265 "informixc.ec"
|
2895
2883
|
}
|
2896
2884
|
if (SQLCODE < 0)
|
2897
2885
|
raise_ifx_extended();
|
@@ -2989,11 +2977,11 @@ static ifx_cursor_t _SQ0 = {0};
|
|
2989
2977
|
/*
|
2990
2978
|
* EXEC SQL close :cid;
|
2991
2979
|
*/
|
2992
|
-
#line
|
2980
|
+
#line 2359 "informixc.ec"
|
2993
2981
|
{
|
2994
|
-
#line
|
2982
|
+
#line 2359 "informixc.ec"
|
2995
2983
|
sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256));
|
2996
|
-
#line
|
2984
|
+
#line 2359 "informixc.ec"
|
2997
2985
|
}
|
2998
2986
|
|
2999
2987
|
return result;
|
@@ -3019,13 +3007,13 @@ st_free(cursor_t *c)
|
|
3019
3007
|
/*
|
3020
3008
|
* EXEC SQL begin declare section;
|
3021
3009
|
*/
|
3022
|
-
#line
|
3023
|
-
#line
|
3010
|
+
#line 2381 "informixc.ec"
|
3011
|
+
#line 2382 "informixc.ec"
|
3024
3012
|
char *sid, *did;
|
3025
3013
|
/*
|
3026
3014
|
* EXEC SQL end declare section;
|
3027
3015
|
*/
|
3028
|
-
#line
|
3016
|
+
#line 2383 "informixc.ec"
|
3029
3017
|
|
3030
3018
|
|
3031
3019
|
free_input_slots(c);
|
@@ -3035,11 +3023,11 @@ st_free(cursor_t *c)
|
|
3035
3023
|
/*
|
3036
3024
|
* EXEC SQL set connection :did;
|
3037
3025
|
*/
|
3038
|
-
#line
|
3026
|
+
#line 2389 "informixc.ec"
|
3039
3027
|
{
|
3040
|
-
#line
|
3028
|
+
#line 2389 "informixc.ec"
|
3041
3029
|
sqli_connect_set(0, did, 0);
|
3042
|
-
#line
|
3030
|
+
#line 2389 "informixc.ec"
|
3043
3031
|
}
|
3044
3032
|
if (SQLCODE < 0)
|
3045
3033
|
return;
|
@@ -3048,11 +3036,11 @@ st_free(cursor_t *c)
|
|
3048
3036
|
/*
|
3049
3037
|
* EXEC SQL free :sid;
|
3050
3038
|
*/
|
3051
|
-
#line
|
3039
|
+
#line 2394 "informixc.ec"
|
3052
3040
|
{
|
3053
|
-
#line
|
3041
|
+
#line 2394 "informixc.ec"
|
3054
3042
|
sqli_curs_free(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, sid, 258));
|
3055
|
-
#line
|
3043
|
+
#line 2394 "informixc.ec"
|
3056
3044
|
}
|
3057
3045
|
}
|
3058
3046
|
|
@@ -3083,13 +3071,13 @@ rb_statement_initialize(VALUE self, VALUE db, VALUE query)
|
|
3083
3071
|
/*
|
3084
3072
|
* EXEC SQL begin declare section;
|
3085
3073
|
*/
|
3086
|
-
#line
|
3087
|
-
#line
|
3074
|
+
#line 2421 "informixc.ec"
|
3075
|
+
#line 2422 "informixc.ec"
|
3088
3076
|
char *c_query, *sid, *did;
|
3089
3077
|
/*
|
3090
3078
|
* EXEC SQL end declare section;
|
3091
3079
|
*/
|
3092
|
-
#line
|
3080
|
+
#line 2423 "informixc.ec"
|
3093
3081
|
|
3094
3082
|
|
3095
3083
|
Data_Get_Struct(db, database_t, dbt);
|
@@ -3097,11 +3085,11 @@ rb_statement_initialize(VALUE self, VALUE db, VALUE query)
|
|
3097
3085
|
/*
|
3098
3086
|
* EXEC SQL set connection :did;
|
3099
3087
|
*/
|
3100
|
-
#line
|
3088
|
+
#line 2427 "informixc.ec"
|
3101
3089
|
{
|
3102
|
-
#line
|
3090
|
+
#line 2427 "informixc.ec"
|
3103
3091
|
sqli_connect_set(0, did, 0);
|
3104
|
-
#line
|
3092
|
+
#line 2427 "informixc.ec"
|
3105
3093
|
}
|
3106
3094
|
if (SQLCODE < 0)
|
3107
3095
|
raise_ifx_extended();
|
@@ -3117,11 +3105,11 @@ rb_statement_initialize(VALUE self, VALUE db, VALUE query)
|
|
3117
3105
|
/*
|
3118
3106
|
* EXEC SQL prepare :sid from :c_query;
|
3119
3107
|
*/
|
3120
|
-
#line
|
3108
|
+
#line 2439 "informixc.ec"
|
3121
3109
|
{
|
3122
|
-
#line
|
3110
|
+
#line 2439 "informixc.ec"
|
3123
3111
|
sqli_prep(ESQLINTVERSION, sid, c_query,(ifx_literal_t *)0, (ifx_namelist_t *)0, -1, 0, 0 );
|
3124
|
-
#line
|
3112
|
+
#line 2439 "informixc.ec"
|
3125
3113
|
}
|
3126
3114
|
if (SQLCODE < 0)
|
3127
3115
|
raise_ifx_extended();
|
@@ -3130,11 +3118,11 @@ rb_statement_initialize(VALUE self, VALUE db, VALUE query)
|
|
3130
3118
|
/*
|
3131
3119
|
* EXEC SQL describe :sid into output;
|
3132
3120
|
*/
|
3133
|
-
#line
|
3121
|
+
#line 2444 "informixc.ec"
|
3134
3122
|
{
|
3135
|
-
#line
|
3123
|
+
#line 2444 "informixc.ec"
|
3136
3124
|
sqli_describe_stmt(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, sid, 257), &output, 0);
|
3137
|
-
#line
|
3125
|
+
#line 2444 "informixc.ec"
|
3138
3126
|
}
|
3139
3127
|
c->daOutput = output;
|
3140
3128
|
|
@@ -3181,13 +3169,13 @@ rb_statement_call(int argc, VALUE *argv, VALUE self)
|
|
3181
3169
|
/*
|
3182
3170
|
* EXEC SQL begin declare section;
|
3183
3171
|
*/
|
3184
|
-
#line
|
3185
|
-
#line
|
3172
|
+
#line 2487 "informixc.ec"
|
3173
|
+
#line 2488 "informixc.ec"
|
3186
3174
|
char *sid, *did;
|
3187
3175
|
/*
|
3188
3176
|
* EXEC SQL end declare section;
|
3189
3177
|
*/
|
3190
|
-
#line
|
3178
|
+
#line 2489 "informixc.ec"
|
3191
3179
|
|
3192
3180
|
|
3193
3181
|
Data_Get_Struct(self, cursor_t, c);
|
@@ -3196,11 +3184,11 @@ rb_statement_call(int argc, VALUE *argv, VALUE self)
|
|
3196
3184
|
/*
|
3197
3185
|
* EXEC SQL set connection :did;
|
3198
3186
|
*/
|
3199
|
-
#line
|
3187
|
+
#line 2494 "informixc.ec"
|
3200
3188
|
{
|
3201
|
-
#line
|
3189
|
+
#line 2494 "informixc.ec"
|
3202
3190
|
sqli_connect_set(0, did, 0);
|
3203
|
-
#line
|
3191
|
+
#line 2494 "informixc.ec"
|
3204
3192
|
}
|
3205
3193
|
if (SQLCODE < 0)
|
3206
3194
|
raise_ifx_extended();
|
@@ -3220,11 +3208,11 @@ rb_statement_call(int argc, VALUE *argv, VALUE self)
|
|
3220
3208
|
* EXEC SQL execute :sid into descriptor output
|
3221
3209
|
* using descriptor input;
|
3222
3210
|
*/
|
3223
|
-
#line
|
3211
|
+
#line 2509 "informixc.ec"
|
3224
3212
|
{
|
3225
|
-
#line
|
3213
|
+
#line 2510 "informixc.ec"
|
3226
3214
|
sqli_exec(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, sid, 257), input, (char *)0, (struct value *)0, output, (char *)0, (struct value *)0, 0);
|
3227
|
-
#line
|
3215
|
+
#line 2510 "informixc.ec"
|
3228
3216
|
}
|
3229
3217
|
clean_input_slots(c);
|
3230
3218
|
}
|
@@ -3232,11 +3220,11 @@ rb_statement_call(int argc, VALUE *argv, VALUE self)
|
|
3232
3220
|
/*
|
3233
3221
|
* EXEC SQL execute :sid into descriptor output;
|
3234
3222
|
*/
|
3235
|
-
#line
|
3223
|
+
#line 2514 "informixc.ec"
|
3236
3224
|
{
|
3237
|
-
#line
|
3225
|
+
#line 2514 "informixc.ec"
|
3238
3226
|
sqli_exec(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, sid, 257), (ifx_sqlda_t *)0, (char *)0, (struct value *)0, output, (char *)0, (struct value *)0, 0);
|
3239
|
-
#line
|
3227
|
+
#line 2514 "informixc.ec"
|
3240
3228
|
}
|
3241
3229
|
|
3242
3230
|
if (SQLCODE < 0)
|
@@ -3252,11 +3240,11 @@ rb_statement_call(int argc, VALUE *argv, VALUE self)
|
|
3252
3240
|
/*
|
3253
3241
|
* EXEC SQL execute :sid using descriptor input;
|
3254
3242
|
*/
|
3255
|
-
#line
|
3243
|
+
#line 2526 "informixc.ec"
|
3256
3244
|
{
|
3257
|
-
#line
|
3245
|
+
#line 2526 "informixc.ec"
|
3258
3246
|
sqli_exec(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, sid, 257), input, (char *)0, (struct value *)0, (ifx_sqlda_t *)0, (char *)0, (struct value *)0, 0);
|
3259
|
-
#line
|
3247
|
+
#line 2526 "informixc.ec"
|
3260
3248
|
}
|
3261
3249
|
clean_input_slots(c);
|
3262
3250
|
}
|
@@ -3264,11 +3252,11 @@ rb_statement_call(int argc, VALUE *argv, VALUE self)
|
|
3264
3252
|
/*
|
3265
3253
|
* EXEC SQL execute :sid;
|
3266
3254
|
*/
|
3267
|
-
#line
|
3255
|
+
#line 2530 "informixc.ec"
|
3268
3256
|
{
|
3269
|
-
#line
|
3257
|
+
#line 2530 "informixc.ec"
|
3270
3258
|
sqli_exec(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, sid, 257), (ifx_sqlda_t *)0, (char *)0, (struct value *)0, (ifx_sqlda_t *)0, (char *)0, (struct value *)0, 0);
|
3271
|
-
#line
|
3259
|
+
#line 2530 "informixc.ec"
|
3272
3260
|
}
|
3273
3261
|
}
|
3274
3262
|
if (SQLCODE < 0)
|
@@ -3330,13 +3318,13 @@ fetch(VALUE self, VALUE type, VALUE bang)
|
|
3330
3318
|
/*
|
3331
3319
|
* EXEC SQL begin declare section;
|
3332
3320
|
*/
|
3333
|
-
#line
|
3334
|
-
#line
|
3321
|
+
#line 2588 "informixc.ec"
|
3322
|
+
#line 2589 "informixc.ec"
|
3335
3323
|
char *cid, *did;
|
3336
3324
|
/*
|
3337
3325
|
* EXEC SQL end declare section;
|
3338
3326
|
*/
|
3339
|
-
#line
|
3327
|
+
#line 2590 "informixc.ec"
|
3340
3328
|
|
3341
3329
|
short c_bang;
|
3342
3330
|
cursor_t *c;
|
@@ -3351,11 +3339,11 @@ fetch(VALUE self, VALUE type, VALUE bang)
|
|
3351
3339
|
/*
|
3352
3340
|
* EXEC SQL set connection :did;
|
3353
3341
|
*/
|
3354
|
-
#line
|
3342
|
+
#line 2601 "informixc.ec"
|
3355
3343
|
{
|
3356
|
-
#line
|
3344
|
+
#line 2601 "informixc.ec"
|
3357
3345
|
sqli_connect_set(0, did, 0);
|
3358
|
-
#line
|
3346
|
+
#line 2601 "informixc.ec"
|
3359
3347
|
}
|
3360
3348
|
if (SQLCODE < 0)
|
3361
3349
|
raise_ifx_extended();
|
@@ -3366,12 +3354,12 @@ fetch(VALUE self, VALUE type, VALUE bang)
|
|
3366
3354
|
/*
|
3367
3355
|
* EXEC SQL fetch :cid using descriptor output;
|
3368
3356
|
*/
|
3369
|
-
#line
|
3357
|
+
#line 2608 "informixc.ec"
|
3370
3358
|
{
|
3371
|
-
#line
|
3359
|
+
#line 2608 "informixc.ec"
|
3372
3360
|
static _FetchSpec _FS0 = { 0, 1, 0 };
|
3373
3361
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), (ifx_sqlda_t *)0, output, (char *)0, &_FS0);
|
3374
|
-
#line
|
3362
|
+
#line 2608 "informixc.ec"
|
3375
3363
|
}
|
3376
3364
|
if (SQLCODE < 0)
|
3377
3365
|
raise_ifx_extended();
|
@@ -3393,13 +3381,13 @@ fetch_many(VALUE self, VALUE n, VALUE type)
|
|
3393
3381
|
/*
|
3394
3382
|
* EXEC SQL begin declare section;
|
3395
3383
|
*/
|
3396
|
-
#line
|
3397
|
-
#line
|
3384
|
+
#line 2626 "informixc.ec"
|
3385
|
+
#line 2627 "informixc.ec"
|
3398
3386
|
char *cid, *did;
|
3399
3387
|
/*
|
3400
3388
|
* EXEC SQL end declare section;
|
3401
3389
|
*/
|
3402
|
-
#line
|
3390
|
+
#line 2628 "informixc.ec"
|
3403
3391
|
|
3404
3392
|
cursor_t *c;
|
3405
3393
|
struct sqlda *output;
|
@@ -3415,11 +3403,11 @@ fetch_many(VALUE self, VALUE n, VALUE type)
|
|
3415
3403
|
/*
|
3416
3404
|
* EXEC SQL set connection :did;
|
3417
3405
|
*/
|
3418
|
-
#line
|
3406
|
+
#line 2640 "informixc.ec"
|
3419
3407
|
{
|
3420
|
-
#line
|
3408
|
+
#line 2640 "informixc.ec"
|
3421
3409
|
sqli_connect_set(0, did, 0);
|
3422
|
-
#line
|
3410
|
+
#line 2640 "informixc.ec"
|
3423
3411
|
}
|
3424
3412
|
if (SQLCODE < 0)
|
3425
3413
|
raise_ifx_extended();
|
@@ -3439,12 +3427,12 @@ fetch_many(VALUE self, VALUE n, VALUE type)
|
|
3439
3427
|
/*
|
3440
3428
|
* EXEC SQL fetch :cid using descriptor output;
|
3441
3429
|
*/
|
3442
|
-
#line
|
3430
|
+
#line 2656 "informixc.ec"
|
3443
3431
|
{
|
3444
|
-
#line
|
3432
|
+
#line 2656 "informixc.ec"
|
3445
3433
|
static _FetchSpec _FS0 = { 0, 1, 0 };
|
3446
3434
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), (ifx_sqlda_t *)0, output, (char *)0, &_FS0);
|
3447
|
-
#line
|
3435
|
+
#line 2656 "informixc.ec"
|
3448
3436
|
}
|
3449
3437
|
if (SQLCODE < 0)
|
3450
3438
|
raise_ifx_extended();
|
@@ -3473,13 +3461,13 @@ each(VALUE self, VALUE type, VALUE bang)
|
|
3473
3461
|
/*
|
3474
3462
|
* EXEC SQL begin declare section;
|
3475
3463
|
*/
|
3476
|
-
#line
|
3477
|
-
#line
|
3464
|
+
#line 2681 "informixc.ec"
|
3465
|
+
#line 2682 "informixc.ec"
|
3478
3466
|
char *cid, *did;
|
3479
3467
|
/*
|
3480
3468
|
* EXEC SQL end declare section;
|
3481
3469
|
*/
|
3482
|
-
#line
|
3470
|
+
#line 2683 "informixc.ec"
|
3483
3471
|
|
3484
3472
|
short c_bang;
|
3485
3473
|
struct sqlda *output;
|
@@ -3493,11 +3481,11 @@ each(VALUE self, VALUE type, VALUE bang)
|
|
3493
3481
|
/*
|
3494
3482
|
* EXEC SQL set connection :did;
|
3495
3483
|
*/
|
3496
|
-
#line
|
3484
|
+
#line 2693 "informixc.ec"
|
3497
3485
|
{
|
3498
|
-
#line
|
3486
|
+
#line 2693 "informixc.ec"
|
3499
3487
|
sqli_connect_set(0, did, 0);
|
3500
|
-
#line
|
3488
|
+
#line 2693 "informixc.ec"
|
3501
3489
|
}
|
3502
3490
|
if (SQLCODE < 0)
|
3503
3491
|
raise_ifx_extended();
|
@@ -3509,12 +3497,12 @@ each(VALUE self, VALUE type, VALUE bang)
|
|
3509
3497
|
/*
|
3510
3498
|
* EXEC SQL fetch :cid using descriptor output;
|
3511
3499
|
*/
|
3512
|
-
#line
|
3500
|
+
#line 2701 "informixc.ec"
|
3513
3501
|
{
|
3514
|
-
#line
|
3502
|
+
#line 2701 "informixc.ec"
|
3515
3503
|
static _FetchSpec _FS0 = { 0, 1, 0 };
|
3516
3504
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), (ifx_sqlda_t *)0, output, (char *)0, &_FS0);
|
3517
|
-
#line
|
3505
|
+
#line 2701 "informixc.ec"
|
3518
3506
|
}
|
3519
3507
|
if (SQLCODE < 0)
|
3520
3508
|
raise_ifx_extended();
|
@@ -3576,13 +3564,13 @@ rb_inscur_put(int argc, VALUE *argv, VALUE self)
|
|
3576
3564
|
/*
|
3577
3565
|
* EXEC SQL begin declare section;
|
3578
3566
|
*/
|
3579
|
-
#line
|
3580
|
-
#line
|
3567
|
+
#line 2759 "informixc.ec"
|
3568
|
+
#line 2760 "informixc.ec"
|
3581
3569
|
char *cid, *did;
|
3582
3570
|
/*
|
3583
3571
|
* EXEC SQL end declare section;
|
3584
3572
|
*/
|
3585
|
-
#line
|
3573
|
+
#line 2761 "informixc.ec"
|
3586
3574
|
|
3587
3575
|
|
3588
3576
|
Data_Get_Struct(self, cursor_t, c);
|
@@ -3593,11 +3581,11 @@ rb_inscur_put(int argc, VALUE *argv, VALUE self)
|
|
3593
3581
|
/*
|
3594
3582
|
* EXEC SQL set connection :did;
|
3595
3583
|
*/
|
3596
|
-
#line
|
3584
|
+
#line 2768 "informixc.ec"
|
3597
3585
|
{
|
3598
|
-
#line
|
3586
|
+
#line 2768 "informixc.ec"
|
3599
3587
|
sqli_connect_set(0, did, 0);
|
3600
|
-
#line
|
3588
|
+
#line 2768 "informixc.ec"
|
3601
3589
|
}
|
3602
3590
|
if (SQLCODE < 0)
|
3603
3591
|
raise_ifx_extended();
|
@@ -3613,11 +3601,11 @@ rb_inscur_put(int argc, VALUE *argv, VALUE self)
|
|
3613
3601
|
/*
|
3614
3602
|
* EXEC SQL put :cid using descriptor input;
|
3615
3603
|
*/
|
3616
|
-
#line
|
3604
|
+
#line 2780 "informixc.ec"
|
3617
3605
|
{
|
3618
|
-
#line
|
3606
|
+
#line 2780 "informixc.ec"
|
3619
3607
|
sqli_curs_put(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), input, (char *)0);
|
3620
|
-
#line
|
3608
|
+
#line 2780 "informixc.ec"
|
3621
3609
|
}
|
3622
3610
|
clean_input_slots(c);
|
3623
3611
|
if (SQLCODE < 0)
|
@@ -3642,13 +3630,13 @@ rb_inscur_flush(VALUE self)
|
|
3642
3630
|
/*
|
3643
3631
|
* EXEC SQL begin declare section;
|
3644
3632
|
*/
|
3645
|
-
#line
|
3646
|
-
#line
|
3633
|
+
#line 2801 "informixc.ec"
|
3634
|
+
#line 2802 "informixc.ec"
|
3647
3635
|
char *cid, *did;
|
3648
3636
|
/*
|
3649
3637
|
* EXEC SQL end declare section;
|
3650
3638
|
*/
|
3651
|
-
#line
|
3639
|
+
#line 2803 "informixc.ec"
|
3652
3640
|
|
3653
3641
|
|
3654
3642
|
Data_Get_Struct(self, cursor_t, c);
|
@@ -3659,11 +3647,11 @@ rb_inscur_flush(VALUE self)
|
|
3659
3647
|
/*
|
3660
3648
|
* EXEC SQL set connection :did;
|
3661
3649
|
*/
|
3662
|
-
#line
|
3650
|
+
#line 2810 "informixc.ec"
|
3663
3651
|
{
|
3664
|
-
#line
|
3652
|
+
#line 2810 "informixc.ec"
|
3665
3653
|
sqli_connect_set(0, did, 0);
|
3666
|
-
#line
|
3654
|
+
#line 2810 "informixc.ec"
|
3667
3655
|
}
|
3668
3656
|
if (SQLCODE < 0)
|
3669
3657
|
raise_ifx_extended();
|
@@ -3672,11 +3660,11 @@ rb_inscur_flush(VALUE self)
|
|
3672
3660
|
/*
|
3673
3661
|
* EXEC SQL flush :cid;
|
3674
3662
|
*/
|
3675
|
-
#line
|
3663
|
+
#line 2815 "informixc.ec"
|
3676
3664
|
{
|
3677
|
-
#line
|
3665
|
+
#line 2815 "informixc.ec"
|
3678
3666
|
sqli_curs_flush(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256));
|
3679
|
-
#line
|
3667
|
+
#line 2815 "informixc.ec"
|
3680
3668
|
}
|
3681
3669
|
return self;
|
3682
3670
|
}
|
@@ -3697,14 +3685,14 @@ rb_scrollcur_entry(VALUE self, VALUE index, VALUE type, VALUE bang)
|
|
3697
3685
|
/*
|
3698
3686
|
* EXEC SQL begin declare section;
|
3699
3687
|
*/
|
3700
|
-
#line
|
3701
|
-
#line
|
3688
|
+
#line 2832 "informixc.ec"
|
3689
|
+
#line 2833 "informixc.ec"
|
3702
3690
|
char *cid, *did;
|
3703
3691
|
long pos;
|
3704
3692
|
/*
|
3705
3693
|
* EXEC SQL end declare section;
|
3706
3694
|
*/
|
3707
|
-
#line
|
3695
|
+
#line 2835 "informixc.ec"
|
3708
3696
|
|
3709
3697
|
|
3710
3698
|
Data_Get_Struct(self, cursor_t, c);
|
@@ -3715,11 +3703,11 @@ long pos;
|
|
3715
3703
|
/*
|
3716
3704
|
* EXEC SQL set connection :did;
|
3717
3705
|
*/
|
3718
|
-
#line
|
3706
|
+
#line 2842 "informixc.ec"
|
3719
3707
|
{
|
3720
|
-
#line
|
3708
|
+
#line 2842 "informixc.ec"
|
3721
3709
|
sqli_connect_set(0, did, 0);
|
3722
|
-
#line
|
3710
|
+
#line 2842 "informixc.ec"
|
3723
3711
|
}
|
3724
3712
|
if (SQLCODE < 0)
|
3725
3713
|
return Qnil;
|
@@ -3731,60 +3719,60 @@ long pos;
|
|
3731
3719
|
/*
|
3732
3720
|
* EXEC SQL fetch current :cid using descriptor output;
|
3733
3721
|
*/
|
3734
|
-
#line
|
3722
|
+
#line 2850 "informixc.ec"
|
3735
3723
|
{
|
3736
|
-
#line
|
3724
|
+
#line 2850 "informixc.ec"
|
3737
3725
|
static _FetchSpec _FS0 = { 0, 5, 0 };
|
3738
3726
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), (ifx_sqlda_t *)0, output, (char *)0, &_FS0);
|
3739
|
-
#line
|
3727
|
+
#line 2850 "informixc.ec"
|
3740
3728
|
}
|
3741
3729
|
else if ((pos = NUM2LONG(index) + 1) > 0)
|
3742
3730
|
/*
|
3743
3731
|
* EXEC SQL fetch absolute :pos :cid using descriptor output;
|
3744
3732
|
*/
|
3745
|
-
#line
|
3733
|
+
#line 2852 "informixc.ec"
|
3746
3734
|
{
|
3747
|
-
#line
|
3735
|
+
#line 2852 "informixc.ec"
|
3748
3736
|
static ifx_sqlvar_t _sqibind[] =
|
3749
3737
|
{
|
3750
3738
|
{ 103, sizeof(pos), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
3751
|
-
#line
|
3739
|
+
#line 2852 "informixc.ec"
|
3752
3740
|
};
|
3753
3741
|
static ifx_sqlda_t _SD0 = { 1, _sqibind, {0}, 1, 0 };
|
3754
3742
|
static _FetchSpec _FS1 = { 0, 6, 0 };
|
3755
|
-
#line
|
3743
|
+
#line 2852 "informixc.ec"
|
3756
3744
|
_sqibind[0].sqldata = (char *) &pos;
|
3757
3745
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), &_SD0, output, (char *)0, &_FS1);
|
3758
|
-
#line
|
3746
|
+
#line 2852 "informixc.ec"
|
3759
3747
|
}
|
3760
3748
|
else {
|
3761
3749
|
/*
|
3762
3750
|
* EXEC SQL fetch last :cid;
|
3763
3751
|
*/
|
3764
|
-
#line
|
3752
|
+
#line 2854 "informixc.ec"
|
3765
3753
|
{
|
3766
|
-
#line
|
3754
|
+
#line 2854 "informixc.ec"
|
3767
3755
|
static _FetchSpec _FS0 = { 0, 4, 0 };
|
3768
3756
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), (ifx_sqlda_t *)0, (ifx_sqlda_t *)0, (char *)0, &_FS0);
|
3769
|
-
#line
|
3757
|
+
#line 2854 "informixc.ec"
|
3770
3758
|
}
|
3771
3759
|
/*
|
3772
3760
|
* EXEC SQL fetch relative :pos :cid using descriptor output;
|
3773
3761
|
*/
|
3774
|
-
#line
|
3762
|
+
#line 2855 "informixc.ec"
|
3775
3763
|
{
|
3776
|
-
#line
|
3764
|
+
#line 2855 "informixc.ec"
|
3777
3765
|
static ifx_sqlvar_t _sqibind[] =
|
3778
3766
|
{
|
3779
3767
|
{ 103, sizeof(pos), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
3780
|
-
#line
|
3768
|
+
#line 2855 "informixc.ec"
|
3781
3769
|
};
|
3782
3770
|
static ifx_sqlda_t _SD0 = { 1, _sqibind, {0}, 1, 0 };
|
3783
3771
|
static _FetchSpec _FS1 = { 0, 7, 0 };
|
3784
|
-
#line
|
3772
|
+
#line 2855 "informixc.ec"
|
3785
3773
|
_sqibind[0].sqldata = (char *) &pos;
|
3786
3774
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), &_SD0, output, (char *)0, &_FS1);
|
3787
|
-
#line
|
3775
|
+
#line 2855 "informixc.ec"
|
3788
3776
|
}
|
3789
3777
|
}
|
3790
3778
|
|
@@ -3812,14 +3800,14 @@ rb_scrollcur_rel(VALUE self, VALUE offset, VALUE type, VALUE bang)
|
|
3812
3800
|
/*
|
3813
3801
|
* EXEC SQL begin declare section;
|
3814
3802
|
*/
|
3815
|
-
#line
|
3816
|
-
#line
|
3803
|
+
#line 2879 "informixc.ec"
|
3804
|
+
#line 2880 "informixc.ec"
|
3817
3805
|
char *cid, *did;
|
3818
3806
|
long pos;
|
3819
3807
|
/*
|
3820
3808
|
* EXEC SQL end declare section;
|
3821
3809
|
*/
|
3822
|
-
#line
|
3810
|
+
#line 2882 "informixc.ec"
|
3823
3811
|
|
3824
3812
|
|
3825
3813
|
Data_Get_Struct(self, cursor_t, c);
|
@@ -3830,11 +3818,11 @@ long pos;
|
|
3830
3818
|
/*
|
3831
3819
|
* EXEC SQL set connection :did;
|
3832
3820
|
*/
|
3833
|
-
#line
|
3821
|
+
#line 2889 "informixc.ec"
|
3834
3822
|
{
|
3835
|
-
#line
|
3823
|
+
#line 2889 "informixc.ec"
|
3836
3824
|
sqli_connect_set(0, did, 0);
|
3837
|
-
#line
|
3825
|
+
#line 2889 "informixc.ec"
|
3838
3826
|
}
|
3839
3827
|
if (SQLCODE < 0)
|
3840
3828
|
return Qnil;
|
@@ -3846,20 +3834,20 @@ long pos;
|
|
3846
3834
|
/*
|
3847
3835
|
* EXEC SQL fetch relative :pos :cid using descriptor output;
|
3848
3836
|
*/
|
3849
|
-
#line
|
3837
|
+
#line 2897 "informixc.ec"
|
3850
3838
|
{
|
3851
|
-
#line
|
3839
|
+
#line 2897 "informixc.ec"
|
3852
3840
|
static ifx_sqlvar_t _sqibind[] =
|
3853
3841
|
{
|
3854
3842
|
{ 103, sizeof(pos), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
3855
|
-
#line
|
3843
|
+
#line 2897 "informixc.ec"
|
3856
3844
|
};
|
3857
3845
|
static ifx_sqlda_t _SD0 = { 1, _sqibind, {0}, 1, 0 };
|
3858
3846
|
static _FetchSpec _FS1 = { 0, 7, 0 };
|
3859
|
-
#line
|
3847
|
+
#line 2897 "informixc.ec"
|
3860
3848
|
_sqibind[0].sqldata = (char *) &pos;
|
3861
3849
|
sqli_curs_fetch(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), &_SD0, output, (char *)0, &_FS1);
|
3862
|
-
#line
|
3850
|
+
#line 2897 "informixc.ec"
|
3863
3851
|
}
|
3864
3852
|
|
3865
3853
|
if (SQLCODE == SQLNOTFOUND)
|
@@ -3881,13 +3869,13 @@ cursorbase_close_or_free(cursor_t *c, short op)
|
|
3881
3869
|
/*
|
3882
3870
|
* EXEC SQL begin declare section;
|
3883
3871
|
*/
|
3884
|
-
#line
|
3885
|
-
#line
|
3886
|
-
char *cid, *
|
3872
|
+
#line 2915 "informixc.ec"
|
3873
|
+
#line 2916 "informixc.ec"
|
3874
|
+
char *cid, *did;
|
3887
3875
|
/*
|
3888
3876
|
* EXEC SQL end declare section;
|
3889
3877
|
*/
|
3890
|
-
#line
|
3878
|
+
#line 2917 "informixc.ec"
|
3891
3879
|
|
3892
3880
|
|
3893
3881
|
if (op == 1 && !c->is_open)
|
@@ -3903,11 +3891,11 @@ cursorbase_close_or_free(cursor_t *c, short op)
|
|
3903
3891
|
/*
|
3904
3892
|
* EXEC SQL set connection :did;
|
3905
3893
|
*/
|
3906
|
-
#line
|
3894
|
+
#line 2929 "informixc.ec"
|
3907
3895
|
{
|
3908
|
-
#line
|
3896
|
+
#line 2929 "informixc.ec"
|
3909
3897
|
sqli_connect_set(0, did, 0);
|
3910
|
-
#line
|
3898
|
+
#line 2929 "informixc.ec"
|
3911
3899
|
}
|
3912
3900
|
if (SQLCODE < 0)
|
3913
3901
|
return;
|
@@ -3915,22 +3903,22 @@ cursorbase_close_or_free(cursor_t *c, short op)
|
|
3915
3903
|
/*
|
3916
3904
|
* EXEC SQL close :cid;
|
3917
3905
|
*/
|
3918
|
-
#line
|
3906
|
+
#line 2933 "informixc.ec"
|
3919
3907
|
{
|
3920
|
-
#line
|
3908
|
+
#line 2933 "informixc.ec"
|
3921
3909
|
sqli_curs_close(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256));
|
3922
|
-
#line
|
3910
|
+
#line 2933 "informixc.ec"
|
3923
3911
|
}
|
3924
3912
|
if (op == 1)
|
3925
3913
|
break;
|
3926
3914
|
/*
|
3927
3915
|
* EXEC SQL free :cid;
|
3928
3916
|
*/
|
3929
|
-
#line
|
3917
|
+
#line 2936 "informixc.ec"
|
3930
3918
|
{
|
3931
|
-
#line
|
3919
|
+
#line 2936 "informixc.ec"
|
3932
3920
|
sqli_curs_free(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 258));
|
3933
|
-
#line
|
3921
|
+
#line 2936 "informixc.ec"
|
3934
3922
|
}
|
3935
3923
|
st_free(c);
|
3936
3924
|
break;
|
@@ -3998,13 +3986,13 @@ rb_cursorbase_open(int argc, VALUE *argv, VALUE self)
|
|
3998
3986
|
/*
|
3999
3987
|
* EXEC SQL begin declare section;
|
4000
3988
|
*/
|
4001
|
-
#line
|
4002
|
-
#line
|
3989
|
+
#line 3000 "informixc.ec"
|
3990
|
+
#line 3001 "informixc.ec"
|
4003
3991
|
char *cid, *did;
|
4004
3992
|
/*
|
4005
3993
|
* EXEC SQL end declare section;
|
4006
3994
|
*/
|
4007
|
-
#line
|
3995
|
+
#line 3002 "informixc.ec"
|
4008
3996
|
|
4009
3997
|
|
4010
3998
|
Data_Get_Struct(self, cursor_t, c);
|
@@ -4016,11 +4004,11 @@ rb_cursorbase_open(int argc, VALUE *argv, VALUE self)
|
|
4016
4004
|
/*
|
4017
4005
|
* EXEC SQL set connection :did;
|
4018
4006
|
*/
|
4019
|
-
#line
|
4007
|
+
#line 3010 "informixc.ec"
|
4020
4008
|
{
|
4021
|
-
#line
|
4009
|
+
#line 3010 "informixc.ec"
|
4022
4010
|
sqli_connect_set(0, did, 0);
|
4023
|
-
#line
|
4011
|
+
#line 3010 "informixc.ec"
|
4024
4012
|
}
|
4025
4013
|
if (SQLCODE < 0)
|
4026
4014
|
raise_ifx_extended();
|
@@ -4039,11 +4027,11 @@ rb_cursorbase_open(int argc, VALUE *argv, VALUE self)
|
|
4039
4027
|
* EXEC SQL open :cid using descriptor input
|
4040
4028
|
* with reoptimization;
|
4041
4029
|
*/
|
4042
|
-
#line
|
4030
|
+
#line 3024 "informixc.ec"
|
4043
4031
|
{
|
4044
|
-
#line
|
4032
|
+
#line 3025 "informixc.ec"
|
4045
4033
|
sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), input, (char *)0, (struct value *)0, 1, 1);
|
4046
|
-
#line
|
4034
|
+
#line 3025 "informixc.ec"
|
4047
4035
|
}
|
4048
4036
|
clean_input_slots(c);
|
4049
4037
|
}
|
@@ -4051,22 +4039,22 @@ rb_cursorbase_open(int argc, VALUE *argv, VALUE self)
|
|
4051
4039
|
/*
|
4052
4040
|
* EXEC SQL open :cid with reoptimization;
|
4053
4041
|
*/
|
4054
|
-
#line
|
4042
|
+
#line 3029 "informixc.ec"
|
4055
4043
|
{
|
4056
|
-
#line
|
4044
|
+
#line 3029 "informixc.ec"
|
4057
4045
|
sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), (ifx_sqlda_t *)0, (char *)0, (struct value *)0, 0, 1);
|
4058
|
-
#line
|
4046
|
+
#line 3029 "informixc.ec"
|
4059
4047
|
}
|
4060
4048
|
}
|
4061
4049
|
else
|
4062
4050
|
/*
|
4063
4051
|
* EXEC SQL open :cid;
|
4064
4052
|
*/
|
4065
|
-
#line
|
4053
|
+
#line 3032 "informixc.ec"
|
4066
4054
|
{
|
4067
|
-
#line
|
4055
|
+
#line 3032 "informixc.ec"
|
4068
4056
|
sqli_curs_open(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 256), (ifx_sqlda_t *)0, (char *)0, (struct value *)0, 0, 0);
|
4069
|
-
#line
|
4057
|
+
#line 3032 "informixc.ec"
|
4070
4058
|
}
|
4071
4059
|
|
4072
4060
|
if (SQLCODE < 0)
|
@@ -4128,30 +4116,28 @@ rb_cursor_s_new0(int argc, VALUE *argv, VALUE self)
|
|
4128
4116
|
/*
|
4129
4117
|
* EXEC SQL begin declare section;
|
4130
4118
|
*/
|
4131
|
-
#line
|
4132
|
-
#line
|
4119
|
+
#line 3090 "informixc.ec"
|
4120
|
+
#line 3091 "informixc.ec"
|
4133
4121
|
char *c_query;
|
4134
4122
|
char *cid, *sid, *did;
|
4135
4123
|
/*
|
4136
4124
|
* EXEC SQL end declare section;
|
4137
4125
|
*/
|
4138
|
-
#line
|
4126
|
+
#line 3093 "informixc.ec"
|
4139
4127
|
|
4140
4128
|
|
4141
4129
|
memset(&c, 0, sizeof(c));
|
4142
4130
|
rb_scan_args(argc, argv, "21", &db, &query, &options);
|
4143
4131
|
Data_Get_Struct(db, database_t, dbt);
|
4144
4132
|
did = dbt->database_id;
|
4145
|
-
fprintf(stderr, "%s\n", did);
|
4146
|
-
fflush(stderr);
|
4147
4133
|
/*
|
4148
4134
|
* EXEC SQL set connection :did;
|
4149
4135
|
*/
|
4150
|
-
#line
|
4136
|
+
#line 3099 "informixc.ec"
|
4151
4137
|
{
|
4152
|
-
#line
|
4138
|
+
#line 3099 "informixc.ec"
|
4153
4139
|
sqli_connect_set(0, did, 0);
|
4154
|
-
#line
|
4140
|
+
#line 3099 "informixc.ec"
|
4155
4141
|
}
|
4156
4142
|
|
4157
4143
|
if (SQLCODE < 0)
|
@@ -4160,7 +4146,6 @@ rb_cursor_s_new0(int argc, VALUE *argv, VALUE self)
|
|
4160
4146
|
c.db = db;
|
4161
4147
|
c.database_id = did;
|
4162
4148
|
scroll = hold = Qfalse;
|
4163
|
-
/*id = random();*/
|
4164
4149
|
id = dbt->idcount++;
|
4165
4150
|
snprintf(c.cursor_id, sizeof(c.cursor_id), "CUR%lX", id);
|
4166
4151
|
snprintf(c.stmt_id, sizeof(c.stmt_id), "STMT%lX", id);
|
@@ -4176,11 +4161,11 @@ rb_cursor_s_new0(int argc, VALUE *argv, VALUE self)
|
|
4176
4161
|
/*
|
4177
4162
|
* EXEC SQL prepare :sid from :c_query;
|
4178
4163
|
*/
|
4179
|
-
#line
|
4164
|
+
#line 3119 "informixc.ec"
|
4180
4165
|
{
|
4181
|
-
#line
|
4166
|
+
#line 3119 "informixc.ec"
|
4182
4167
|
sqli_prep(ESQLINTVERSION, sid, c_query,(ifx_literal_t *)0, (ifx_namelist_t *)0, -1, 0, 0 );
|
4183
|
-
#line
|
4168
|
+
#line 3119 "informixc.ec"
|
4184
4169
|
}
|
4185
4170
|
if (SQLCODE < 0)
|
4186
4171
|
raise_ifx_extended();
|
@@ -4189,41 +4174,41 @@ rb_cursor_s_new0(int argc, VALUE *argv, VALUE self)
|
|
4189
4174
|
/*
|
4190
4175
|
* EXEC SQL declare :cid scroll cursor with hold for :sid;
|
4191
4176
|
*/
|
4192
|
-
#line
|
4177
|
+
#line 3124 "informixc.ec"
|
4193
4178
|
{
|
4194
|
-
#line
|
4179
|
+
#line 3124 "informixc.ec"
|
4195
4180
|
sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 0), cid, sqli_curs_locate(ESQLINTVERSION, sid, 1), 4128, 0);
|
4196
|
-
#line
|
4181
|
+
#line 3124 "informixc.ec"
|
4197
4182
|
}
|
4198
4183
|
else if (RTEST(hold))
|
4199
4184
|
/*
|
4200
4185
|
* EXEC SQL declare :cid cursor with hold for :sid;
|
4201
4186
|
*/
|
4202
|
-
#line
|
4187
|
+
#line 3126 "informixc.ec"
|
4203
4188
|
{
|
4204
|
-
#line
|
4189
|
+
#line 3126 "informixc.ec"
|
4205
4190
|
sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 0), cid, sqli_curs_locate(ESQLINTVERSION, sid, 1), 4096, 0);
|
4206
|
-
#line
|
4191
|
+
#line 3126 "informixc.ec"
|
4207
4192
|
}
|
4208
4193
|
else if (RTEST(scroll))
|
4209
4194
|
/*
|
4210
4195
|
* EXEC SQL declare :cid scroll cursor for :sid;
|
4211
4196
|
*/
|
4212
|
-
#line
|
4197
|
+
#line 3128 "informixc.ec"
|
4213
4198
|
{
|
4214
|
-
#line
|
4199
|
+
#line 3128 "informixc.ec"
|
4215
4200
|
sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 0), cid, sqli_curs_locate(ESQLINTVERSION, sid, 1), 32, 0);
|
4216
|
-
#line
|
4201
|
+
#line 3128 "informixc.ec"
|
4217
4202
|
}
|
4218
4203
|
else
|
4219
4204
|
/*
|
4220
4205
|
* EXEC SQL declare :cid cursor for :sid;
|
4221
4206
|
*/
|
4222
|
-
#line
|
4207
|
+
#line 3130 "informixc.ec"
|
4223
4208
|
{
|
4224
|
-
#line
|
4209
|
+
#line 3130 "informixc.ec"
|
4225
4210
|
sqli_curs_decl_dynm(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, cid, 0), cid, sqli_curs_locate(ESQLINTVERSION, sid, 1), 0, 0);
|
4226
|
-
#line
|
4211
|
+
#line 3130 "informixc.ec"
|
4227
4212
|
}
|
4228
4213
|
|
4229
4214
|
if (SQLCODE < 0)
|
@@ -4233,11 +4218,11 @@ rb_cursor_s_new0(int argc, VALUE *argv, VALUE self)
|
|
4233
4218
|
/*
|
4234
4219
|
* EXEC SQL describe :sid into output;
|
4235
4220
|
*/
|
4236
|
-
#line
|
4221
|
+
#line 3136 "informixc.ec"
|
4237
4222
|
{
|
4238
|
-
#line
|
4223
|
+
#line 3136 "informixc.ec"
|
4239
4224
|
sqli_describe_stmt(ESQLINTVERSION, sqli_curs_locate(ESQLINTVERSION, sid, 257), &output, 0);
|
4240
|
-
#line
|
4225
|
+
#line 3136 "informixc.ec"
|
4241
4226
|
}
|
4242
4227
|
c.daOutput = output;
|
4243
4228
|
|
@@ -4474,8 +4459,6 @@ void Init_informixc(void)
|
|
4474
4459
|
rb_define_singleton_method(rb_mCursor, "new0", rb_cursor_s_new0, -1);
|
4475
4460
|
|
4476
4461
|
/* Global constants --------------------------------------------------- */
|
4477
|
-
rb_cArray = rb_const_get(rb_cObject, rb_intern("Array"));
|
4478
|
-
|
4479
4462
|
rb_require("date");
|
4480
4463
|
rb_cDate = rb_const_get(rb_cObject, rb_intern("Date"));
|
4481
4464
|
|
@@ -4530,4 +4513,4 @@ void Init_informixc(void)
|
|
4530
4513
|
sym_params = ID2SYM(rb_intern("params"));
|
4531
4514
|
}
|
4532
4515
|
|
4533
|
-
#line
|
4516
|
+
#line 3424 "informixc.ec"
|