ibm_db 5.0.5-x86-mingw32 → 5.1.0-x86-mingw32

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.
Binary file
@@ -1,14 +1,14 @@
1
- gil_release_version is:
1
+ gil_release_version.h is:
2
2
  /* begin */
3
- 1: #ifndef GIL_RELEASE_VERSION
4
- 2: #define GIL_RELEASE_VERSION
3
+ 1: #ifndef GIL_RELEASE_VERSION_H
4
+ 2: #define GIL_RELEASE_VERSION_H
5
5
  3: #endif
6
6
  /* end */
7
7
 
8
- unicode_support_version is:
8
+ unicode_support_version.h is:
9
9
  /* begin */
10
- 1: #ifndef UNICODE_SUPPORT_VERSION
11
- 2: #define UNICODE_SUPPORT_VERSION
10
+ 1: #ifndef UNICODE_SUPPORT_VERSION_H
11
+ 2: #define UNICODE_SUPPORT_VERSION_H
12
12
  3: #endif
13
13
  /* end */
14
14
 
@@ -80,7 +80,7 @@ checked program was:
80
80
 
81
81
  --------------------
82
82
 
83
- have_header: checking for gil_release_version... -------------------- yes
83
+ have_header: checking for gil_release_version.h... -------------------- yes
84
84
 
85
85
  "i686-w64-mingw32-gcc -E -IC:/Ruby26/include/ruby-2.6.0/i386-mingw32 -IC:/Ruby26/include/ruby-2.6.0/ruby/backward -IC:/Ruby26/include/ruby-2.6.0 -I. -IC:\clidriver\32-bit\clidriver/include -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-fast-math conftest.c -o conftest.i"
86
86
  checked program was:
@@ -89,12 +89,12 @@ checked program was:
89
89
  2:
90
90
  3: #include <winsock2.h>
91
91
  4: #include <windows.h>
92
- 5: #include <gil_release_version>
92
+ 5: #include <gil_release_version.h>
93
93
  /* end */
94
94
 
95
95
  --------------------
96
96
 
97
- have_header: checking for unicode_support_version... -------------------- yes
97
+ have_header: checking for unicode_support_version.h... -------------------- yes
98
98
 
99
99
  "i686-w64-mingw32-gcc -E -IC:/Ruby26/include/ruby-2.6.0/i386-mingw32 -IC:/Ruby26/include/ruby-2.6.0/ruby/backward -IC:/Ruby26/include/ruby-2.6.0 -I. -IC:\clidriver\32-bit\clidriver/include -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-fast-math conftest.c -o conftest.i"
100
100
  checked program was:
@@ -103,7 +103,7 @@ checked program was:
103
103
  2:
104
104
  3: #include <winsock2.h>
105
105
  4: #include <windows.h>
106
- 5: #include <unicode_support_version>
106
+ 5: #include <unicode_support_version.h>
107
107
  /* end */
108
108
 
109
109
  --------------------
@@ -206,7 +206,7 @@ VALUE ibm_db_active(int argc, VALUE *argv, VALUE self);
206
206
  */
207
207
  struct _ibm_db_globals {
208
208
  int bin_mode;
209
- #ifdef UNICODE_SUPPORT_VERSION
209
+ #ifdef UNICODE_SUPPORT_VERSION_H
210
210
  SQLWCHAR __ruby_conn_err_msg[DB2_MAX_ERR_MSG_LEN];
211
211
  SQLWCHAR __ruby_stmt_err_msg[DB2_MAX_ERR_MSG_LEN];
212
212
  SQLWCHAR __ruby_conn_err_state[SQL_SQLSTATE_SIZE + 1];
@@ -31,7 +31,7 @@
31
31
  */
32
32
  int _ruby_ibm_db_SQLConnect_helper(connect_args *data) {
33
33
  if(data->ctlg_conn == 1) {
34
- #ifndef UNICODE_SUPPORT_VERSION
34
+ #ifndef UNICODE_SUPPORT_VERSION_H
35
35
  return SQLConnect( (SQLHDBC)*(data->hdbc), (SQLCHAR *)data->database,
36
36
  (SQLSMALLINT)data->database_len, (SQLCHAR *)data->uid, (SQLSMALLINT)data->uid_len,
37
37
  (SQLCHAR *)data->password, (SQLSMALLINT)data->password_len );
@@ -41,7 +41,7 @@ int _ruby_ibm_db_SQLConnect_helper(connect_args *data) {
41
41
  data->password, data->password_len );
42
42
  #endif
43
43
  } else {
44
- #ifndef UNICODE_SUPPORT_VERSION
44
+ #ifndef UNICODE_SUPPORT_VERSION_H
45
45
  return SQLDriverConnect( (SQLHDBC) *(data->hdbc), (SQLHWND)NULL,
46
46
  (SQLCHAR*)data->database, SQL_NTS, NULL, 0, NULL, SQL_DRIVER_NOPROMPT );
47
47
  #else
@@ -100,7 +100,7 @@ int _ruby_ibm_db_SQLDescribeCol_helper(describecol_args *data) {
100
100
 
101
101
  data->stmt_res->is_executing = 1;
102
102
 
103
- #ifdef UNICODE_SUPPORT_VERSION
103
+ #ifdef UNICODE_SUPPORT_VERSION_H
104
104
  rc = SQLDescribeColW( (SQLHSTMT)data->stmt_res->hstmt, (SQLSMALLINT)(data->col_no),
105
105
  data->stmt_res->column_info[i].name, data->buff_length, &(data->name_length),
106
106
  &(data->stmt_res->column_info[i].type), &(data->stmt_res->column_info[i].size),
@@ -140,7 +140,7 @@ int _ruby_ibm_db_SQLColumnPrivileges_helper(metadata_args *data) {
140
140
 
141
141
  data->stmt_res->is_executing = 1;
142
142
 
143
- #ifndef UNICODE_SUPPORT_VERSION
143
+ #ifndef UNICODE_SUPPORT_VERSION_H
144
144
  rc = SQLColumnPrivileges( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len,
145
145
  data->owner, data->owner_len, data->table_name, data->table_name_len,
146
146
  data->column_name, data->column_name_len );
@@ -164,7 +164,7 @@ int _ruby_ibm_db_SQLColumns_helper(metadata_args *data) {
164
164
 
165
165
  data->stmt_res->is_executing = 1;
166
166
 
167
- #ifndef UNICODE_SUPPORT_VERSION
167
+ #ifndef UNICODE_SUPPORT_VERSION_H
168
168
  rc = SQLColumns( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len,
169
169
  data->owner, data->owner_len, data->table_name, data->table_name_len,
170
170
  data->column_name, data->column_name_len );
@@ -187,7 +187,7 @@ int _ruby_ibm_db_SQLPrimaryKeys_helper(metadata_args *data) {
187
187
 
188
188
  data->stmt_res->is_executing = 1;
189
189
 
190
- #ifndef UNICODE_SUPPORT_VERSION
190
+ #ifndef UNICODE_SUPPORT_VERSION_H
191
191
  rc = SQLPrimaryKeys( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len,
192
192
  data->owner, data->owner_len, data->table_name, data->table_name_len );
193
193
  #else
@@ -210,7 +210,7 @@ int _ruby_ibm_db_SQLForeignKeys_helper(metadata_args *data) {
210
210
 
211
211
  if(!NIL_P(data->table_type))
212
212
  {
213
- #ifndef UNICODE_SUPPORT_VERSION
213
+ #ifndef UNICODE_SUPPORT_VERSION_H
214
214
  rc = SQLForeignKeys( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len,
215
215
  data->owner, data->owner_len, NULL , SQL_NTS, NULL, SQL_NTS,
216
216
  NULL, SQL_NTS, data->table_name, data->table_name_len );
@@ -222,7 +222,7 @@ int _ruby_ibm_db_SQLForeignKeys_helper(metadata_args *data) {
222
222
  }
223
223
  else
224
224
  {
225
- #ifndef UNICODE_SUPPORT_VERSION
225
+ #ifndef UNICODE_SUPPORT_VERSION_H
226
226
  rc = SQLForeignKeys( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len,
227
227
  data->owner, data->owner_len, data->table_name , data->table_name_len, NULL, SQL_NTS,
228
228
  NULL, SQL_NTS, NULL, SQL_NTS );
@@ -247,7 +247,7 @@ int _ruby_ibm_db_SQLProcedureColumns_helper(metadata_args *data) {
247
247
 
248
248
  data->stmt_res->is_executing = 1;
249
249
 
250
- #ifndef UNICODE_SUPPORT_VERSION
250
+ #ifndef UNICODE_SUPPORT_VERSION_H
251
251
  rc = SQLProcedureColumns( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len, data->owner,
252
252
  data->owner_len, data->proc_name, data->proc_name_len, data->column_name, data->column_name_len );
253
253
  #else
@@ -269,7 +269,7 @@ int _ruby_ibm_db_SQLProcedures_helper(metadata_args *data) {
269
269
 
270
270
  data->stmt_res->is_executing = 1;
271
271
 
272
- #ifndef UNICODE_SUPPORT_VERSION
272
+ #ifndef UNICODE_SUPPORT_VERSION_H
273
273
  rc = SQLProcedures( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len, data->owner,
274
274
  data->owner_len, data->proc_name, data->proc_name_len );
275
275
  #else
@@ -291,7 +291,7 @@ int _ruby_ibm_db_SQLSpecialColumns_helper(metadata_args *data) {
291
291
 
292
292
  data->stmt_res->is_executing = 1;
293
293
 
294
- #ifndef UNICODE_SUPPORT_VERSION
294
+ #ifndef UNICODE_SUPPORT_VERSION_H
295
295
  rc = SQLSpecialColumns( (SQLHSTMT) data->stmt_res->hstmt, SQL_BEST_ROWID, data->qualifier, data->qualifier_len,
296
296
  data->owner, data->owner_len, data->table_name, data->table_name_len,
297
297
  (SQLUSMALLINT)data->scope, SQL_NULLABLE );
@@ -314,7 +314,7 @@ int _ruby_ibm_db_SQLStatistics_helper(metadata_args *data) {
314
314
 
315
315
  data->stmt_res->is_executing = 1;
316
316
 
317
- #ifndef UNICODE_SUPPORT_VERSION
317
+ #ifndef UNICODE_SUPPORT_VERSION_H
318
318
  rc = SQLStatistics( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len, data->owner,
319
319
  data->owner_len, data->table_name, data->table_name_len, (SQLUSMALLINT)data->unique, SQL_QUICK );
320
320
  #else
@@ -336,7 +336,7 @@ int _ruby_ibm_db_SQLTablePrivileges_helper(metadata_args *data) {
336
336
 
337
337
  data->stmt_res->is_executing = 1;
338
338
 
339
- #ifndef UNICODE_SUPPORT_VERSION
339
+ #ifndef UNICODE_SUPPORT_VERSION_H
340
340
  rc = SQLTablePrivileges( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len,
341
341
  data->owner, data->owner_len, data->table_name, data->table_name_len );
342
342
  #else
@@ -358,7 +358,7 @@ int _ruby_ibm_db_SQLTables_helper(metadata_args *data) {
358
358
 
359
359
  data->stmt_res->is_executing = 1;
360
360
 
361
- #ifndef UNICODE_SUPPORT_VERSION
361
+ #ifndef UNICODE_SUPPORT_VERSION_H
362
362
  rc = SQLTables( (SQLHSTMT) data->stmt_res->hstmt, data->qualifier, data->qualifier_len, data->owner,
363
363
  data->owner_len, data->table_name, data->table_name_len, data->table_type, data->table_type_len );
364
364
  #else
@@ -379,7 +379,7 @@ int _ruby_ibm_db_SQLExecDirect_helper(exec_cum_prepare_args *data) {
379
379
 
380
380
  data->stmt_res->is_executing = 1;
381
381
 
382
- #ifndef UNICODE_SUPPORT_VERSION
382
+ #ifndef UNICODE_SUPPORT_VERSION_H
383
383
  rc = SQLExecDirect( (SQLHSTMT) data->stmt_res->hstmt, data->stmt_string, (SQLINTEGER)data->stmt_string_len );
384
384
  #else
385
385
  rc = SQLExecDirectW( (SQLHSTMT) data->stmt_res->hstmt, data->stmt_string, (SQLINTEGER)data->stmt_string_len );
@@ -395,7 +395,7 @@ int _ruby_ibm_db_SQLExecDirect_helper(exec_cum_prepare_args *data) {
395
395
  */
396
396
  int _ruby_ibm_db_SQLCreateDB_helper(create_drop_db_args *data) {
397
397
  int rc = 0;
398
- #ifndef UNICODE_SUPPORT_VERSION
398
+ #ifndef UNICODE_SUPPORT_VERSION_H
399
399
  #ifdef _WIN32
400
400
  HINSTANCE cliLib = NULL;
401
401
  FARPROC sqlcreatedb;
@@ -450,7 +450,7 @@ int _ruby_ibm_db_SQLCreateDB_helper(create_drop_db_args *data) {
450
450
  */
451
451
  int _ruby_ibm_db_SQLDropDB_helper(create_drop_db_args *data) {
452
452
  int rc = 0;
453
- #ifndef UNICODE_SUPPORT_VERSION
453
+ #ifndef UNICODE_SUPPORT_VERSION_H
454
454
  #ifdef _WIN32
455
455
  HINSTANCE cliLib = NULL;
456
456
  FARPROC sqldropdb;
@@ -506,7 +506,7 @@ int _ruby_ibm_db_SQLPrepare_helper(exec_cum_prepare_args *data) {
506
506
 
507
507
  data->stmt_res->is_executing = 1;
508
508
 
509
- #ifndef UNICODE_SUPPORT_VERSION
509
+ #ifndef UNICODE_SUPPORT_VERSION_H
510
510
  rc = SQLPrepare( (SQLHSTMT) data->stmt_res->hstmt, data->stmt_string, (SQLINTEGER)data->stmt_string_len );
511
511
  #else
512
512
  rc = SQLPrepareW( (SQLHSTMT) data->stmt_res->hstmt, data->stmt_string, (SQLINTEGER)data->stmt_string_len );
@@ -742,7 +742,7 @@ int _ruby_ibm_db_SQLRowCount_helper(sql_row_count_args *data) {
742
742
  This function calls SQLGetInfo cli call to get general information about DBMS, which the app is connected to
743
743
  */
744
744
  int _ruby_ibm_db_SQLGetInfo_helper(get_info_args *data) {
745
- #ifndef UNICODE_SUPPORT_VERSION
745
+ #ifndef UNICODE_SUPPORT_VERSION_H
746
746
  return SQLGetInfo( data->conn_res->hdbc, data->infoType, data->infoValue, data->buff_length, data->out_length);
747
747
  #else
748
748
  return SQLGetInfoW( data->conn_res->hdbc, data->infoType, data->infoValue, data->buff_length, data->out_length);
@@ -753,7 +753,7 @@ int _ruby_ibm_db_SQLGetInfo_helper(get_info_args *data) {
753
753
  This function calls SQLGetDiagRec cli call to get the current values of a diagnostic record that contains error
754
754
  */
755
755
  int _ruby_ibm_db_SQLGetDiagRec_helper(get_diagRec_args *data) {
756
- #ifdef UNICODE_SUPPORT_VERSION
756
+ #ifdef UNICODE_SUPPORT_VERSION_H
757
757
  int rc= SQLGetDiagRecW( data->hType, data->handle, data->recNum, data->SQLState, data->NativeErrorPtr,
758
758
  data->msgText, data->buff_length, data->text_length_ptr );
759
759
  data->return_code=rc;
@@ -768,7 +768,7 @@ int _ruby_ibm_db_SQLGetDiagRec_helper(get_diagRec_args *data) {
768
768
  This function calls SQLSetStmtAttr cli call to set attributes related to a statement
769
769
  */
770
770
  int _ruby_ibm_db_SQLSetStmtAttr_helper(set_handle_attr_args *data) {
771
- #ifndef UNICODE_SUPPORT_VERSION
771
+ #ifndef UNICODE_SUPPORT_VERSION_H
772
772
  return SQLSetStmtAttr( (SQLHSTMT) *(data->handle), data->attribute, data->valuePtr, data->strLength );
773
773
  #else
774
774
  return SQLSetStmtAttrW( (SQLHSTMT) *(data->handle), data->attribute, data->valuePtr, data->strLength );
@@ -779,7 +779,7 @@ int _ruby_ibm_db_SQLSetStmtAttr_helper(set_handle_attr_args *data) {
779
779
  This function calls SQLSetConnectAttr cli call to set attributes that govern aspects of connections
780
780
  */
781
781
  int _ruby_ibm_db_SQLSetConnectAttr_helper(set_handle_attr_args *data) {
782
- #ifndef UNICODE_SUPPORT_VERSION
782
+ #ifndef UNICODE_SUPPORT_VERSION_H
783
783
  return SQLSetConnectAttr( (SQLHDBC) *(data->handle), data->attribute, data->valuePtr, data->strLength );
784
784
  #else
785
785
  return SQLSetConnectAttrW( (SQLHDBC) *(data->handle), data->attribute, data->valuePtr, data->strLength );
@@ -809,7 +809,7 @@ int _ruby_ibm_db_SQLGetStmtAttr_helper(get_handle_attr_args *data) {
809
809
  This function calls SQLGetConnectAttr cli call to set an environment attribute
810
810
  */
811
811
  int _ruby_ibm_db_SQLGetConnectAttr_helper(get_handle_attr_args *data) {
812
- #ifndef UNICODE_SUPPORT_VERSION
812
+ #ifndef UNICODE_SUPPORT_VERSION_H
813
813
  return SQLGetConnectAttr( (SQLHDBC) *(data->handle), data->attribute, data->valuePtr,
814
814
  data->buff_length, data->out_length);
815
815
  #else
@@ -105,7 +105,7 @@ typedef struct {
105
105
  } ibm_db_row_type;
106
106
 
107
107
  typedef struct _ibm_db_result_set_info_struct {
108
- #ifdef UNICODE_SUPPORT_VERSION
108
+ #ifdef UNICODE_SUPPORT_VERSION_H
109
109
  SQLWCHAR *name;
110
110
  long name_length;
111
111
  #else
@@ -157,7 +157,7 @@ typedef struct _stmt_handle_struct {
157
157
  Structure holding the data to be passed to SQLConnect or SQLDriverConnect CLI call
158
158
  */
159
159
  typedef struct _ibm_db_connect_args_struct {
160
- #ifdef UNICODE_SUPPORT_VERSION
160
+ #ifdef UNICODE_SUPPORT_VERSION_H
161
161
  SQLWCHAR *database;
162
162
  SQLWCHAR *uid;
163
163
  SQLWCHAR *password;
@@ -211,7 +211,7 @@ typedef struct _ibm_db_describecol_args_struct {
211
211
  */
212
212
  typedef struct _ibm_db_metadata_args_struct {
213
213
  stmt_handle *stmt_res;
214
- #ifdef UNICODE_SUPPORT_VERSION
214
+ #ifdef UNICODE_SUPPORT_VERSION_H
215
215
  SQLWCHAR *qualifier;
216
216
  SQLWCHAR *owner;
217
217
  SQLWCHAR *table_name;
@@ -243,7 +243,7 @@ typedef struct _ibm_db_metadata_args_struct {
243
243
  */
244
244
  typedef struct _ibm_db_exec_direct_args_struct {
245
245
  stmt_handle *stmt_res;
246
- #ifdef UNICODE_SUPPORT_VERSION
246
+ #ifdef UNICODE_SUPPORT_VERSION_H
247
247
  SQLWCHAR *stmt_string;
248
248
  #else
249
249
  SQLCHAR *stmt_string;
@@ -257,7 +257,7 @@ typedef struct _ibm_db_exec_direct_args_struct {
257
257
  */
258
258
  typedef struct _ibm_db_create_drop_db_args_struct {
259
259
  conn_handle *conn_res;
260
- #ifdef UNICODE_SUPPORT_VERSION
260
+ #ifdef UNICODE_SUPPORT_VERSION_H
261
261
  SQLWCHAR *dbName;
262
262
  SQLWCHAR *codeSet;
263
263
  SQLWCHAR *mode;
@@ -0,0 +1,3 @@
1
+ #ifndef UNICODE_SUPPORT_VERSION_H
2
+ #define UNICODE_SUPPORT_VERSION_H
3
+ #endif
@@ -800,6 +800,10 @@ module ActiveRecord
800
800
  @servertype = IBM_DB2_ZOS.new(self, @isAr3)
801
801
  when /10/
802
802
  @servertype = IBM_DB2_ZOS.new(self, @isAr3)
803
+ when /11/
804
+ @servertype = IBM_DB2_ZOS.new(self, @isAr3)
805
+ when /12/
806
+ @servertype = IBM_DB2_ZOS.new(self, @isAr3)
803
807
  when /08/ # DB2 for zOS version 8
804
808
  @servertype = IBM_DB2_ZOS_8.new(self, @isAr3)
805
809
  else # DB2 for zOS version 7
@@ -3487,7 +3491,9 @@ end
3487
3491
 
3488
3492
 
3489
3493
  def visit_Arel_Nodes_Limit o,collector
3494
+ collector << " FETCH FIRST "
3490
3495
  visit o.expr, collector
3496
+ collector << " ROWS ONLY "
3491
3497
  end
3492
3498
 
3493
3499
  def visit_Arel_Nodes_Offset o,collector
@@ -3532,40 +3538,54 @@ end
3532
3538
  end
3533
3539
 
3534
3540
 
3535
- if o.limit
3536
- limcoll = Arel::Collectors::SQLString.new
3537
- visit(o.limit,limcoll)
3538
- limit = limcoll.value.to_i
3539
- else
3540
- limit = nil
3541
- end
3542
-
3543
- if o.offset
3544
- offcoll = Arel::Collectors::SQLString.new
3545
- visit(o.offset,offcoll)
3546
- offset = offcoll.value.to_i
3547
- else
3548
- offset = nil
3549
- end
3550
-
3551
- limOffClause = @connection.get_limit_offset_clauses(limit,offset)
3552
-
3553
- if( !limOffClause["startSegment"].empty? )
3554
- #collector.changeFirstSegment(limOffClause["startSegment"])
3555
- collector.value.prepend(limOffClause["startSegment"])
3556
- end
3557
-
3558
- if( !limOffClause["endSegment"].empty? )
3559
- #collector.changeEndSegment(limOffClause["endSegment"])
3560
- collector << " "
3561
- collector << limOffClause["endSegment"]
3562
- end
3541
+ # if o.limit
3542
+ # limcoll = Arel::Collectors::SQLString.new
3543
+ # visit(o.limit,limcoll)
3544
+ # limit = limcoll.value.to_i
3545
+ # else
3546
+ # limit = nil
3547
+ # end
3548
+ #
3549
+ # if o.offset
3550
+ # offcoll = Arel::Collectors::SQLString.new
3551
+ # visit(o.offset,offcoll)
3552
+ # offset = offcoll.value.to_i
3553
+ # else
3554
+ # offset = nil
3555
+ # end
3556
+ #
3557
+ # limOffClause = @connection.get_limit_offset_clauses(limit,offset)
3558
+ #
3559
+ # if( !limOffClause["startSegment"].empty? )
3560
+ # #collector.changeFirstSegment(limOffClause["startSegment"])
3561
+ # collector.value.prepend(limOffClause["startSegment"])
3562
+ # end
3563
+ #
3564
+ # if( !limOffClause["endSegment"].empty? )
3565
+ # #collector.changeEndSegment(limOffClause["endSegment"])
3566
+ # collector << " "
3567
+ # collector << limOffClause["endSegment"]
3568
+ # end
3563
3569
 
3564
3570
  #Initialize a new Collector and set its value to the sql string built so far with any limit and ofset modifications
3565
3571
  #collector.reset(sql)
3566
-
3567
- collector = maybe_visit o.lock, collector
3568
- return collector
3572
+ if (o.limit && o.offset.nil?)
3573
+ visit(o.limit, collector)
3574
+ end
3575
+ if (o.offset && o.limit.nil?)
3576
+ collector.value.prepend(" SELECT O.* FROM (SELECT I.*, ROW_NUMBER() OVER () sys_row_num FROM ( ")
3577
+ collector << (" ) AS I) AS O WHERE sys_row_num > ")
3578
+ visit(o.offset, collector)
3579
+ end
3580
+
3581
+ if (o.offset && o.limit)
3582
+ collector.value.prepend(" SELECT O.* FROM (SELECT I.*, ROW_NUMBER() OVER () sys_row_num FROM ( ")
3583
+ collector << (" ) AS I) AS O WHERE sys_row_num > ")
3584
+ visit(o.offset, collector)
3585
+ visit(o.limit, collector)
3586
+ end
3587
+ collector = maybe_visit o.lock, collector
3588
+ return collector
3569
3589
  end
3570
3590
 
3571
3591
  end
@@ -87,5 +87,9 @@ machine_bits = ['ibm'].pack('p').size * 8
87
87
  if machine_bits == 64
88
88
  raise NotImplementedError, "ibm_db with Ruby 64-bit on Windows platform is not supported. Refer to README for more details"
89
89
  else
90
- require 'rb2x/i386/ibm_db.so'
90
+ if (RUBY_VERSION =~ /2.7/)
91
+ require 'rb2x/i386/ruby27/ibm_db.so'
92
+ else
93
+ require 'rb2x/i386/ruby26/ibm_db.so'
94
+ end
91
95
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibm_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.5
4
+ version: 5.1.0
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - IBM
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-15 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -56,7 +56,7 @@ files:
56
56
  - ext/Makefile.nt32
57
57
  - ext/Makefile.nt32.191
58
58
  - ext/extconf.rb
59
- - ext/gil_release_version
59
+ - ext/gil_release_version.h
60
60
  - ext/ibm_db-i386-mingw32.def
61
61
  - ext/ibm_db.c
62
62
  - ext/ibm_db.o
@@ -66,7 +66,7 @@ files:
66
66
  - ext/ruby_ibm_db_cli.c
67
67
  - ext/ruby_ibm_db_cli.h
68
68
  - ext/ruby_ibm_db_cli.o
69
- - ext/unicode_support_version
69
+ - ext/unicode_support_version.h
70
70
  - init.rb
71
71
  - lib/IBM_DB.rb
72
72
  - lib/active_record/connection_adapters/ibm_db_adapter.rb
@@ -74,7 +74,8 @@ files:
74
74
  - lib/active_record/connection_adapters/ibmdb_adapter.rb
75
75
  - lib/active_record/vendor/db2-i5-zOS.yaml
76
76
  - lib/mswin32/ibm_db.rb
77
- - lib/mswin32/rb2x/i386/ibm_db.so
77
+ - lib/mswin32/rb2x/i386/ruby26/ibm_db.so
78
+ - lib/mswin32/rb2x/i386/ruby27/ibm_db.so
78
79
  - test/active_record/connection_adapters/fake_adapter.rb
79
80
  - test/assets/example.log
80
81
  - test/assets/flowers.jpg